Keep simulcast information tied to receiver. (#3563)
* Keep simulcast information tied to receiver. `simulcast` flag in `TrackInfo` is at track lavel. With codec simulcast, the primary codec (in most cases) is SVC and the backup codec is simulcast. Back up codec publish changing the track info setting to true meant that the primary receiver was treated as simulcast if a subscriber for primary codec joined after the backup codec was published. Keep track of simulcast flag in receiver. Also, TrackInfo Cids are from signal. So, keep track of SDP cids separately. The `simulcastTrackIds` map uses SDP cid. Clean up by all the SDP cids of a track * clean up * clean up * clean up * clean up * test * Store SdpCid and IsSimulcast in Trackinfo * clean up * mock
This commit is contained in:
@@ -141,7 +141,12 @@ func (p *ParticipantImpl) setCodecPreferencesVideoForPublisher(offer webrtc.Sess
|
||||
}
|
||||
var mimeType string
|
||||
for _, c := range info.Codecs {
|
||||
if c.Cid == streamID {
|
||||
// this is reading streamID from SDP which is technically SDP cid,
|
||||
// but it is not set in TrackInfo by the time this is checked,
|
||||
// hence the check on signal cid.
|
||||
// As a result, this will fail for clients that use different cid
|
||||
// while signalling and while doing negotiation (e. g. Firefox)
|
||||
if c.SignalCid == streamID {
|
||||
mimeType = c.MimeType
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user