diff options
author | xhwang <xhwang@chromium.org> | 2014-08-28 18:44:15 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-29 01:45:28 +0000 |
commit | 5980590f8c9a20b07192d9f36d33053b1b3ff8c8 (patch) | |
tree | 3b96696d39630b055e780a211f1b0139870c1b70 /media/tools | |
parent | ea12516899b23b38bcd006b9b462eaead73f4cb5 (diff) | |
download | chromium_src-5980590f8c9a20b07192d9f36d33053b1b3ff8c8.zip chromium_src-5980590f8c9a20b07192d9f36d33053b1b3ff8c8.tar.gz chromium_src-5980590f8c9a20b07192d9f36d33053b1b3ff8c8.tar.bz2 |
media: Remove FilterCollection.
Now we pass Demuxer and Renderer directly into Pipeline, and create TextRenderer
directly in Pipeline. As a result, we don't need FilterCollection anymore.
BUG=408602
TEST=All existing tests pass.
Review URL: https://codereview.chromium.org/511323003
Cr-Commit-Position: refs/heads/master@{#292542}
Diffstat (limited to 'media/tools')
-rw-r--r-- | media/tools/player_x11/player_x11.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/media/tools/player_x11/player_x11.cc b/media/tools/player_x11/player_x11.cc index f60d115..11959da 100644 --- a/media/tools/player_x11/player_x11.cc +++ b/media/tools/player_x11/player_x11.cc @@ -19,11 +19,12 @@ #include "media/base/audio_hardware_config.h" #include "media/base/bind_to_current_loop.h" #include "media/base/decryptor.h" -#include "media/base/filter_collection.h" #include "media/base/media.h" #include "media/base/media_log.h" #include "media/base/media_switches.h" #include "media/base/pipeline.h" +#include "media/base/text_track.h" +#include "media/base/text_track_config.h" #include "media/base/video_frame.h" #include "media/filters/audio_renderer_impl.h" #include "media/filters/ffmpeg_audio_decoder.h" @@ -39,6 +40,7 @@ // in media::DemuxerStream & media::AudioDecoder. #include <X11/XKBlib.h> #include <X11/Xlib.h> + #include "media/tools/player_x11/gl_video_renderer.h" #include "media/tools/player_x11/x11_video_renderer.h" @@ -89,6 +91,10 @@ static void OnMetadata(media::PipelineMetadata metadata) {} static void OnBufferingStateChanged(media::BufferingState buffering_state) {} +static void OnAddTextTrack(const media::TextTrackConfig& config, + const media::AddTextTrackDoneCB& done_cb) { +} + static void NeedKey(const std::string& type, const std::vector<uint8>& init_data) { std::cout << "File is encrypted." << std::endl; @@ -108,11 +114,6 @@ void InitPipeline( media::Demuxer* demuxer, const media::VideoRendererImpl::PaintCB& paint_cb, bool /* enable_audio */) { - // Create our filter factories. - scoped_ptr<media::FilterCollection> collection( - new media::FilterCollection()); - collection->SetDemuxer(demuxer); - ScopedVector<media::VideoDecoder> video_decoders; video_decoders.push_back(new media::FFmpegVideoDecoder(task_runner)); scoped_ptr<media::VideoRenderer> video_renderer( @@ -143,18 +144,18 @@ void InitPipeline( scoped_ptr<media::Renderer> renderer(new media::RendererImpl( task_runner, demuxer, audio_renderer.Pass(), video_renderer.Pass())); - collection->SetRenderer(renderer.Pass()); - base::WaitableEvent event(true, false); media::PipelineStatus status; - pipeline->Start(collection.Pass(), + pipeline->Start(demuxer, + renderer.Pass(), base::Bind(&DoNothing), base::Bind(&OnStatus), base::Bind(&SaveStatusAndSignal, &event, &status), base::Bind(&OnMetadata), base::Bind(&OnBufferingStateChanged), - base::Bind(&DoNothing)); + base::Bind(&DoNothing), + base::Bind(&OnAddTextTrack)); // Wait until the pipeline is fully initialized. event.Wait(); |