Documentation
¶
Overview ¶
Package codecs implements codec specific RTP payloader/depayloaders
Index ¶
- type G711Payloader
- type G722Payloader
- type H264Packet
- type H264PayloadDescriptor
- type H264Payloader
- type OpusPacket
- type OpusPartitionHeadChecker
- type OpusPayloader
- type PayloadDescriptor
- type VP8Packet
- type VP8PartitionHeadChecker
- type VP8PayloadDescriptor
- type VP8Payloader
- type VP9Packet
- type VP9PartitionHeadChecker
- type VP9Payloader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type H264Packet ¶
type H264Packet struct {
}
H264Packet represents the H264 header that is stored in the payload of an RTP Packet
type H264PayloadDescriptor ¶
miaobinwei
func (*H264PayloadDescriptor) GetSpatialLayer ¶
func (p *H264PayloadDescriptor) GetSpatialLayer() uint8
func (*H264PayloadDescriptor) GetTemporalLayer ¶
func (p *H264PayloadDescriptor) GetTemporalLayer() uint8
func (*H264PayloadDescriptor) IsKeyFrame ¶
func (p *H264PayloadDescriptor) IsKeyFrame() bool
func (*H264PayloadDescriptor) Parse ¶
func (Pd *H264PayloadDescriptor) Parse(date []byte, dateLen int, _ interface{}, _ int) PayloadDescriptor
type OpusPacket ¶
type OpusPacket struct {
Payload []byte
}
OpusPacket represents the Opus header that is stored in the payload of an RTP Packet
type OpusPartitionHeadChecker ¶
type OpusPartitionHeadChecker struct{}
OpusPartitionHeadChecker checks Opus partition head
func (*OpusPartitionHeadChecker) IsPartitionHead ¶
func (*OpusPartitionHeadChecker) IsPartitionHead(packet []byte) bool
IsPartitionHead checks whether if this is a head of the Opus partition
type PayloadDescriptor ¶
type VP8Packet ¶
type VP8Packet struct {
// Required Header
X uint8 /* extended controlbits present */
N uint8 /* (non-reference frame) when set to 1 this frame can be discarded */
S uint8 /* start of VP8 partition */
PID uint8 /* partition index */
// Optional Header
I uint8 /* 1 if PictureID is present */
L uint8 /* 1 if TL0PICIDX is present */
T uint8 /* 1 if TID is present */
K uint8 /* 1 if KEYIDX is present */
PictureID uint16 /* 8 or 16 bits, picture ID */
TL0PICIDX uint8 /* 8 bits temporal level zero index */
//miaobinwei
HasTlIndex bool
TlIndex uint8
Y uint8
KeyIndex uint8
Payload []byte
}
VP8Packet represents the VP8 header that is stored in the payload of an RTP Packet
type VP8PartitionHeadChecker ¶
type VP8PartitionHeadChecker struct{}
VP8PartitionHeadChecker checks VP8 partition head
func (*VP8PartitionHeadChecker) IsPartitionHead ¶
func (*VP8PartitionHeadChecker) IsPartitionHead(packet []byte) bool
IsPartitionHead checks whether if this is a head of the VP8 partition
type VP8PayloadDescriptor ¶
miaobinwei
func (*VP8PayloadDescriptor) GetSpatialLayer ¶
func (p *VP8PayloadDescriptor) GetSpatialLayer() uint8
func (*VP8PayloadDescriptor) GetTemporalLayer ¶
func (p *VP8PayloadDescriptor) GetTemporalLayer() uint8
func (*VP8PayloadDescriptor) IsKeyFrame ¶
func (p *VP8PayloadDescriptor) IsKeyFrame() bool
func (*VP8PayloadDescriptor) Parse ¶
func (p *VP8PayloadDescriptor) Parse(date []byte, dateLen int, _ interface{}, _ int) PayloadDescriptor
type VP9Packet ¶
type VP9Packet struct {
// Required header
I bool // PictureID is present
P bool // Inter-picture predicted frame
L bool // Layer indices is present
F bool // Flexible mode
B bool // Start of a frame
E bool // End of a frame
V bool // Scalability structure (SS) data present
// Recommended headers
PictureID uint16 // 7 or 16 bits, picture ID
// Conditionally recommended headers
TID uint8 // Temporal layer ID
U bool // Switching up point
SID uint8 // Spatial layer ID
D bool // Inter-layer dependency used
// Conditionally required headers
PDiff []uint8 // Reference index (F=1)
TL0PICIDX uint8 // Temporal layer zero index (F=0)
Payload []byte
}
VP9Packet represents the VP9 header that is stored in the payload of an RTP Packet
type VP9PartitionHeadChecker ¶
type VP9PartitionHeadChecker struct{}
VP9PartitionHeadChecker checks VP9 partition head
func (*VP9PartitionHeadChecker) IsPartitionHead ¶
func (*VP9PartitionHeadChecker) IsPartitionHead(packet []byte) bool
IsPartitionHead checks whether if this is a head of the VP9 partition
type VP9Payloader ¶
VP9Payloader payloads VP9 packets