summaryrefslogtreecommitdiffstats
path: root/media/test/pipeline_integration_test_base.h
diff options
context:
space:
mode:
authordalecurtis <dalecurtis@chromium.org>2015-04-15 14:14:40 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-15 21:15:25 +0000
commit45a3c93f745eabf6c1b1cbdac87ed4350a919e76 (patch)
tree719f8b62792e5e4f59d8bf9fa45eba3327ebcd98 /media/test/pipeline_integration_test_base.h
parent7ed1f876f6f4d79ac074b25f2066d514603aa18d (diff)
downloadchromium_src-45a3c93f745eabf6c1b1cbdac87ed4350a919e76.zip
chromium_src-45a3c93f745eabf6c1b1cbdac87ed4350a919e76.tar.gz
chromium_src-45a3c93f745eabf6c1b1cbdac87ed4350a919e76.tar.bz2
Prime the landing pad for the new video rendering pipeline.
This is not a functional change, it only updates the interfaces and call sites in preparation for switching to a vsync based video rendering pipeline. Some notes: - Plumbs a VideoRendererSink into the the rendering pipeline; similar to how we have an AudioRendererSink. - A couple VideoRendererSink mocks are introduced which will be short lived. Like audio, we will need fakes which can pump consumption tasks. - The "PaintCB" callback has been temporarily placed on the new sink interface such that in the field experiments can be run comparing the performance of the video rendering approaches. - Finally nukes Player_X11 since setting up a vsync renderer just for unused tool code isn't worth the effort. - Since compositor callbacks may stop due to visibility changes, the new VideoRendererImpl will use a countdown timer to pump video playback as frames expire; expired frames will not count as dropped. - Since canvas/WebGL requires frame updates in the background a new method has been added to VideoFrameCompositor to return the current frame if it was updated with 250ms, or to request a new one and return the updated one. Subsequent work: - sunnyps@ will be switching VideoFrameProviderClientImpl over to using a BeginFrameObserver, which will ultimately drive the Render() callbacks. - dalecurtis@ will land the VideoRendererAlgorithm which powers the new rendering pipeline. BUG=439548 TEST=everything works as is. Review URL: https://codereview.chromium.org/1053113002 Cr-Commit-Position: refs/heads/master@{#325306}
Diffstat (limited to 'media/test/pipeline_integration_test_base.h')
-rw-r--r--media/test/pipeline_integration_test_base.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/media/test/pipeline_integration_test_base.h b/media/test/pipeline_integration_test_base.h
index c8ca915..aa41337 100644
--- a/media/test/pipeline_integration_test_base.h
+++ b/media/test/pipeline_integration_test_base.h
@@ -45,6 +45,20 @@ class DummyTickClock : public base::TickClock {
base::TimeTicks now_;
};
+// TODO(dalecurtis): Mocks won't be useful for the new rendering path, we'll
+// need fake callback generators like we have for the audio path.
+// http://crbug.com/473424
+class MockVideoRendererSink : public VideoRendererSink {
+ public:
+ MockVideoRendererSink();
+ ~MockVideoRendererSink() override;
+
+ MOCK_METHOD1(Start, void(VideoRendererSink::RenderCallback*));
+ MOCK_METHOD0(Stop, void());
+ MOCK_METHOD1(PaintFrameUsingOldRenderingPath,
+ void(const scoped_refptr<VideoFrame>&));
+};
+
// Integration tests for Pipeline. Real demuxers, real decoders, and
// base renderer implementations are used to verify pipeline functionality. The
// renderers used in these tests rely heavily on the AudioRendererBase &
@@ -105,6 +119,7 @@ class PipelineIntegrationTestBase {
scoped_ptr<Pipeline> pipeline_;
scoped_refptr<NullAudioSink> audio_sink_;
scoped_refptr<ClocklessAudioSink> clockless_audio_sink_;
+ testing::NiceMock<MockVideoRendererSink> video_sink_;
bool ended_;
PipelineStatus pipeline_status_;
Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb_;