| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CONTENT_RENDERER_MEDIA_SHELL_VIDEO_FRAME_PROVIDER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_SHELL_VIDEO_FRAME_PROVIDER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_SHELL_VIDEO_FRAME_PROVIDER_H_ | 6 #define CONTENT_RENDERER_MEDIA_SHELL_VIDEO_FRAME_PROVIDER_H_ |
| 7 | 7 |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "content/public/renderer/video_frame_provider.h" |
| 9 #include "ui/gfx/size.h" | 10 #include "ui/gfx/size.h" |
| 10 #include "webkit/renderer/media/video_frame_provider.h" | |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 class MessageLoopProxy; | 13 class MessageLoopProxy; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 // A simple implementation of VideoFrameProvider generates raw frames and | 18 // A simple implementation of VideoFrameProvider generates raw frames and |
| 19 // passes them to webmediaplayer. | 19 // passes them to webmediaplayer. |
| 20 // Since non-black pixel values are required in the layout test, e.g., | 20 // Since non-black pixel values are required in the layout test, e.g., |
| 21 // media/video-capture-canvas.html, this class should generate frame with | 21 // media/video-capture-canvas.html, this class should generate frame with |
| 22 // only non-black pixels. | 22 // only non-black pixels. |
| 23 class ShellVideoFrameProvider : public webkit_media::VideoFrameProvider { | 23 class ShellVideoFrameProvider : public VideoFrameProvider { |
| 24 public: | 24 public: |
| 25 ShellVideoFrameProvider( | 25 ShellVideoFrameProvider( |
| 26 const gfx::Size& size, | 26 const gfx::Size& size, |
| 27 const base::TimeDelta& frame_duration, | 27 const base::TimeDelta& frame_duration, |
| 28 const base::Closure& error_cb, | 28 const base::Closure& error_cb, |
| 29 const RepaintCB& repaint_cb); | 29 const RepaintCB& repaint_cb); |
| 30 | 30 |
| 31 // webkit_media::VideoFrameProvider implementation. | 31 // webkit_media::VideoFrameProvider implementation. |
| 32 virtual void Start() OVERRIDE; | 32 virtual void Start() OVERRIDE; |
| 33 virtual void Stop() OVERRIDE; | 33 virtual void Stop() OVERRIDE; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 54 base::TimeDelta frame_duration_; | 54 base::TimeDelta frame_duration_; |
| 55 base::Closure error_cb_; | 55 base::Closure error_cb_; |
| 56 RepaintCB repaint_cb_; | 56 RepaintCB repaint_cb_; |
| 57 | 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(ShellVideoFrameProvider); | 58 DISALLOW_COPY_AND_ASSIGN(ShellVideoFrameProvider); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 } // namespace content | 61 } // namespace content |
| 62 | 62 |
| 63 #endif // CONTENT_RENDERER_MEDIA_SHELL_VIDEO_FRAME_PROVIDER_H_ | 63 #endif // CONTENT_RENDERER_MEDIA_SHELL_VIDEO_FRAME_PROVIDER_H_ |
| OLD | NEW |