diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-21 22:33:47 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-21 22:33:47 +0000 |
commit | 7dd4c740735765a73f2b58e6518eed446730862b (patch) | |
tree | 51f02622aace9a0337e8823c5b502e15523f8d40 /media/tools | |
parent | cc2ba3a7e0fda5e0fd6916ff4f450d14e2fc379b (diff) | |
download | chromium_src-7dd4c740735765a73f2b58e6518eed446730862b.zip chromium_src-7dd4c740735765a73f2b58e6518eed446730862b.tar.gz chromium_src-7dd4c740735765a73f2b58e6518eed446730862b.tar.bz2 |
Remove reference counting from media::AudioDecoder and friends.
This also changes AudioRenderer to no longer accept a list of AudioDecoders during Initialize(). Instead we now pass them into AudioRendererImpl during construction.
BUG=173313
Review URL: https://codereview.chromium.org/12964004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/tools')
-rw-r--r-- | media/tools/player_x11/player_x11.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/media/tools/player_x11/player_x11.cc b/media/tools/player_x11/player_x11.cc index 7b6e5c5..808626a 100644 --- a/media/tools/player_x11/player_x11.cc +++ b/media/tools/player_x11/player_x11.cc @@ -11,6 +11,7 @@ #include "base/command_line.h" #include "base/files/file_path.h" #include "base/memory/scoped_ptr.h" +#include "base/memory/scoped_vector.h" #include "base/threading/platform_thread.h" #include "base/threading/thread.h" #include "media/audio/audio_manager.h" @@ -112,8 +113,6 @@ bool InitPipeline(const scoped_refptr<base::MessageLoopProxy>& message_loop, media::FFmpegNeedKeyCB need_key_cb = base::Bind(&NeedKey); collection->SetDemuxer(new media::FFmpegDemuxer(message_loop, data_source, need_key_cb)); - collection->GetAudioDecoders()->push_back(new media::FFmpegAudioDecoder( - message_loop)); collection->GetVideoDecoders()->push_back(new media::FFmpegVideoDecoder( message_loop)); @@ -126,9 +125,12 @@ bool InitPipeline(const scoped_refptr<base::MessageLoopProxy>& message_loop, true)); collection->SetVideoRenderer(video_renderer.Pass()); + ScopedVector<media::AudioDecoder> audio_decoders; + audio_decoders.push_back(new media::FFmpegAudioDecoder(message_loop)); scoped_ptr<media::AudioRenderer> audio_renderer(new media::AudioRendererImpl( message_loop, new media::NullAudioSink(message_loop), + audio_decoders.Pass(), media::SetDecryptorReadyCB())); collection->SetAudioRenderer(audio_renderer.Pass()); |