Chromium Code Reviews| Index: media/tools/player_x11/player_x11.cc |
| diff --git a/media/tools/player_x11/player_x11.cc b/media/tools/player_x11/player_x11.cc |
| index ea88c6594e4c5c617d2ac069853313c9a0268582..53f6029ee0fa62a5e3bab8bdb30608acbe79b21a 100644 |
| --- a/media/tools/player_x11/player_x11.cc |
| +++ b/media/tools/player_x11/player_x11.cc |
| @@ -21,7 +21,7 @@ |
| #include "media/base/pipeline_impl.h" |
| #include "media/filters/audio_renderer_impl.h" |
| #include "media/filters/ffmpeg_audio_decoder.h" |
| -#include "media/filters/ffmpeg_demuxer.h" |
| +#include "media/filters/ffmpeg_demuxer_factory.h" |
| #include "media/filters/ffmpeg_video_decoder.h" |
| #include "media/filters/file_data_source_factory.h" |
| #include "media/filters/null_audio_renderer.h" |
| @@ -100,12 +100,15 @@ bool InitPipeline(MessageLoop* message_loop, |
| return false; |
| } |
| + // Create the pipeline. |
| + *pipeline = new media::PipelineImpl(message_loop); |
|
acolwell GONE FROM CHROMIUM
2011/03/08 21:48:09
Move back if FFmpegDemuxerFactory doesn't need Fil
Ami GONE FROM CHROMIUM
2011/03/08 22:44:48
Done.
|
| + |
| // Create our filter factories. |
| scoped_ptr<media::FilterCollection> collection( |
| new media::FilterCollection()); |
| - collection->SetDataSourceFactory(new media::FileDataSourceFactory()); |
| - collection->AddDemuxer(new media::FFmpegDemuxer( |
| - message_loop_factory->GetMessageLoop("DemuxThread"))); |
| + collection->SetDemuxerFactory( |
| + new media::FFmpegDemuxerFactory( |
| + new media::FileDataSourceFactory(), message_loop, pipeline->get())); |
| collection->AddAudioDecoder(new media::FFmpegAudioDecoder( |
| message_loop_factory->GetMessageLoop("AudioDecoderThread"))); |
| if (CommandLine::ForCurrentProcess()->HasSwitch( |
| @@ -127,8 +130,7 @@ bool InitPipeline(MessageLoop* message_loop, |
| else |
| collection->AddAudioRenderer(new media::NullAudioRenderer()); |
| - // Creates the pipeline and start it. |
| - *pipeline = new media::PipelineImpl(message_loop); |
| + // Start the pipeline. |
| (*pipeline)->Start(collection.release(), filename, NULL); |
| // Wait until the pipeline is fully initialized. |
| @@ -137,6 +139,7 @@ bool InitPipeline(MessageLoop* message_loop, |
| if ((*pipeline)->IsInitialized()) |
| break; |
| if ((*pipeline)->GetError() != media::PIPELINE_OK) { |
| + std::cout << "InitPipeline: " << (*pipeline)->GetError() << std::endl; |
|
acolwell GONE FROM CHROMIUM
2011/03/08 21:48:09
remove
Ami GONE FROM CHROMIUM
2011/03/08 22:44:48
Keeping; it's useful for figuring out what went wr
acolwell GONE FROM CHROMIUM
2011/03/08 23:19:00
Sounds good to me.
|
| (*pipeline)->Stop(NULL); |
| return false; |
| } |