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

Unified Diff: content/renderer/media/rtc_video_decoder_unittest.cc

Issue 1150543002: RtcVideoDecoder: fall back to SW decode for unsupported profiles/resolutions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rtcvd unittest Created 5 years, 7 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 | « content/renderer/media/rtc_video_decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_video_decoder_unittest.cc
diff --git a/content/renderer/media/rtc_video_decoder_unittest.cc b/content/renderer/media/rtc_video_decoder_unittest.cc
index 2b4c9c66e064bef1a49460a0fc7c52c903cd6feb..0e4a5581c66125d77a0480366450f5dba73360b1 100644
--- a/content/renderer/media/rtc_video_decoder_unittest.cc
+++ b/content/renderer/media/rtc_video_decoder_unittest.cc
@@ -35,8 +35,20 @@ class RTCVideoDecoderTest : public ::testing::Test,
ASSERT_TRUE(vda_thread_.Start());
vda_task_runner_ = vda_thread_.message_loop_proxy();
mock_vda_ = new media::MockVideoDecodeAccelerator;
+
+ media::VideoDecodeAccelerator::SupportedProfile supported_profile;
+ supported_profile.min_resolution.SetSize(16, 16);
+ supported_profile.max_resolution.SetSize(1920, 1088);
+ supported_profile.profile = media::H264PROFILE_MAIN;
+ supported_profiles_.push_back(supported_profile);
+ supported_profile.profile = media::VP8PROFILE_ANY;
+ supported_profiles_.push_back(supported_profile);
+
EXPECT_CALL(*mock_gpu_factories_.get(), GetTaskRunner())
.WillRepeatedly(Return(vda_task_runner_));
+ EXPECT_CALL(*mock_gpu_factories_.get(),
+ GetVideoDecodeAcceleratorSupportedProfiles())
+ .WillRepeatedly(Return(supported_profiles_));
EXPECT_CALL(*mock_gpu_factories_.get(), DoCreateVideoDecodeAccelerator())
.WillRepeatedly(Return(mock_vda_));
EXPECT_CALL(*mock_vda_, Initialize(_, _))
@@ -97,6 +109,7 @@ class RTCVideoDecoderTest : public ::testing::Test,
scoped_ptr<RTCVideoDecoder> rtc_decoder_;
webrtc::VideoCodec codec_;
base::Thread vda_thread_;
+ media::VideoDecodeAccelerator::SupportedProfiles supported_profiles_;
private:
scoped_refptr<base::SingleThreadTaskRunner> vda_task_runner_;
« no previous file with comments | « content/renderer/media/rtc_video_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698