Add upstream FlexFEC recovery support

This commit is contained in:
David Chen committed 2026-08-28 17:46:41 -07:00
1 parent a1be640b12
commit 6a879f4f48
16 files changed
+1882 -3

No files matched your search

+9
View File
@@ -168,6 +168,7 @@ type BufferBase struct {
rtpParameters webrtc.RTPParameters
payloadType uint8
rtxPayloadType uint8
fecPayloadType uint8
snRangeMap *utils.RangeMap[uint64, uint64]
@@ -313,6 +314,14 @@ func (b *BufferBase) BindLocked(rtpParameters webrtc.RTPParameters, codec webrtc
}
}
// find FlexFEC payload type, the repair stream is codec agnostic (no apt)
for _, codec := range rtpParameters.Codecs {
if strings.EqualFold(codec.MimeType, webrtc.MimeTypeFlexFEC03) {
b.fecPayloadType = uint8(codec.PayloadType)
break
}
}
for _, ext := range rtpParameters.HeaderExtensions {
switch ext.URI {
case dd.ExtensionURI: