Add red encoding for opus only publisher (#1137)

* Add red encodings for opus only publisher

* Add test case for red receiver
This commit is contained in:
cnderrauber
2022-11-02 10:36:29 +08:00
committed by GitHub
parent 46f45e8892
commit bdd69c7a1c
7 changed files with 471 additions and 43 deletions
+8 -1
View File
@@ -485,7 +485,14 @@ func (t *MediaTrackReceiver) addSubscriber(sub types.LocalParticipant) (err erro
}
tLogger := LoggerWithTrack(sub.GetLogger(), t.ID(), t.params.IsRelayed)
err = t.MediaTrackSubscriptions.AddSubscriber(sub, NewWrappedReceiver(receivers, t.ID(), streamId, potentialCodecs, tLogger))
err = t.MediaTrackSubscriptions.AddSubscriber(sub, NewWrappedReceiver(WrappedReceiverParams{
Receivers: receivers,
TrackID: t.ID(),
StreamId: streamId,
UpstreamCodecs: potentialCodecs,
Logger: tLogger,
DisableRed: t.trackInfo.GetDisableRed(),
}))
if err != nil {
return
}