MCPcopy Create free account
hub / github.com/livekit/livekit / Buffer

Struct Buffer

pkg/sfu/buffer/buffer.go:52–75  ·  view source on GitHub ↗

Buffer contains all packets

Source from the content-addressed store, hash-verified

50
51// Buffer contains all packets
52type Buffer struct {
53 *BufferBase
54
55 pPackets []pendingPacket
56 lastReportAt int64
57 isBound bool
58
59 twcc *twcc.Responder
60 twccExtID uint8
61
62 enableAudioLossProxying bool
63 lastFractionLostToReport uint8 // Last fraction lost from subscribers, should report to publisher; Audio only
64
65 lastPacketRead int
66
67 // callbacks
68 onClose func()
69 onRtcpFeedback func([]rtcp.Packet)
70 onFinalRtpStats func(*livekit.RTPStats)
71 onNotifyRTX func(uint32, uint32, string)
72
73 primaryBufferForRTX *Buffer
74 rtxPktBuf []byte
75}
76
77func NewBuffer(ssrc uint32, maxVideoPkts, maxAudioPkts int) *Buffer {
78 b := &Buffer{}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected