| 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 "webkit/glue/webmediaplayer_proxy.h" | 5 #include "webkit/media/webmediaplayer_proxy.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "media/base/pipeline_status.h" | 10 #include "media/base/pipeline_status.h" |
| 11 #include "media/filters/chunk_demuxer.h" | 11 #include "media/filters/chunk_demuxer.h" |
| 12 #include "webkit/glue/media/web_video_renderer.h" | 12 #include "webkit/media/web_video_renderer.h" |
| 13 #include "webkit/glue/webmediaplayer_impl.h" | 13 #include "webkit/media/webmediaplayer_impl.h" |
| 14 | 14 |
| 15 using media::PipelineStatus; | 15 using media::PipelineStatus; |
| 16 | 16 |
| 17 namespace webkit_glue { | 17 namespace webkit_media { |
| 18 | 18 |
| 19 // Limits the maximum outstanding repaints posted on render thread. | 19 // Limits the maximum outstanding repaints posted on render thread. |
| 20 // This number of 50 is a guess, it does not take too much memory on the task | 20 // This number of 50 is a guess, it does not take too much memory on the task |
| 21 // queue but gives up a pretty good latency on repaint. | 21 // queue but gives up a pretty good latency on repaint. |
| 22 static const int kMaxOutstandingRepaints = 50; | 22 static const int kMaxOutstandingRepaints = 50; |
| 23 | 23 |
| 24 WebMediaPlayerProxy::WebMediaPlayerProxy(MessageLoop* render_loop, | 24 WebMediaPlayerProxy::WebMediaPlayerProxy(MessageLoop* render_loop, |
| 25 WebMediaPlayerImpl* webmediaplayer) | 25 WebMediaPlayerImpl* webmediaplayer) |
| 26 : render_loop_(render_loop), | 26 : render_loop_(render_loop), |
| 27 webmediaplayer_(webmediaplayer), | 27 webmediaplayer_(webmediaplayer), |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 DCHECK(MessageLoop::current() == render_loop_); | 228 DCHECK(MessageLoop::current() == render_loop_); |
| 229 chunk_demuxer_ = demuxer; | 229 chunk_demuxer_ = demuxer; |
| 230 if (webmediaplayer_) | 230 if (webmediaplayer_) |
| 231 webmediaplayer_->OnDemuxerOpened(); | 231 webmediaplayer_->OnDemuxerOpened(); |
| 232 } | 232 } |
| 233 | 233 |
| 234 void WebMediaPlayerProxy::DemuxerClosedTask() { | 234 void WebMediaPlayerProxy::DemuxerClosedTask() { |
| 235 chunk_demuxer_ = NULL; | 235 chunk_demuxer_ = NULL; |
| 236 } | 236 } |
| 237 | 237 |
| 238 } // namespace webkit_glue | 238 } // namespace webkit_media |
| OLD | NEW |