Documentation ¶
Index ¶
Constants ¶
const ( // RtpVersion is used to verify compliance with current specification of the RTP protocol. RtpVersion = 2 << 6 // HeaderSize defines the size of the fixed part of the packet, up to and inclding SSRC. HeaderSize = 12 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Packet ¶
type Packet struct { VPXCC byte // Version, Padding, Extension, Contributing Source Count MPT byte // Marker, Payload Type SN uint16 // Sequense Number TS uint32 // Timestamp SSRC uint32 // Synchronization Source Identifier CSRC []uint32 // Contributing Source Identifiers XH uint16 // Extension Header (profile dependent) XL uint16 // Extension Length (in `uint`s not inclusing this header) XD []byte // Extension Data PL []byte // Payload }
Packet encapsulates RTP packet structure.
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |V=2|P|X| CC |M| PT | sequence number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | timestamp | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | synchronization source (SSRC) identifier | +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ | contributing source (CSRC) identifiers | | .... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+