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 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. | 5 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. |
6 // It contains PipelineImpl which is the actual media player pipeline, it glues | 6 // It contains PipelineImpl which is the actual media player pipeline, it glues |
7 // the media player pipeline, data source, audio renderer and renderer. | 7 // the media player pipeline, data source, audio renderer and renderer. |
8 // PipelineImpl would creates multiple threads and access some public methods | 8 // PipelineImpl would creates multiple threads and access some public methods |
9 // of this class, so we need to be extra careful about concurrent access of | 9 // of this class, so we need to be extra careful about concurrent access of |
10 // methods and members. | 10 // methods and members. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 WebMediaPlayerImpl* webmediaplayer); | 96 WebMediaPlayerImpl* webmediaplayer); |
97 | 97 |
98 // Public methods called from the video renderer. | 98 // Public methods called from the video renderer. |
99 void Repaint(); | 99 void Repaint(); |
100 void SetVideoRenderer(WebVideoRenderer* video_renderer); | 100 void SetVideoRenderer(WebVideoRenderer* video_renderer); |
101 | 101 |
102 // Public methods called from WebMediaPlayerImpl. | 102 // Public methods called from WebMediaPlayerImpl. |
103 void Paint(skia::PlatformCanvas* canvas, const gfx::Rect& dest_rect); | 103 void Paint(skia::PlatformCanvas* canvas, const gfx::Rect& dest_rect); |
104 void SetSize(const gfx::Rect& rect); | 104 void SetSize(const gfx::Rect& rect); |
105 void Detach(); | 105 void Detach(); |
| 106 void GetCurrentFrame(scoped_refptr<media::VideoFrame>* frame_out); |
| 107 void PutCurrentFrame(scoped_refptr<media::VideoFrame> frame); |
106 | 108 |
107 // Public methods called from the pipeline via callback issued by | 109 // Public methods called from the pipeline via callback issued by |
108 // WebMediaPlayerImpl. | 110 // WebMediaPlayerImpl. |
109 void PipelineInitializationCallback(); | 111 void PipelineInitializationCallback(); |
110 void PipelineSeekCallback(); | 112 void PipelineSeekCallback(); |
111 void PipelineEndedCallback(); | 113 void PipelineEndedCallback(); |
112 void PipelineErrorCallback(); | 114 void PipelineErrorCallback(); |
113 void NetworkEventCallback(); | 115 void NetworkEventCallback(); |
114 | 116 |
115 // Returns the message loop used by the proxy. | 117 // Returns the message loop used by the proxy. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 } | 224 } |
223 virtual WebKit::WebMediaPlayer::ReadyState readyState() const { | 225 virtual WebKit::WebMediaPlayer::ReadyState readyState() const { |
224 return ready_state_; | 226 return ready_state_; |
225 } | 227 } |
226 | 228 |
227 virtual unsigned long long bytesLoaded() const; | 229 virtual unsigned long long bytesLoaded() const; |
228 virtual unsigned long long totalBytes() const; | 230 virtual unsigned long long totalBytes() const; |
229 | 231 |
230 virtual bool hasSingleSecurityOrigin() const; | 232 virtual bool hasSingleSecurityOrigin() const; |
231 virtual WebKit::WebMediaPlayer::MovieLoadType movieLoadType() const; | 233 virtual WebKit::WebMediaPlayer::MovieLoadType movieLoadType() const; |
| 234 virtual void getCurrentFrame(WebKit::WebVideoFrame** output); |
| 235 virtual void putCurrentFrame(WebKit::WebVideoFrame* frame); |
232 | 236 |
233 // As we are closing the tab or even the browser, |main_loop_| is destroyed | 237 // As we are closing the tab or even the browser, |main_loop_| is destroyed |
234 // even before this object gets destructed, so we need to know when | 238 // even before this object gets destructed, so we need to know when |
235 // |main_loop_| is being destroyed and we can stop posting repaint task | 239 // |main_loop_| is being destroyed and we can stop posting repaint task |
236 // to it. | 240 // to it. |
237 virtual void WillDestroyCurrentMessageLoop(); | 241 virtual void WillDestroyCurrentMessageLoop(); |
238 | 242 |
239 void Repaint(); | 243 void Repaint(); |
240 | 244 |
241 void OnPipelineInitialize(); | 245 void OnPipelineInitialize(); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 WebMediaPlayerImpl::Proxy* proxy) = 0; | 335 WebMediaPlayerImpl::Proxy* proxy) = 0; |
332 | 336 |
333 private: | 337 private: |
334 DISALLOW_COPY_AND_ASSIGN(WebVideoRendererFactoryFactory); | 338 DISALLOW_COPY_AND_ASSIGN(WebVideoRendererFactoryFactory); |
335 }; | 339 }; |
336 | 340 |
337 | 341 |
338 } // namespace webkit_glue | 342 } // namespace webkit_glue |
339 | 343 |
340 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ | 344 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |