summaryrefslogtreecommitdiffstats
path: root/media/renderers/renderer_impl_unittest.cc
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/renderers/renderer_impl_unittest.cc
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/renderers/renderer_impl_unittest.cc')
-rw-r--r--media/renderers/renderer_impl_unittest.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/media/renderers/renderer_impl_unittest.cc b/media/renderers/renderer_impl_unittest.cc
index 75fc050..9fcefe4 100644
--- a/media/renderers/renderer_impl_unittest.cc
+++ b/media/renderers/renderer_impl_unittest.cc
@@ -49,7 +49,6 @@ class RendererImplTest : public ::testing::Test {
MOCK_METHOD1(OnError, void(PipelineStatus));
MOCK_METHOD1(OnUpdateStatistics, void(const PipelineStatistics&));
MOCK_METHOD1(OnBufferingStateChange, void(BufferingState));
- MOCK_METHOD1(OnVideoFramePaint, void(const scoped_refptr<VideoFrame>&));
MOCK_METHOD0(OnWaitingForDecryptionKey, void());
private:
@@ -98,9 +97,9 @@ class RendererImplTest : public ::testing::Test {
// Sets up expectations to allow the video renderer to initialize.
void SetVideoRendererInitializeExpectations(PipelineStatus status) {
EXPECT_CALL(*video_renderer_,
- Initialize(video_stream_.get(), _, _, _, _, _, _, _, _, _))
+ Initialize(video_stream_.get(), _, _, _, _, _, _, _, _))
.WillOnce(DoAll(SaveArg<4>(&video_buffering_state_cb_),
- SaveArg<6>(&video_ended_cb_), RunCallback<1>(status)));
+ SaveArg<5>(&video_ended_cb_), RunCallback<1>(status)));
}
void InitializeAndExpect(PipelineStatus start_status) {
@@ -122,8 +121,6 @@ class RendererImplTest : public ::testing::Test {
base::Unretained(&callbacks_)),
base::Bind(&CallbackHelper::OnBufferingStateChange,
base::Unretained(&callbacks_)),
- base::Bind(&CallbackHelper::OnVideoFramePaint,
- base::Unretained(&callbacks_)),
base::Bind(&CallbackHelper::OnEnded, base::Unretained(&callbacks_)),
base::Bind(&CallbackHelper::OnError, base::Unretained(&callbacks_)),
base::Bind(&CallbackHelper::OnWaitingForDecryptionKey,
@@ -475,10 +472,10 @@ TEST_F(RendererImplTest, ErrorDuringInitialize) {
// Force an audio error to occur during video renderer initialization.
EXPECT_CALL(*video_renderer_,
- Initialize(video_stream_.get(), _, _, _, _, _, _, _, _, _))
+ Initialize(video_stream_.get(), _, _, _, _, _, _, _, _))
.WillOnce(DoAll(AudioError(&audio_error_cb_, PIPELINE_ERROR_DECODE),
SaveArg<4>(&video_buffering_state_cb_),
- SaveArg<6>(&video_ended_cb_),
+ SaveArg<5>(&video_ended_cb_),
RunCallback<1>(PIPELINE_OK)));
InitializeAndExpect(PIPELINE_ERROR_DECODE);