| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/base/filter_collection.h" | 10 #include "media/base/filter_collection.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 message_loop_factory_->GetMessageLoop("PipelineThread"); | 68 message_loop_factory_->GetMessageLoop("PipelineThread"); |
| 69 pipeline_ = new PipelineImpl(pipeline_loop, new media::MediaLog()); | 69 pipeline_ = new PipelineImpl(pipeline_loop, new media::MediaLog()); |
| 70 | 70 |
| 71 // Create filter collection. | 71 // Create filter collection. |
| 72 scoped_ptr<FilterCollection> collection(new FilterCollection()); | 72 scoped_ptr<FilterCollection> collection(new FilterCollection()); |
| 73 collection->SetDemuxerFactory(new FFmpegDemuxerFactory( | 73 collection->SetDemuxerFactory(new FFmpegDemuxerFactory( |
| 74 new FileDataSourceFactory(), pipeline_loop)); | 74 new FileDataSourceFactory(), pipeline_loop)); |
| 75 collection->AddAudioDecoder(new FFmpegAudioDecoder( | 75 collection->AddAudioDecoder(new FFmpegAudioDecoder( |
| 76 message_loop_factory_->GetMessageLoop("AudioDecoderThread"))); | 76 message_loop_factory_->GetMessageLoop("AudioDecoderThread"))); |
| 77 collection->AddVideoDecoder(new FFmpegVideoDecoder( | 77 collection->AddVideoDecoder(new FFmpegVideoDecoder( |
| 78 message_loop_factory_->GetMessageLoop("VideoDecoderThread"), NULL)); | 78 message_loop_factory_->GetMessageLoop("VideoDecoderThread"))); |
| 79 | 79 |
| 80 if (enable_audio_) { | 80 if (enable_audio_) { |
| 81 collection->AddAudioRenderer(new ReferenceAudioRenderer()); | 81 collection->AddAudioRenderer(new ReferenceAudioRenderer()); |
| 82 } else { | 82 } else { |
| 83 collection->AddAudioRenderer(new media::NullAudioRenderer()); | 83 collection->AddAudioRenderer(new media::NullAudioRenderer()); |
| 84 } | 84 } |
| 85 collection->AddVideoRenderer(video_renderer); | 85 collection->AddVideoRenderer(video_renderer); |
| 86 | 86 |
| 87 // Create and start our pipeline. | 87 // Create and start our pipeline. |
| 88 media::PipelineStatusNotification note; | 88 media::PipelineStatusNotification note; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 void Movie::Close() { | 173 void Movie::Close() { |
| 174 if (pipeline_) { | 174 if (pipeline_) { |
| 175 pipeline_->Stop(media::PipelineStatusCB()); | 175 pipeline_->Stop(media::PipelineStatusCB()); |
| 176 pipeline_ = NULL; | 176 pipeline_ = NULL; |
| 177 } | 177 } |
| 178 | 178 |
| 179 message_loop_factory_.reset(); | 179 message_loop_factory_.reset(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 } // namespace media | 182 } // namespace media |
| OLD | NEW |