rtppool

package
v0.0.0-...-e581b2e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 5 Imported by: 0

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 New

func New() *RTPPool

func (*RTPPool) GetPacket

func (r *RTPPool) GetPacket() *rtp.Packet

func (*RTPPool) GetPayload

func (r *RTPPool) GetPayload() *[]byte

func (*RTPPool) NewPacket

func (r *RTPPool) NewPacket(header *rtp.Header, payload []byte, attr interceptor.Attributes) *RetainablePacket

func (*RTPPool) PutPacket

func (r *RTPPool) PutPacket(localPacket *rtp.Packet)

func (*RTPPool) PutPayload

func (r *RTPPool) PutPayload(localPayload *[]byte)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL