MCPcopy
hub / github.com/livekit/livekit / NewBuffer

Function NewBuffer

pkg/sfu/buffer/buffer.go:77–88  ·  view source on GitHub ↗
(ssrc uint32, maxVideoPkts, maxAudioPkts int)

Source from the content-addressed store, hash-verified

75}
76
77func NewBuffer(ssrc uint32, maxVideoPkts, maxAudioPkts int) *Buffer {
78 b := &Buffer{}
79 b.BufferBase = NewBufferBase(BufferBaseParams{
80 SSRC: ssrc,
81 MaxVideoPkts: maxVideoPkts,
82 MaxAudioPkts: maxAudioPkts,
83 LoggerComponents: []string{sutils.ComponentPub, sutils.ComponentSFU},
84 SendPLI: b.sendPLI,
85 IsReportingEnabled: true,
86 })
87 return b
88}
89
90func (b *Buffer) SetTWCCAndExtID(twcc *twcc.Responder, extID uint8) {
91 b.Lock()

Callers 5

GetOrNewMethod · 0.85
TestNackFunction · 0.85
TestNewBufferFunction · 0.85
TestFractionLostReportFunction · 0.85
TestCodecChangeFunction · 0.85

Calls 1

NewBufferBaseFunction · 0.85

Tested by 4

TestNackFunction · 0.68
TestNewBufferFunction · 0.68
TestFractionLostReportFunction · 0.68
TestCodecChangeFunction · 0.68