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:
@@ -27,16 +27,16 @@ const (
|
|||||||
halfResolutionH = "h"
|
halfResolutionH = "h"
|
||||||
fullResolutionF = "f"
|
fullResolutionF = "f"
|
||||||
|
|
||||||
quarterResolution0 = "0"
|
quarterResolution2 = "2"
|
||||||
halfResolution1 = "1"
|
halfResolution1 = "1"
|
||||||
fullResolution2 = "2"
|
fullResolution0 = "0"
|
||||||
)
|
)
|
||||||
|
|
||||||
type VideoLayersRid [DefaultMaxLayerSpatial + 1]string
|
type VideoLayersRid [DefaultMaxLayerSpatial + 1]string
|
||||||
|
|
||||||
var (
|
var (
|
||||||
videoLayersRidQHF = VideoLayersRid{quarterResolutionQ, halfResolutionH, fullResolutionF}
|
videoLayersRidQHF = VideoLayersRid{quarterResolutionQ, halfResolutionH, fullResolutionF}
|
||||||
videoLayersRid012 = VideoLayersRid{quarterResolution0, halfResolution1, fullResolution2}
|
videoLayersRid210 = VideoLayersRid{quarterResolution2, halfResolution1, fullResolution0}
|
||||||
DefaultVideoLayersRid = videoLayersRidQHF
|
DefaultVideoLayersRid = videoLayersRidQHF
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -511,8 +511,8 @@ func NormalizeVideoLayersRid(rids VideoLayersRid) VideoLayersRid {
|
|||||||
normalize(videoLayersRidQHF)
|
normalize(videoLayersRidQHF)
|
||||||
}
|
}
|
||||||
|
|
||||||
if isVideoLayersRidKnown(rids, videoLayersRid012) {
|
if isVideoLayersRidKnown(rids, videoLayersRid210) {
|
||||||
normalize(videoLayersRid012)
|
normalize(videoLayersRid210)
|
||||||
}
|
}
|
||||||
|
|
||||||
return out
|
return out
|
||||||
|
|||||||
@@ -867,19 +867,19 @@ func TestNormalizeVideoLayersRid(t *testing.T) {
|
|||||||
VideoLayersRid{"q", "h", ""},
|
VideoLayersRid{"q", "h", ""},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"012",
|
"210",
|
||||||
videoLayersRid012,
|
videoLayersRid210,
|
||||||
videoLayersRid012,
|
videoLayersRid210,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scrambled 012",
|
"scrambled 210",
|
||||||
VideoLayersRid{"2", "0", "1"},
|
VideoLayersRid{"2", "0", "1"},
|
||||||
videoLayersRid012,
|
videoLayersRid210,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"partial 012",
|
"partial 210",
|
||||||
VideoLayersRid{"2", "1"},
|
VideoLayersRid{"1", "2"},
|
||||||
VideoLayersRid{"1", "2", ""},
|
VideoLayersRid{"2", "1", ""},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user