diff options
author | gunsch <gunsch@chromium.org> | 2015-04-14 23:03:44 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-15 06:04:08 +0000 |
commit | 24413fda915450e43423cfe3902f887b6a937ae8 (patch) | |
tree | c3d8d8f27de7604be1669bf183951c37b2f04b97 /media/renderers/renderer_impl_unittest.cc | |
parent | ff64870bf291b14c2a69768ee6e1124468edc129 (diff) | |
download | chromium_src-24413fda915450e43423cfe3902f887b6a937ae8.zip chromium_src-24413fda915450e43423cfe3902f887b6a937ae8.tar.gz chromium_src-24413fda915450e43423cfe3902f887b6a937ae8.tar.bz2 |
Revert of Prime the landing pad for the new video rendering pipeline. (patchset #9 id:200001 of https://codereview.chromium.org/1053113002/)
Reason for revert:
Actually, given the complexity of this change (not a one-line Cast fix) and the fact that we have broken Cast trybots running @ 100% right now (http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/), I'm going to revert this. I'm working on a brief patch of what I expect would need to be done for Cast and will upload/mail shortly.
Original issue's description:
> 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.
>
> Committed: https://crrev.com/e7f41df2541aea7c99f7965874f9c5ce901899e5
> Cr-Commit-Position: refs/heads/master@{#325183}
TBR=xhwang@chromium.org,sunnyps@chromium.org,brianderson@chromium.org,enne@chromium.org,dpranke@chromium.org,danakj@chromium.org,dalecurtis@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=439548
Review URL: https://codereview.chromium.org/1052493005
Cr-Commit-Position: refs/heads/master@{#325187}
Diffstat (limited to 'media/renderers/renderer_impl_unittest.cc')
-rw-r--r-- | media/renderers/renderer_impl_unittest.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/media/renderers/renderer_impl_unittest.cc b/media/renderers/renderer_impl_unittest.cc index 9fcefe4..75fc050 100644 --- a/media/renderers/renderer_impl_unittest.cc +++ b/media/renderers/renderer_impl_unittest.cc @@ -49,6 +49,7 @@ 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: @@ -97,9 +98,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<5>(&video_ended_cb_), RunCallback<1>(status))); + SaveArg<6>(&video_ended_cb_), RunCallback<1>(status))); } void InitializeAndExpect(PipelineStatus start_status) { @@ -121,6 +122,8 @@ 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, @@ -472,10 +475,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<5>(&video_ended_cb_), + SaveArg<6>(&video_ended_cb_), RunCallback<1>(PIPELINE_OK))); InitializeAndExpect(PIPELINE_ERROR_DECODE); |