Bug 1242324: Give VP9 priority over vp8 when both are enabled r=drno
--- a/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
+++ b/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
@@ -2083,36 +2083,37 @@ JsepSessionImpl::SetupDefaultCodecs()
"PCMA",
8000,
1,
8000 / 50, // frequency / 50
8 * 8000 * 1 // 8 * frequency * channels
));
// Supported video codecs.
+ // Note: order here implies priority for building offers!
+ JsepVideoCodecDescription* vp9 = new JsepVideoCodecDescription(
+ "121",
+ "VP9",
+ 90000
+ );
+ // Defaults for mandatory params
+ vp9->mConstraints.maxFs = 12288; // Enough for 2048x1536
+ vp9->mConstraints.maxFps = 60;
+ mSupportedCodecs.values.push_back(vp9);
+
JsepVideoCodecDescription* vp8 = new JsepVideoCodecDescription(
"120",
"VP8",
90000
);
// Defaults for mandatory params
vp8->mConstraints.maxFs = 12288; // Enough for 2048x1536
vp8->mConstraints.maxFps = 60;
mSupportedCodecs.values.push_back(vp8);
- JsepVideoCodecDescription* vp9 = new JsepVideoCodecDescription(
- "121",
- "VP9",
- 90000
- );
- // Defaults for mandatory params
- vp9->mConstraints.maxFs = 12288; // Enough for 2048x1536
- vp9->mConstraints.maxFps = 60;
- mSupportedCodecs.values.push_back(vp9);
-
JsepVideoCodecDescription* h264_1 = new JsepVideoCodecDescription(
"126",
"H264",
90000
);
h264_1->mPacketizationMode = 1;
// Defaults for mandatory params
h264_1->mProfileLevelId = 0x42E00D;