Documentation ¶
Overview ¶
this code is from pion nack interceptor https://github.com/pion/interceptor/blob/master/pkg/nack/retainable_packet.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferPPool ¶
type BufferPPool struct {
// contains filtered or unexported fields
}
func NewBufferPool ¶
func NewBufferPool() *BufferPPool
func (*BufferPPool) Get ¶
func (r *BufferPPool) Get() *[]byte
func (*BufferPPool) Put ¶
func (r *BufferPPool) Put(localPayload *[]byte)
type PacketManager ¶
type PacketManager struct { PacketPool *sync.Pool HeaderPool *sync.Pool PayloadPool *sync.Pool AttrPool *sync.Pool }
func NewPacketManager ¶
func NewPacketManager() *PacketManager
func (*PacketManager) NewPacket ¶
func (m *PacketManager) NewPacket(header *rtp.Header, payload []byte, attr interceptor.Attributes) (*RetainablePacket, error)
type RTPPool ¶
type RTPPool struct { PacketManager *PacketManager // contains filtered or unexported fields }
func (*RTPPool) GetPayload ¶
func (*RTPPool) NewPacket ¶
func (r *RTPPool) NewPacket(header *rtp.Header, payload []byte, attr interceptor.Attributes) *RetainablePacket
func (*RTPPool) PutPayload ¶
type RetainablePacket ¶
type RetainablePacket struct {
// contains filtered or unexported fields
}
func (*RetainablePacket) Attributes ¶
func (p *RetainablePacket) Attributes() interceptor.Attributes
func (*RetainablePacket) Header ¶
func (p *RetainablePacket) Header() *rtp.Header
func (*RetainablePacket) Payload ¶
func (p *RetainablePacket) Payload() []byte
func (*RetainablePacket) Release ¶
func (p *RetainablePacket) Release()
func (*RetainablePacket) Retain ¶
func (p *RetainablePacket) Retain() error
Click to show internal directories.
Click to hide internal directories.