Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: media/tools/player_wtl/movie.cc

Issue 6648004: DemuxerFactory is born! (Closed)
Patch Set: Responses to scherkus@ CR Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/media.gyp ('k') | media/tools/player_x11/player_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/tools/player_wtl/movie.cc
diff --git a/media/tools/player_wtl/movie.cc b/media/tools/player_wtl/movie.cc
index 2661e354258d023fb98d573f2cb5692223f3c415..671f4ab93f391a41cd0fb0c0428b8d12194c236b 100644
--- a/media/tools/player_wtl/movie.cc
+++ b/media/tools/player_wtl/movie.cc
@@ -12,7 +12,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"
@@ -20,7 +20,7 @@
using media::AudioRendererImpl;
using media::FFmpegAudioDecoder;
-using media::FFmpegDemuxer;
+using media::FFmpegDemuxerFactory;
using media::FFmpegVideoDecoder;
using media::FileDataSourceFactory;
using media::FilterCollection;
@@ -63,13 +63,16 @@ bool Movie::Open(const wchar_t* url, WtlVideoRenderer* video_renderer) {
message_loop_factory_.reset(new media::MessageLoopFactoryImpl());
+ MessageLoop* pipeline_loop =
+ message_loop_factory_->GetMessageLoop("PipelineThread");
+ pipeline_ = new PipelineImpl(pipeline_loop);
+
// Create filter collection.
scoped_ptr<FilterCollection> collection(new FilterCollection());
- collection->SetDataSourceFactory(new FileDataSourceFactory());
+ collection->SetDemuxerFactory(new FFmpegDemuxerFactory(
+ new FileDataSourceFactory(), pipeline_loop));
collection->AddAudioDecoder(new FFmpegAudioDecoder(
message_loop_factory_->GetMessageLoop("AudioDecoderThread")));
- collection->AddDemuxer(new FFmpegDemuxer(
- message_loop_factory_->GetMessageLoop("DemuxThread")));
collection->AddVideoDecoder(new FFmpegVideoDecoder(
message_loop_factory_->GetMessageLoop("VideoDecoderThread"), NULL));
@@ -80,9 +83,6 @@ bool Movie::Open(const wchar_t* url, WtlVideoRenderer* video_renderer) {
}
collection->AddVideoRenderer(video_renderer);
- pipeline_ = new PipelineImpl(
- message_loop_factory_->GetMessageLoop("PipelineThread"));
-
// Create and start our pipeline.
pipeline_->Start(collection.release(), WideToUTF8(std::wstring(url)), NULL);
while (true) {
« no previous file with comments | « media/media.gyp ('k') | media/tools/player_x11/player_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698