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

Unified Diff: media/filters/video_renderer_unittest.cc

Issue 27120: Added IsEndOfStream and IsDiscontiguous flags to buffers. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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/filters/video_renderer_base.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_renderer_unittest.cc
===================================================================
--- media/filters/video_renderer_unittest.cc (revision 10301)
+++ media/filters/video_renderer_unittest.cc (working copy)
@@ -52,3 +52,27 @@
EXPECT_LT(test_renderer->unique_frames(), num_expected_frames + 3);
}
+TEST(VideoRenderer, SingleVideoFrame) {
+ base::TimeDelta test_time = base::TimeDelta::FromMilliseconds(100);
+ std::string url("");
+ PipelineImpl p;
+ scoped_refptr<TestVideoRenderer> test_renderer = new TestVideoRenderer();
+ MockFilterConfig config;
+ config.media_duration = config.frame_duration;
+ scoped_refptr<FilterFactoryCollection> c = new FilterFactoryCollection();
+ c->AddFactory(MockDataSource::CreateFactory(&config));
+ c->AddFactory(MockDemuxer::CreateFactory(&config));
+ c->AddFactory(MockAudioDecoder::CreateFactory(&config));
+ c->AddFactory(MockAudioRenderer::CreateFactory(&config));
+ c->AddFactory(MockVideoDecoder::CreateFactory(&config));
+ c->AddFactory(new InstanceFilterFactory<TestVideoRenderer>(test_renderer));
+ media::InitializationHelper h;
+ h.Start(&p, c, url);
+ h.TimedWait(base::TimeDelta::FromSeconds(1));
+ EXPECT_TRUE(p.IsInitialized());
+ p.SetPlaybackRate(1.0f);
+ PlatformThread::Sleep(static_cast<int>(test_time.InMilliseconds()));
+ p.Stop();
+ EXPECT_EQ(test_renderer->unique_frames(), 1u);
+ EXPECT_EQ(test_renderer->paint_called(), 1u);
+}
« no previous file with comments | « media/filters/video_renderer_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698