MCPcopy Create free account
hub / github.com/pion/rtp / String

Method String

packet.go:62–74  ·  view source on GitHub ↗

String helps with debugging by printing packet information in a readable way

()

Source from the content-addressed store, hash-verified

60
61// String helps with debugging by printing packet information in a readable way
62func (p Packet) String() string {
63 out := "RTP PACKET:\n"
64
65 out += fmt.Sprintf("\tVersion: %v\n", p.Version)
66 out += fmt.Sprintf("\tMarker: %v\n", p.Marker)
67 out += fmt.Sprintf("\tPayload Type: %d\n", p.PayloadType)
68 out += fmt.Sprintf("\tSequence Number: %d\n", p.SequenceNumber)
69 out += fmt.Sprintf("\tTimestamp: %d\n", p.Timestamp)
70 out += fmt.Sprintf("\tSSRC: %d (%x)\n", p.SSRC, p.SSRC)
71 out += fmt.Sprintf("\tPayload Length: %d\n", len(p.Payload))
72
73 return out
74}
75
76// Unmarshal parses the passed byte slice and stores the result in the Header.
77// It returns the number of bytes read n and any error.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected