diff options
Diffstat (limited to 'media')
-rw-r--r-- | media/audio/audio_manager_base.cc | 2 | ||||
-rw-r--r-- | media/filters/ffmpeg_demuxer.cc | 26 | ||||
-rw-r--r-- | media/filters/video_renderer_base_unittest.cc | 14 | ||||
-rw-r--r-- | media/tools/shader_bench/shader_bench.cc | 6 |
4 files changed, 27 insertions, 21 deletions
diff --git a/media/audio/audio_manager_base.cc b/media/audio/audio_manager_base.cc index 2a8f031..220e0b6 100644 --- a/media/audio/audio_manager_base.cc +++ b/media/audio/audio_manager_base.cc @@ -264,7 +264,7 @@ AudioOutputStream* AudioManagerBase::MakeAudioOutputStreamProxy( CompareByParams(dispatcher_params)); if (it != output_dispatchers_.end()) { delete dispatcher_params; - return new AudioOutputProxy((*it)->dispatcher); + return new AudioOutputProxy((*it)->dispatcher.get()); } const base::TimeDelta kCloseDelay = diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc index 2bae64e..508dd09 100644 --- a/media/filters/ffmpeg_demuxer.cc +++ b/media/filters/ffmpeg_demuxer.cc @@ -336,9 +336,13 @@ void FFmpegDemuxer::Seek(base::TimeDelta time, const PipelineStatusCB& cb) { // the lowest-index audio stream. pending_seek_ = true; base::PostTaskAndReplyWithResult( - blocking_thread_.message_loop_proxy(), FROM_HERE, - base::Bind(&av_seek_frame, glue_->format_context(), -1, - time.InMicroseconds(), flags), + blocking_thread_.message_loop_proxy().get(), + FROM_HERE, + base::Bind(&av_seek_frame, + glue_->format_context(), + -1, + time.InMicroseconds(), + flags), base::Bind(&FFmpegDemuxer::OnSeekFrameDone, weak_this_, cb)); } @@ -379,7 +383,8 @@ void FFmpegDemuxer::Initialize(DemuxerHost* host, // Open the AVFormatContext using our glue layer. CHECK(blocking_thread_.Start()); base::PostTaskAndReplyWithResult( - blocking_thread_.message_loop_proxy(), FROM_HERE, + blocking_thread_.message_loop_proxy().get(), + FROM_HERE, base::Bind(&FFmpegGlue::OpenContext, base::Unretained(glue_.get())), base::Bind(&FFmpegDemuxer::OnOpenContextDone, weak_this_, status_cb)); } @@ -456,8 +461,10 @@ void FFmpegDemuxer::OnOpenContextDone(const PipelineStatusCB& status_cb, // Fully initialize AVFormatContext by parsing the stream a little. base::PostTaskAndReplyWithResult( - blocking_thread_.message_loop_proxy(), FROM_HERE, - base::Bind(&avformat_find_stream_info, glue_->format_context(), + blocking_thread_.message_loop_proxy().get(), + FROM_HERE, + base::Bind(&avformat_find_stream_info, + glue_->format_context(), static_cast<AVDictionary**>(NULL)), base::Bind(&FFmpegDemuxer::OnFindStreamInfoDone, weak_this_, status_cb)); } @@ -620,10 +627,11 @@ void FFmpegDemuxer::ReadFrameIfNeeded() { pending_read_ = true; base::PostTaskAndReplyWithResult( - blocking_thread_.message_loop_proxy(), FROM_HERE, + blocking_thread_.message_loop_proxy().get(), + FROM_HERE, base::Bind(&av_read_frame, glue_->format_context(), packet_ptr), - base::Bind(&FFmpegDemuxer::OnReadFrameDone, weak_this_, - base::Passed(&packet))); + base::Bind( + &FFmpegDemuxer::OnReadFrameDone, weak_this_, base::Passed(&packet))); } void FFmpegDemuxer::OnReadFrameDone(ScopedAVPacket packet, int result) { diff --git a/media/filters/video_renderer_base_unittest.cc b/media/filters/video_renderer_base_unittest.cc index c108fc2..a5004de 100644 --- a/media/filters/video_renderer_base_unittest.cc +++ b/media/filters/video_renderer_base_unittest.cc @@ -509,14 +509,14 @@ TEST_F(VideoRendererBaseTest, Preroll_RightAfter) { TEST_F(VideoRendererBaseTest, GetCurrentFrame_Initialized) { Initialize(); - EXPECT_TRUE(GetCurrentFrame()); // Due to prerolling. + EXPECT_TRUE(GetCurrentFrame().get()); // Due to prerolling. Shutdown(); } TEST_F(VideoRendererBaseTest, GetCurrentFrame_Playing) { Initialize(); Play(); - EXPECT_TRUE(GetCurrentFrame()); + EXPECT_TRUE(GetCurrentFrame().get()); Shutdown(); } @@ -524,7 +524,7 @@ TEST_F(VideoRendererBaseTest, GetCurrentFrame_Paused) { Initialize(); Play(); Pause(); - EXPECT_TRUE(GetCurrentFrame()); + EXPECT_TRUE(GetCurrentFrame().get()); Shutdown(); } @@ -536,7 +536,7 @@ TEST_F(VideoRendererBaseTest, GetCurrentFrame_Flushed) { // Frame shouldn't be updated. ResetCurrentFrame(); Flush(); - EXPECT_FALSE(GetCurrentFrame()); + EXPECT_FALSE(GetCurrentFrame().get()); Shutdown(); } @@ -553,7 +553,7 @@ TEST_F(VideoRendererBaseTest, GetCurrentFrame_EndOfStream) { // Frame shouldn't be updated. ResetCurrentFrame(); Preroll(0, PIPELINE_OK); - EXPECT_FALSE(GetCurrentFrame()); + EXPECT_FALSE(GetCurrentFrame().get()); // Start playing, we should immediately get notified of end of stream. Play(); @@ -568,7 +568,7 @@ TEST_F(VideoRendererBaseTest, GetCurrentFrame_Shutdown) { // Frame shouldn't be updated. ResetCurrentFrame(); Shutdown(); - EXPECT_FALSE(GetCurrentFrame()); + EXPECT_FALSE(GetCurrentFrame().get()); } // Stop() is called immediately during an error. @@ -578,7 +578,7 @@ TEST_F(VideoRendererBaseTest, GetCurrentFrame_Error) { // Frame shouldn't be updated. ResetCurrentFrame(); Stop(); - EXPECT_FALSE(GetCurrentFrame()); + EXPECT_FALSE(GetCurrentFrame().get()); } // Verify that a late decoder response doesn't break invariants in the renderer. diff --git a/media/tools/shader_bench/shader_bench.cc b/media/tools/shader_bench/shader_bench.cc index 813f6eb..d033357 100644 --- a/media/tools/shader_bench/shader_bench.cc +++ b/media/tools/shader_bench/shader_bench.cc @@ -130,11 +130,9 @@ int main(int argc, char** argv) { gfx::GLSurface::InitializeOneOff(); scoped_ptr<media::Window> window(new media::Window(width, height)); gfx::GLSurface* surface = - gfx::GLSurface::CreateViewGLSurface(false, window->PluginWindow()); + gfx::GLSurface::CreateViewGLSurface(false, window->PluginWindow()).get(); gfx::GLContext* context = gfx::GLContext::CreateGLContext( - NULL, - surface, - gfx::PreferDiscreteGpu); + NULL, surface, gfx::PreferDiscreteGpu).get(); context->MakeCurrent(surface); // This sets D3DPRESENT_INTERVAL_IMMEDIATE on Windows. context->SetSwapInterval(0); |