fix: revert recent changes to determine simulcast from sdp (#3565)

* Revert "Audio uses signal SignalCid and SdpCid. (#3564)"

This reverts commit cdfbb106d1.

* Revert "Keep simulcast information tied to receiver. (#3563)"

This reverts commit ed5e2f16b2.

* Revert "chore(logs): log VLS type for VP9/AV1 (#3561)"

This reverts commit ad010cfc43.

* Revert "fix(video): determine svc/simulcast from SDP for advanced codecs (#3549)"

This reverts commit 15f565510c.

* chore(deps): update protocol
This commit is contained in:
Anunay Maheshwari
2025-03-31 23:15:44 +05:30
committed by GitHub
parent cdfbb106d1
commit 52ce18d56e
19 changed files with 312 additions and 486 deletions
+5 -37
View File
@@ -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)