diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-18 18:17:04 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-18 18:17:04 +0000 |
commit | 7b6c1f34823084be5870e62e69639af53ce3537c (patch) | |
tree | c849f7cf6ea080f37a00f91f1f8e17ab44ac65bd /media | |
parent | c94cbbe7020a6e05ed40994bf8819053904d517c (diff) | |
download | chromium_src-7b6c1f34823084be5870e62e69639af53ce3537c.zip chromium_src-7b6c1f34823084be5870e62e69639af53ce3537c.tar.gz chromium_src-7b6c1f34823084be5870e62e69639af53ce3537c.tar.bz2 |
Make sure to use scoped_refptr for refcounted params in audio/video/remoting
BUG=28083
TEST=existing
Review URL: http://codereview.chromium.org/3821005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62949 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/base/pipeline_impl.cc | 8 | ||||
-rw-r--r-- | media/filters/decoder_base.h | 13 | ||||
-rw-r--r-- | media/filters/ffmpeg_demuxer.cc | 7 | ||||
-rw-r--r-- | media/filters/ffmpeg_video_decoder.cc | 11 | ||||
-rw-r--r-- | media/filters/omx_video_decoder.cc | 2 |
5 files changed, 27 insertions, 14 deletions
diff --git a/media/base/pipeline_impl.cc b/media/base/pipeline_impl.cc index bd9e9fe..5d7759c 100644 --- a/media/base/pipeline_impl.cc +++ b/media/base/pipeline_impl.cc @@ -93,8 +93,12 @@ bool PipelineImpl::Start(FilterFactory* factory, // Kick off initialization! running_ = true; - message_loop_->PostTask(FROM_HERE, - NewRunnableMethod(this, &PipelineImpl::StartTask, factory, url, + message_loop_->PostTask( + FROM_HERE, + NewRunnableMethod(this, + &PipelineImpl::StartTask, + make_scoped_refptr(factory), + url, callback.release())); return true; } diff --git a/media/filters/decoder_base.h b/media/filters/decoder_base.h index 60245ed..355bb06 100644 --- a/media/filters/decoder_base.h +++ b/media/filters/decoder_base.h @@ -30,21 +30,26 @@ class DecoderBase : public Decoder { // MediaFilter implementation. virtual void Stop(FilterCallback* callback) { - this->message_loop()->PostTask(FROM_HERE, + this->message_loop()->PostTask( + FROM_HERE, NewRunnableMethod(this, &DecoderBase::StopTask, callback)); } virtual void Seek(base::TimeDelta time, FilterCallback* callback) { - this->message_loop()->PostTask(FROM_HERE, + this->message_loop()->PostTask( + FROM_HERE, NewRunnableMethod(this, &DecoderBase::SeekTask, time, callback)); } // Decoder implementation. virtual void Initialize(DemuxerStream* demuxer_stream, FilterCallback* callback) { - this->message_loop()->PostTask(FROM_HERE, - NewRunnableMethod(this, &DecoderBase::InitializeTask, demuxer_stream, + this->message_loop()->PostTask( + FROM_HERE, + NewRunnableMethod(this, + &DecoderBase::InitializeTask, + make_scoped_refptr(demuxer_stream), callback)); } diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc index 797481b..5869e3a 100644 --- a/media/filters/ffmpeg_demuxer.cc +++ b/media/filters/ffmpeg_demuxer.cc @@ -310,8 +310,11 @@ void FFmpegDemuxer::OnAudioRendererDisabled() { void FFmpegDemuxer::Initialize(DataSource* data_source, FilterCallback* callback) { - message_loop()->PostTask(FROM_HERE, - NewRunnableMethod(this, &FFmpegDemuxer::InitializeTask, data_source, + message_loop()->PostTask( + FROM_HERE, + NewRunnableMethod(this, + &FFmpegDemuxer::InitializeTask, + make_scoped_refptr(data_source), callback)); } diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc index 4fe638f..68d2046 100644 --- a/media/filters/ffmpeg_video_decoder.cc +++ b/media/filters/ffmpeg_video_decoder.cc @@ -39,11 +39,12 @@ FFmpegVideoDecoder::~FFmpegVideoDecoder() { void FFmpegVideoDecoder::Initialize(DemuxerStream* demuxer_stream, FilterCallback* callback) { if (MessageLoop::current() != message_loop()) { - message_loop()->PostTask(FROM_HERE, - NewRunnableMethod(this, - &FFmpegVideoDecoder::Initialize, - demuxer_stream, - callback)); + message_loop()->PostTask( + FROM_HERE, + NewRunnableMethod(this, + &FFmpegVideoDecoder::Initialize, + make_scoped_refptr(demuxer_stream), + callback)); return; } diff --git a/media/filters/omx_video_decoder.cc b/media/filters/omx_video_decoder.cc index c3e4e14..eaa6169 100644 --- a/media/filters/omx_video_decoder.cc +++ b/media/filters/omx_video_decoder.cc @@ -64,7 +64,7 @@ void OmxVideoDecoder::Initialize(DemuxerStream* demuxer_stream, FROM_HERE, NewRunnableMethod(this, &OmxVideoDecoder::Initialize, - demuxer_stream, + make_scoped_refptr(demuxer_stream), callback)); return; } |