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. |