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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
86 collection->AddAudioRenderer( | 86 collection->AddAudioRenderer( |
87 new media::AudioRendererImpl(new media::NullAudioSink())); | 87 new media::AudioRendererImpl(new media::NullAudioSink())); |
88 collection->AddVideoRenderer(video_renderer); | 88 collection->AddVideoRenderer(video_renderer); |
89 | 89 |
90 // Create and start our pipeline. | 90 // Create and start our pipeline. |
91 media::PipelineStatusNotification note; | 91 media::PipelineStatusNotification note; |
92 pipeline_->Start( | 92 pipeline_->Start( |
93 collection.Pass(), | 93 collection.Pass(), |
94 media::PipelineStatusCB(), | 94 media::PipelineStatusCB(), |
95 media::PipelineStatusCB(), | 95 media::PipelineStatusCB(), |
96 media::NetworkEventCB(), | |
scherkus (not reviewing)
2012/06/12 02:55:04
my gosh the amount of code we have to support this
| |
97 note.Callback()); | 96 note.Callback()); |
98 | 97 |
99 // Wait until the pipeline is fully initialized. | 98 // Wait until the pipeline is fully initialized. |
100 note.Wait(); | 99 note.Wait(); |
101 if (note.status() != PIPELINE_OK) | 100 if (note.status() != PIPELINE_OK) |
102 return false; | 101 return false; |
103 pipeline_->SetPlaybackRate(play_rate_); | 102 pipeline_->SetPlaybackRate(play_rate_); |
104 return true; | 103 return true; |
105 } | 104 } |
106 | 105 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
180 void Movie::Close() { | 179 void Movie::Close() { |
181 if (pipeline_) { | 180 if (pipeline_) { |
182 pipeline_->Stop(base::Closure()); | 181 pipeline_->Stop(base::Closure()); |
183 pipeline_ = NULL; | 182 pipeline_ = NULL; |
184 } | 183 } |
185 | 184 |
186 message_loop_factory_.reset(); | 185 message_loop_factory_.reset(); |
187 } | 186 } |
188 | 187 |
189 } // namespace media | 188 } // namespace media |
OLD | NEW |