fix: revert recent changes to determine simulcast from sdp (#3565)
* Revert "Audio uses signal SignalCid and SdpCid. (#3564)" This reverts commitcdfbb106d1. * Revert "Keep simulcast information tied to receiver. (#3563)" This reverts commited5e2f16b2. * Revert "chore(logs): log VLS type for VP9/AV1 (#3561)" This reverts commitad010cfc43. * Revert "fix(video): determine svc/simulcast from SDP for advanced codecs (#3549)" This reverts commit15f565510c. * chore(deps): update protocol
This commit is contained in:
@@ -498,15 +498,9 @@ func (t *MediaTrackReceiver) SetSimulcast(simulcast bool) {
|
||||
t.lock.Lock()
|
||||
defer t.lock.Unlock()
|
||||
|
||||
if t.IsSimulcast() != simulcast {
|
||||
trackInfo := t.TrackInfoClone()
|
||||
trackInfo.Simulcast = simulcast
|
||||
t.trackInfo.Store(trackInfo)
|
||||
}
|
||||
}
|
||||
|
||||
func (t *MediaTrackReceiver) HasMultipleSpatialLayers() bool {
|
||||
return len(t.TrackInfo().Layers) > 1
|
||||
trackInfo := t.TrackInfoClone()
|
||||
trackInfo.Simulcast = simulcast
|
||||
t.trackInfo.Store(trackInfo)
|
||||
}
|
||||
|
||||
func (t *MediaTrackReceiver) Name() string {
|
||||
@@ -713,13 +707,13 @@ func (t *MediaTrackReceiver) SetLayerSsrc(mimeType mime.MimeType, rid string, ss
|
||||
t.updateTrackInfoOfReceivers()
|
||||
}
|
||||
|
||||
func (t *MediaTrackReceiver) UpdateCodecSignalCid(codecs []*livekit.SimulcastCodec) {
|
||||
func (t *MediaTrackReceiver) UpdateCodecCid(codecs []*livekit.SimulcastCodec) {
|
||||
t.lock.Lock()
|
||||
trackInfo := t.TrackInfoClone()
|
||||
for _, c := range codecs {
|
||||
for _, origin := range trackInfo.Codecs {
|
||||
if mime.GetMimeTypeCodec(origin.MimeType) == mime.NormalizeMimeTypeCodec(c.Codec) {
|
||||
origin.SignalCid = c.Cid
|
||||
origin.Cid = c.Cid
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -730,32 +724,6 @@ func (t *MediaTrackReceiver) UpdateCodecSignalCid(codecs []*livekit.SimulcastCod
|
||||
t.updateTrackInfoOfReceivers()
|
||||
}
|
||||
|
||||
func (t *MediaTrackReceiver) UpdateCodecInfo(mimeType string, cid string, isSimulcast bool) {
|
||||
t.lock.Lock()
|
||||
trackInfo := t.TrackInfoClone()
|
||||
for _, origin := range trackInfo.Codecs {
|
||||
if mime.IsMimeTypeStringEqual(origin.MimeType, mimeType) {
|
||||
if origin.SdpCid != "" {
|
||||
if origin.SdpCid != cid || origin.IsSimulcast != isSimulcast {
|
||||
t.params.Logger.Warnw(
|
||||
"uexpected codec info change", nil,
|
||||
"oldCid", origin.SdpCid, "newCid", cid,
|
||||
"oldIsSimulcast", origin.IsSimulcast, "newIsSimulcast", isSimulcast,
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
origin.SdpCid = cid
|
||||
origin.IsSimulcast = isSimulcast
|
||||
break
|
||||
}
|
||||
}
|
||||
t.trackInfo.Store(trackInfo)
|
||||
t.lock.Unlock()
|
||||
|
||||
t.updateTrackInfoOfReceivers()
|
||||
}
|
||||
|
||||
func (t *MediaTrackReceiver) UpdateTrackInfo(ti *livekit.TrackInfo) {
|
||||
updateMute := false
|
||||
clonedInfo := utils.CloneProto(ti)
|
||||
|
||||
Reference in New Issue
Block a user