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

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

Issue 10808087: Remove use of PipelineStatus from BufferedDataSource and FileDataSource. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: status -> success Created 8 years, 5 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/filters/pipeline_integration_test_base.cc ('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/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/threading/platform_thread.h" 9 #include "base/threading/platform_thread.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 message_loop_factory_.reset(new media::MessageLoopFactory()); 60 message_loop_factory_.reset(new media::MessageLoopFactory());
61 61
62 MessageLoop* pipeline_loop = 62 MessageLoop* pipeline_loop =
63 message_loop_factory_->GetMessageLoop("PipelineThread"); 63 message_loop_factory_->GetMessageLoop("PipelineThread");
64 pipeline_ = new Pipeline(pipeline_loop, new media::MediaLog()); 64 pipeline_ = new Pipeline(pipeline_loop, new media::MediaLog());
65 65
66 // Open the file. 66 // Open the file.
67 std::string url_utf8 = WideToUTF8(string16(url)); 67 std::string url_utf8 = WideToUTF8(string16(url));
68 scoped_refptr<FileDataSource> data_source = new FileDataSource(); 68 scoped_refptr<FileDataSource> data_source = new FileDataSource();
69 if (data_source->Initialize(url_utf8) != PIPELINE_OK) { 69 if (!data_source->Initialize(url_utf8)) {
70 return false; 70 return false;
71 } 71 }
72 72
73 // Create filter collection. 73 // Create filter collection.
74 scoped_ptr<FilterCollection> collection(new FilterCollection()); 74 scoped_ptr<FilterCollection> collection(new FilterCollection());
75 collection->SetDemuxer(new FFmpegDemuxer(pipeline_loop, data_source)); 75 collection->SetDemuxer(new FFmpegDemuxer(pipeline_loop, data_source));
76 collection->AddAudioDecoder(new FFmpegAudioDecoder( 76 collection->AddAudioDecoder(new FFmpegAudioDecoder(
77 base::Bind(&MessageLoopFactory::GetMessageLoop, 77 base::Bind(&MessageLoopFactory::GetMessageLoop,
78 base::Unretained(message_loop_factory_.get()), 78 base::Unretained(message_loop_factory_.get()),
79 "AudioDecoderThread"))); 79 "AudioDecoderThread")));
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 void Movie::Close() { 179 void Movie::Close() {
180 if (pipeline_) { 180 if (pipeline_) {
181 pipeline_->Stop(base::Closure()); 181 pipeline_->Stop(base::Closure());
182 pipeline_ = NULL; 182 pipeline_ = NULL;
183 } 183 }
184 184
185 message_loop_factory_.reset(); 185 message_loop_factory_.reset();
186 } 186 }
187 187
188 } // namespace media 188 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/pipeline_integration_test_base.cc ('k') | media/tools/player_x11/player_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698