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

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: rebased & removed unnecessary include of ffmpeg_common.h from ffmpeg_demuxer.h 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..2a3eee1361b607c16a2b60f65f27a8c7076be7d5 100644
--- a/media/tools/player_wtl/movie.cc
+++ b/media/tools/player_wtl/movie.cc
@@ -72,8 +72,13 @@ 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): hopefully the extra scoped_ptr<>'s will be
+ // unnecessary once http://codereview.chromium.org/8968032/ lands
+ // properly.
+ collection->SetDemuxerFactory(
+ 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 +94,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