| Index: trunk/src/media/base/pipeline_unittest.cc
|
| ===================================================================
|
| --- trunk/src/media/base/pipeline_unittest.cc (revision 195011)
|
| +++ trunk/src/media/base/pipeline_unittest.cc (working copy)
|
| @@ -87,6 +87,9 @@
|
| demuxer_ = new MockDemuxer();
|
| filter_collection_->SetDemuxer(demuxer_);
|
|
|
| + video_decoder_ = new MockVideoDecoder();
|
| + filter_collection_->GetVideoDecoders()->push_back(video_decoder_);
|
| +
|
| video_renderer_ = new MockVideoRenderer();
|
| scoped_ptr<VideoRenderer> video_renderer(video_renderer_);
|
| filter_collection_->SetVideoRenderer(video_renderer.Pass());
|
| @@ -163,12 +166,14 @@
|
|
|
| // Sets up expectations to allow the video renderer to initialize.
|
| void InitializeVideoRenderer(const scoped_refptr<DemuxerStream>& stream) {
|
| - EXPECT_CALL(*video_renderer_, Initialize(stream, _, _, _, _, _, _, _, _))
|
| - .WillOnce(RunCallback<1>(PIPELINE_OK));
|
| + EXPECT_CALL(*video_renderer_,
|
| + Initialize(stream, _, _, _, _, _, _, _, _, _))
|
| + .WillOnce(RunCallback<2>(PIPELINE_OK));
|
| EXPECT_CALL(*video_renderer_, SetPlaybackRate(0.0f));
|
|
|
| // Startup sequence.
|
| - EXPECT_CALL(*video_renderer_, Preroll(demuxer_->GetStartTime(), _))
|
| + EXPECT_CALL(*video_renderer_,
|
| + Preroll(demuxer_->GetStartTime(), _))
|
| .WillOnce(RunCallback<1>(PIPELINE_OK));
|
| EXPECT_CALL(*video_renderer_, Play(_))
|
| .WillOnce(RunClosure<0>());
|
| @@ -296,6 +301,7 @@
|
|
|
| scoped_ptr<FilterCollection> filter_collection_;
|
| scoped_refptr<MockDemuxer> demuxer_;
|
| + scoped_refptr<MockVideoDecoder> video_decoder_;
|
| MockVideoRenderer* video_renderer_;
|
| MockAudioRenderer* audio_renderer_;
|
| scoped_refptr<StrictMock<MockDemuxerStream> > audio_stream_;
|
| @@ -1010,14 +1016,16 @@
|
|
|
| if (state == kInitVideoRenderer) {
|
| if (stop_or_error == kStop) {
|
| - EXPECT_CALL(*video_renderer_, Initialize(_, _, _, _, _, _, _, _, _))
|
| + EXPECT_CALL(*video_renderer_,
|
| + Initialize(_, _, _, _, _, _, _, _, _, _))
|
| .WillOnce(DoAll(Stop(pipeline_, stop_cb),
|
| - RunCallback<1>(PIPELINE_OK)));
|
| + RunCallback<2>(PIPELINE_OK)));
|
| EXPECT_CALL(callbacks_, OnStop());
|
| } else {
|
| status = PIPELINE_ERROR_INITIALIZATION_FAILED;
|
| - EXPECT_CALL(*video_renderer_, Initialize(_, _, _, _, _, _, _, _, _))
|
| - .WillOnce(RunCallback<1>(status));
|
| + EXPECT_CALL(*video_renderer_,
|
| + Initialize(_, _, _, _, _, _, _, _, _, _))
|
| + .WillOnce(RunCallback<2>(status));
|
| }
|
|
|
| EXPECT_CALL(*demuxer_, Stop(_)).WillOnce(RunClosure<0>());
|
| @@ -1026,8 +1034,9 @@
|
| return status;
|
| }
|
|
|
| - EXPECT_CALL(*video_renderer_, Initialize(_, _, _, _, _, _, _, _, _))
|
| - .WillOnce(RunCallback<1>(PIPELINE_OK));
|
| + EXPECT_CALL(*video_renderer_,
|
| + Initialize(_, _, _, _, _, _, _, _, _, _))
|
| + .WillOnce(RunCallback<2>(PIPELINE_OK));
|
|
|
| EXPECT_CALL(callbacks_, OnBufferingState(Pipeline::kHaveMetadata));
|
|
|
|
|