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

Side by Side Diff: media/tools/player_wtl/movie.cc

Issue 5527003: Rename MediaFilter and MediaFilterCollection to Filter and FilterCollection, respectively. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: Missed a few more Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/media.gyp ('k') | media/tools/player_x11/player_x11.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/tools/player_wtl/movie.h" 5 #include "media/tools/player_wtl/movie.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "media/base/pipeline_impl.h" 8 #include "media/base/pipeline_impl.h"
9 #include "media/filters/audio_renderer_impl.h" 9 #include "media/filters/audio_renderer_impl.h"
10 #include "media/filters/ffmpeg_audio_decoder.h" 10 #include "media/filters/ffmpeg_audio_decoder.h"
11 #include "media/filters/ffmpeg_demuxer.h" 11 #include "media/filters/ffmpeg_demuxer.h"
12 #include "media/filters/ffmpeg_video_decoder.h" 12 #include "media/filters/ffmpeg_video_decoder.h"
13 #include "media/filters/file_data_source.h" 13 #include "media/filters/file_data_source.h"
14 #include "media/filters/null_audio_renderer.h" 14 #include "media/filters/null_audio_renderer.h"
15 #include "media/tools/player_wtl/wtl_renderer.h" 15 #include "media/tools/player_wtl/wtl_renderer.h"
16 16
17 using media::AudioRendererImpl; 17 using media::AudioRendererImpl;
18 using media::FFmpegAudioDecoder; 18 using media::FFmpegAudioDecoder;
19 using media::FFmpegDemuxer; 19 using media::FFmpegDemuxer;
20 using media::FFmpegVideoDecoder; 20 using media::FFmpegVideoDecoder;
21 using media::FileDataSource; 21 using media::FileDataSource;
22 using media::MediaFilterCollection; 22 using media::FilterCollection;
23 using media::PipelineImpl; 23 using media::PipelineImpl;
24 24
25 namespace media { 25 namespace media {
26 26
27 Movie::Movie() 27 Movie::Movie()
28 : enable_audio_(true), 28 : enable_audio_(true),
29 enable_draw_(true), 29 enable_draw_(true),
30 enable_dump_yuv_file_(false), 30 enable_dump_yuv_file_(false),
31 enable_pause_(false), 31 enable_pause_(false),
32 max_threads_(0), 32 max_threads_(0),
(...skipping 14 matching lines...) Expand all
47 movie_hwnd_ = hwnd; 47 movie_hwnd_ = hwnd;
48 } 48 }
49 49
50 bool Movie::Open(const wchar_t* url, WtlVideoRenderer* video_renderer) { 50 bool Movie::Open(const wchar_t* url, WtlVideoRenderer* video_renderer) {
51 // Close previous movie. 51 // Close previous movie.
52 if (pipeline_) { 52 if (pipeline_) {
53 Close(); 53 Close();
54 } 54 }
55 55
56 // Create filter collection. 56 // Create filter collection.
57 scoped_ptr<MediaFilterCollection> collection(new MediaFilterCollection()); 57 scoped_ptr<FilterCollection> collection(new FilterCollection());
58 collection->AddDataSource(new FileDataSource()); 58 collection->AddDataSource(new FileDataSource());
59 collection->AddAudioDecoder(new FFmpegAudioDecoder()); 59 collection->AddAudioDecoder(new FFmpegAudioDecoder());
60 collection->AddDemuxer(new FFmpegDemuxer()); 60 collection->AddDemuxer(new FFmpegDemuxer());
61 collection->AddVideoDecoder(new FFmpegVideoDecoder(NULL)); 61 collection->AddVideoDecoder(new FFmpegVideoDecoder(NULL));
62 62
63 if (enable_audio_) { 63 if (enable_audio_) {
64 collection->AddAudioRenderer(new AudioRendererImpl()); 64 collection->AddAudioRenderer(new AudioRendererImpl());
65 } else { 65 } else {
66 collection->AddAudioRenderer(new media::NullAudioRenderer()); 66 collection->AddAudioRenderer(new media::NullAudioRenderer());
67 } 67 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 void Movie::Close() { 161 void Movie::Close() {
162 if (pipeline_) { 162 if (pipeline_) {
163 pipeline_->Stop(NULL); 163 pipeline_->Stop(NULL);
164 thread_->Stop(); 164 thread_->Stop();
165 pipeline_ = NULL; 165 pipeline_ = NULL;
166 thread_.reset(); 166 thread_.reset();
167 } 167 }
168 } 168 }
169 169
170 } // namespace media 170 } // namespace media
OLDNEW
« 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