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

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

Issue 9015015: Take advantage of the new Pass() machinery on scoped_ptr{,_malloc}. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove the dependency on CL 8968032 and point TODOs at the newly-filed bug. Created 8 years, 12 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
Index: media/tools/player_wtl/movie.cc
diff --git a/media/tools/player_wtl/movie.cc b/media/tools/player_wtl/movie.cc
index 043932eef2273d68d1100aa64c371f92f7535568..1a6c455525272166bc63e5e4ed704b6b487d4ba7 100644
--- a/media/tools/player_wtl/movie.cc
+++ b/media/tools/player_wtl/movie.cc
@@ -72,8 +72,12 @@ bool Movie::Open(const wchar_t* url, VideoRendererBase* video_renderer) {
// Create filter collection.
scoped_ptr<FilterCollection> collection(new FilterCollection());
- collection->SetDemuxerFactory(new FFmpegDemuxerFactory(
- new FileDataSourceFactory(), pipeline_loop));
+ // TODO(fischman): replace the extra scoped_ptr's when
+ // http://crbug.com/109026 is fixed.
+ collection->SetDemuxerFactory(
acolwell GONE FROM CHROMIUM 2012/01/03 22:46:40 Remove comment per discussion
Ami GONE FROM CHROMIUM 2012/01/03 22:52:02 Done.
+ scoped_ptr<DemuxerFactory>(new FFmpegDemuxerFactory(
+ scoped_ptr<DataSourceFactory>(new FileDataSourceFactory()),
+ pipeline_loop)));
collection->AddAudioDecoder(new FFmpegAudioDecoder(
message_loop_factory_->GetMessageLoop("AudioDecoderThread")));
collection->AddVideoDecoder(new FFmpegVideoDecoder(
@@ -89,7 +93,7 @@ bool Movie::Open(const wchar_t* url, VideoRendererBase* video_renderer) {
// Create and start our pipeline.
media::PipelineStatusNotification note;
- pipeline_->Start(collection.release(), WideToUTF8(std::wstring(url)),
+ pipeline_->Start(collection.Pass(), WideToUTF8(std::wstring(url)),
note.Callback());
// Wait until the pipeline is fully initialized.
note.Wait();

Powered by Google App Engine
This is Rietveld 408576698