Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: webrtc/media/engine/webrtcvideoengine2_unittest.cc

Issue 1811373002: Fix broken CVO header extension (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideoengine2_unittest.cc
diff --git a/webrtc/media/engine/webrtcvideoengine2_unittest.cc b/webrtc/media/engine/webrtcvideoengine2_unittest.cc
index b44eb9907d7a2a2bacb731532dee1aab0f4f3533..ce0a7c851fc41d011e560a1881643947bde7153a 100644
--- a/webrtc/media/engine/webrtcvideoengine2_unittest.cc
+++ b/webrtc/media/engine/webrtcvideoengine2_unittest.cc
@@ -282,8 +282,10 @@ TEST_F(WebRtcVideoEngine2Test, CVOSetHeaderExtensionAfterCapturer) {
cricket::FakeWebRtcVideoEncoderFactory encoder_factory;
encoder_factory.AddSupportedVideoCodecType(webrtc::kVideoCodecVP8, "VP8");
+ encoder_factory.AddSupportedVideoCodecType(webrtc::kVideoCodecVP9, "VP9");
cricket::VideoSendParameters parameters;
parameters.codecs.push_back(kVp8Codec);
+ parameters.codecs.push_back(kVp9Codec);
std::unique_ptr<VideoMediaChannel> channel(
SetUpForExternalEncoderFactory(&encoder_factory, parameters.codecs));
@@ -292,10 +294,15 @@ TEST_F(WebRtcVideoEngine2Test, CVOSetHeaderExtensionAfterCapturer) {
// Set capturer.
EXPECT_TRUE(channel->SetCapturer(kSsrc, &capturer));
+ // Verify capturer has turned on applying rotation.
+ EXPECT_TRUE(capturer.GetApplyRotation());
+
// Add CVO extension.
const int id = 1;
parameters.extensions.push_back(
cricket::RtpHeaderExtension(kRtpVideoRotationHeaderExtension, id));
+ // Also remove the first codec to trigger a codec change as well.
+ parameters.codecs.erase(parameters.codecs.begin());
EXPECT_TRUE(channel->SetSendParameters(parameters));
// Verify capturer has turned off applying rotation.
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698