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

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

Issue 9597016: Fold media::MessageLoopFactoryImpl into media::MessageLoopFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 8 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 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "base/threading/platform_thread.h" 8 #include "base/threading/platform_thread.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "media/audio/audio_manager.h" 10 #include "media/audio/audio_manager.h"
11 #include "media/base/filter_collection.h" 11 #include "media/base/filter_collection.h"
12 #include "media/base/media_log.h" 12 #include "media/base/media_log.h"
13 #include "media/base/message_loop_factory_impl.h" 13 #include "media/base/message_loop_factory.h"
14 #include "media/base/pipeline.h" 14 #include "media/base/pipeline.h"
15 #include "media/filters/ffmpeg_audio_decoder.h" 15 #include "media/filters/ffmpeg_audio_decoder.h"
16 #include "media/filters/ffmpeg_demuxer_factory.h" 16 #include "media/filters/ffmpeg_demuxer_factory.h"
17 #include "media/filters/ffmpeg_video_decoder.h" 17 #include "media/filters/ffmpeg_video_decoder.h"
18 #include "media/filters/file_data_source.h" 18 #include "media/filters/file_data_source.h"
19 #include "media/filters/null_audio_renderer.h" 19 #include "media/filters/null_audio_renderer.h"
20 #include "media/filters/video_renderer_base.h" 20 #include "media/filters/video_renderer_base.h"
21 21
22 using media::FFmpegAudioDecoder; 22 using media::FFmpegAudioDecoder;
23 using media::FFmpegDemuxerFactory; 23 using media::FFmpegDemuxerFactory;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 movie_dib_ = hbmp; 55 movie_dib_ = hbmp;
56 movie_hwnd_ = hwnd; 56 movie_hwnd_ = hwnd;
57 } 57 }
58 58
59 bool Movie::Open(const wchar_t* url, VideoRendererBase* video_renderer) { 59 bool Movie::Open(const wchar_t* url, VideoRendererBase* video_renderer) {
60 // Close previous movie. 60 // Close previous movie.
61 if (pipeline_) { 61 if (pipeline_) {
62 Close(); 62 Close();
63 } 63 }
64 64
65 message_loop_factory_.reset(new media::MessageLoopFactoryImpl()); 65 message_loop_factory_.reset(new media::MessageLoopFactory());
66 66
67 MessageLoop* pipeline_loop = 67 MessageLoop* pipeline_loop =
68 message_loop_factory_->GetMessageLoop("PipelineThread"); 68 message_loop_factory_->GetMessageLoop("PipelineThread");
69 pipeline_ = new Pipeline(pipeline_loop, new media::MediaLog()); 69 pipeline_ = new Pipeline(pipeline_loop, new media::MediaLog());
70 70
71 // Open the file. 71 // Open the file.
72 std::string url_utf8 = WideToUTF8(string16(url)); 72 std::string url_utf8 = WideToUTF8(string16(url));
73 scoped_refptr<FileDataSource> data_source = new FileDataSource(); 73 scoped_refptr<FileDataSource> data_source = new FileDataSource();
74 if (data_source->Initialize(url_utf8) != PIPELINE_OK) { 74 if (data_source->Initialize(url_utf8) != PIPELINE_OK) {
75 return false; 75 return false;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 void Movie::Close() { 182 void Movie::Close() {
183 if (pipeline_) { 183 if (pipeline_) {
184 pipeline_->Stop(media::PipelineStatusCB()); 184 pipeline_->Stop(media::PipelineStatusCB());
185 pipeline_ = NULL; 185 pipeline_ = NULL;
186 } 186 }
187 187
188 message_loop_factory_.reset(); 188 message_loop_factory_.reset();
189 } 189 }
190 190
191 } // namespace media 191 } // 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