Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions pkg/rtpfb/interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ type Interceptor struct {
}

func (i *Interceptor) bindTWCCStream(twccHdrExtID uint8, writer interceptor.RTPWriter) interceptor.RTPWriter {
loggedMissingExt := false

return interceptor.RTPWriterFunc(func(
header *rtp.Header,
payload []byte,
Expand All @@ -119,12 +121,14 @@ func (i *Interceptor) bindTWCCStream(twccHdrExtID uint8, writer interceptor.RTPW

var twccHdrExt rtp.TransportCCExtension
if err := twccHdrExt.Unmarshal(header.GetExtension(twccHdrExtID)); err != nil {
i.log.Warnf(
"CCFB configured for TWCC, but failed to get TWCC header extension from outgoing packet."+
"Falling back to saving history for CCFB feedback reports. err: %v",
err,
)
i.history.addOutgoing(header.SSRC, header.SequenceNumber, false, 0, header.MarshalSize()+len(payload), ts)
if !loggedMissingExt {
i.log.Warnf(
"CCFB configured for TWCC, but failed to get TWCC header extension from outgoing packet."+
"Packets without the extension cannot be tracked and will not appear in feedback reports. err: %v",
err,
)
loggedMissingExt = true
}

return writer.Write(header, payload, attributes)
}
Expand Down
Loading