| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "media/base/filter_collection.h" |
| 11 #include "media/base/limits.h" | 12 #include "media/base/limits.h" |
| 12 #include "media/base/media_format.h" | 13 #include "media/base/media_format.h" |
| 13 #include "media/base/media_switches.h" | 14 #include "media/base/media_switches.h" |
| 14 #include "media/base/pipeline_impl.h" | 15 #include "media/base/pipeline_impl.h" |
| 15 #include "media/base/video_frame.h" | 16 #include "media/base/video_frame.h" |
| 16 #include "media/filters/ffmpeg_audio_decoder.h" | 17 #include "media/filters/ffmpeg_audio_decoder.h" |
| 17 #include "media/filters/ffmpeg_demuxer.h" | 18 #include "media/filters/ffmpeg_demuxer.h" |
| 18 #include "media/filters/ffmpeg_video_decoder.h" | 19 #include "media/filters/ffmpeg_video_decoder.h" |
| 19 #include "media/filters/null_audio_renderer.h" | 20 #include "media/filters/null_audio_renderer.h" |
| 20 #include "skia/ext/platform_canvas.h" | 21 #include "skia/ext/platform_canvas.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 scoped_refptr<media::VideoFrame> frame) { | 219 scoped_refptr<media::VideoFrame> frame) { |
| 219 if (video_renderer_) | 220 if (video_renderer_) |
| 220 video_renderer_->PutCurrentFrame(frame); | 221 video_renderer_->PutCurrentFrame(frame); |
| 221 } | 222 } |
| 222 | 223 |
| 223 ///////////////////////////////////////////////////////////////////////////// | 224 ///////////////////////////////////////////////////////////////////////////// |
| 224 // WebMediaPlayerImpl implementation | 225 // WebMediaPlayerImpl implementation |
| 225 | 226 |
| 226 WebMediaPlayerImpl::WebMediaPlayerImpl( | 227 WebMediaPlayerImpl::WebMediaPlayerImpl( |
| 227 WebKit::WebMediaPlayerClient* client, | 228 WebKit::WebMediaPlayerClient* client, |
| 228 media::MediaFilterCollection* collection) | 229 media::FilterCollection* collection) |
| 229 : network_state_(WebKit::WebMediaPlayer::Empty), | 230 : network_state_(WebKit::WebMediaPlayer::Empty), |
| 230 ready_state_(WebKit::WebMediaPlayer::HaveNothing), | 231 ready_state_(WebKit::WebMediaPlayer::HaveNothing), |
| 231 main_loop_(NULL), | 232 main_loop_(NULL), |
| 232 filter_collection_(collection), | 233 filter_collection_(collection), |
| 233 pipeline_(NULL), | 234 pipeline_(NULL), |
| 234 pipeline_thread_("PipelineThread"), | 235 pipeline_thread_("PipelineThread"), |
| 235 paused_(true), | 236 paused_(true), |
| 236 playback_rate_(0.0f), | 237 playback_rate_(0.0f), |
| 237 client_(client), | 238 client_(client), |
| 238 proxy_(NULL), | 239 proxy_(NULL), |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 pipeline_stopped_.Signal(); | 801 pipeline_stopped_.Signal(); |
| 801 } | 802 } |
| 802 | 803 |
| 803 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { | 804 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { |
| 804 DCHECK(MessageLoop::current() == main_loop_); | 805 DCHECK(MessageLoop::current() == main_loop_); |
| 805 DCHECK(client_); | 806 DCHECK(client_); |
| 806 return client_; | 807 return client_; |
| 807 } | 808 } |
| 808 | 809 |
| 809 } // namespace webkit_glue | 810 } // namespace webkit_glue |
| OLD | NEW |