| OLD | NEW |
| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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"))); |
| 80 collection->AddVideoDecoder(new FFmpegVideoDecoder( | 80 collection->AddVideoDecoder(new FFmpegVideoDecoder( |
| 81 base::Bind(&MessageLoopFactory::GetMessageLoop, | 81 base::Bind(&MessageLoopFactory::GetMessageLoop, |
| 82 base::Unretained(message_loop_factory_.get()), | 82 base::Unretained(message_loop_factory_.get()), |
| 83 "VideoDecoderThread"))); | 83 "VideoDecoderThread"), |
| 84 NULL)); |
| 84 | 85 |
| 85 // TODO(vrk): Re-enabled audio. (crbug.com/112159) | 86 // TODO(vrk): Re-enabled audio. (crbug.com/112159) |
| 86 collection->AddAudioRenderer( | 87 collection->AddAudioRenderer( |
| 87 new media::AudioRendererImpl(new media::NullAudioSink())); | 88 new media::AudioRendererImpl(new media::NullAudioSink())); |
| 88 collection->AddVideoRenderer(video_renderer); | 89 collection->AddVideoRenderer(video_renderer); |
| 89 | 90 |
| 90 // Create and start our pipeline. | 91 // Create and start our pipeline. |
| 91 media::PipelineStatusNotification note; | 92 media::PipelineStatusNotification note; |
| 92 pipeline_->Start( | 93 pipeline_->Start( |
| 93 collection.Pass(), | 94 collection.Pass(), |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 void Movie::Close() { | 180 void Movie::Close() { |
| 180 if (pipeline_) { | 181 if (pipeline_) { |
| 181 pipeline_->Stop(base::Closure()); | 182 pipeline_->Stop(base::Closure()); |
| 182 pipeline_ = NULL; | 183 pipeline_ = NULL; |
| 183 } | 184 } |
| 184 | 185 |
| 185 message_loop_factory_.reset(); | 186 message_loop_factory_.reset(); |
| 186 } | 187 } |
| 187 | 188 |
| 188 } // namespace media | 189 } // namespace media |
| OLD | NEW |