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

Unified Diff: media/test/pipeline_integration_test_base.cc

Issue 1116473002: Introduce NullVideoSink for test classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. Created 5 years, 8 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 | « media/test/pipeline_integration_test_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/test/pipeline_integration_test_base.cc
diff --git a/media/test/pipeline_integration_test_base.cc b/media/test/pipeline_integration_test_base.cc
index c17431a5759f5a68c338bc35184e712cb411960a..5217925217b713ce57ccfd6e32354f3a27e003c2 100644
--- a/media/test/pipeline_integration_test_base.cc
+++ b/media/test/pipeline_integration_test_base.cc
@@ -35,9 +35,6 @@ namespace media {
const char kNullVideoHash[] = "d41d8cd98f00b204e9800998ecf8427e";
const char kNullAudioHash[] = "0.00,0.00,0.00,0.00,0.00,0.00,";
-MockVideoRendererSink::MockVideoRendererSink() {}
-MockVideoRendererSink::~MockVideoRendererSink() {}
-
PipelineIntegrationTestBase::PipelineIntegrationTestBase()
: hashing_enabled_(false),
clockless_playback_(false),
@@ -240,14 +237,17 @@ scoped_ptr<Renderer> PipelineIntegrationTestBase::CreateRenderer() {
new FFmpegVideoDecoder(message_loop_.message_loop_proxy()));
#endif
- EXPECT_CALL(video_sink_, PaintFrameUsingOldRenderingPath(_))
- .WillRepeatedly(
- Invoke(this, &PipelineIntegrationTestBase::OnVideoFramePaint));
+ // Simulate a 60Hz rendering sink.
+ video_sink_.reset(new NullVideoSink(
+ clockless_playback_, base::TimeDelta::FromSecondsD(1.0 / 60),
+ base::Bind(&PipelineIntegrationTestBase::OnVideoFramePaint,
+ base::Unretained(this)),
+ message_loop_.task_runner()));
// Disable frame dropping if hashing is enabled.
- scoped_ptr<VideoRenderer> video_renderer(
- new VideoRendererImpl(message_loop_.message_loop_proxy(), &video_sink_,
- video_decoders.Pass(), false, new MediaLog()));
+ scoped_ptr<VideoRenderer> video_renderer(new VideoRendererImpl(
+ message_loop_.message_loop_proxy(), video_sink_.get(),
+ video_decoders.Pass(), false, new MediaLog()));
if (!clockless_playback_) {
audio_sink_ = new NullAudioSink(message_loop_.message_loop_proxy());
« no previous file with comments | « media/test/pipeline_integration_test_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698