| OLD | NEW |
| 1 // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008-2009 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 "webkit/glue/webmediaplayer_impl.h" | 5 #include "webkit/glue/webmediaplayer_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "googleurl/src/gurl.h" | 8 #include "googleurl/src/gurl.h" |
| 9 #include "media/filters/ffmpeg_audio_decoder.h" | 9 #include "media/filters/ffmpeg_audio_decoder.h" |
| 10 #include "media/filters/ffmpeg_demuxer.h" | 10 #include "media/filters/ffmpeg_demuxer.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 playback_rate_(0.0f), | 132 playback_rate_(0.0f), |
| 133 client_(client) { | 133 client_(client) { |
| 134 // Saves the current message loop. | 134 // Saves the current message loop. |
| 135 DCHECK(!main_loop_); | 135 DCHECK(!main_loop_); |
| 136 main_loop_ = MessageLoop::current(); | 136 main_loop_ = MessageLoop::current(); |
| 137 | 137 |
| 138 // Create the pipeline and its thread. | 138 // Create the pipeline and its thread. |
| 139 if (!pipeline_thread_.Start()) { | 139 if (!pipeline_thread_.Start()) { |
| 140 NOTREACHED() << "Could not start PipelineThread"; | 140 NOTREACHED() << "Could not start PipelineThread"; |
| 141 } else { | 141 } else { |
| 142 pipeline_.reset(new media::PipelineImpl(pipeline_thread_.message_loop())); | 142 pipeline_ = new media::PipelineImpl(pipeline_thread_.message_loop()); |
| 143 } | 143 } |
| 144 | 144 |
| 145 // Also we want to be notified of |main_loop_| destruction. | 145 // Also we want to be notified of |main_loop_| destruction. |
| 146 main_loop_->AddDestructionObserver(this); | 146 main_loop_->AddDestructionObserver(this); |
| 147 | 147 |
| 148 // Creates the proxy. | 148 // Creates the proxy. |
| 149 proxy_ = new Proxy(main_loop_, this); | 149 proxy_ = new Proxy(main_loop_, this); |
| 150 | 150 |
| 151 // Add in the default filter factories. | 151 // Add in the default filter factories. |
| 152 filter_factory_->AddFactory(media::FFmpegDemuxer::CreateFilterFactory()); | 152 filter_factory_->AddFactory(media::FFmpegDemuxer::CreateFilterFactory()); |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 } | 423 } |
| 424 } | 424 } |
| 425 | 425 |
| 426 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { | 426 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { |
| 427 DCHECK(MessageLoop::current() == main_loop_); | 427 DCHECK(MessageLoop::current() == main_loop_); |
| 428 DCHECK(client_); | 428 DCHECK(client_); |
| 429 return client_; | 429 return client_; |
| 430 } | 430 } |
| 431 | 431 |
| 432 } // namespace webkit_glue | 432 } // namespace webkit_glue |
| OLD | NEW |