mirror of
https://github.com/livekit/livekit.git
synced 2026-10-22 15:22:30 +00:00
Switch known rids from 012 -> 210, used by OBS. (#3882)
* Switch known rids from 012 -> 210, used by OBS. * static check
This commit is contained in:
1 parent
890fd94249
commit
998a9f9404
2 files changed
+13
-13
No files matched your search
@@ -27,16 +27,16 @@ const (
|
||||
halfResolutionH = "h"
|
||||
fullResolutionF = "f"
|
||||
|
||||
quarterResolution0 = "0"
|
||||
quarterResolution2 = "2"
|
||||
halfResolution1 = "1"
|
||||
fullResolution2 = "2"
|
||||
fullResolution0 = "0"
|
||||
)
|
||||
|
||||
type VideoLayersRid [DefaultMaxLayerSpatial + 1]string
|
||||
|
||||
var (
|
||||
videoLayersRidQHF = VideoLayersRid{quarterResolutionQ, halfResolutionH, fullResolutionF}
|
||||
videoLayersRid012 = VideoLayersRid{quarterResolution0, halfResolution1, fullResolution2}
|
||||
videoLayersRid210 = VideoLayersRid{quarterResolution2, halfResolution1, fullResolution0}
|
||||
DefaultVideoLayersRid = videoLayersRidQHF
|
||||
)
|
||||
|
||||
@@ -511,8 +511,8 @@ func NormalizeVideoLayersRid(rids VideoLayersRid) VideoLayersRid {
|
||||
normalize(videoLayersRidQHF)
|
||||
}
|
||||
|
||||
if isVideoLayersRidKnown(rids, videoLayersRid012) {
|
||||
normalize(videoLayersRid012)
|
||||
if isVideoLayersRidKnown(rids, videoLayersRid210) {
|
||||
normalize(videoLayersRid210)
|
||||
}
|
||||
|
||||
return out
|
||||
|
||||
@@ -867,19 +867,19 @@ func TestNormalizeVideoLayersRid(t *testing.T) {
|
||||
VideoLayersRid{"q", "h", ""},
|
||||
},
|
||||
{
|
||||
"012",
|
||||
videoLayersRid012,
|
||||
videoLayersRid012,
|
||||
"210",
|
||||
videoLayersRid210,
|
||||
videoLayersRid210,
|
||||
},
|
||||
{
|
||||
"scrambled 012",
|
||||
"scrambled 210",
|
||||
VideoLayersRid{"2", "0", "1"},
|
||||
videoLayersRid012,
|
||||
videoLayersRid210,
|
||||
},
|
||||
{
|
||||
"partial 012",
|
||||
VideoLayersRid{"2", "1"},
|
||||
VideoLayersRid{"1", "2", ""},
|
||||
"partial 210",
|
||||
VideoLayersRid{"1", "2"},
|
||||
VideoLayersRid{"2", "1", ""},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user