| 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 #ifndef WEBKIT_GLUE_WEBVIDEOFRAME_IMPL_H_ | 5 #ifndef WEBKIT_GLUE_WEBVIDEOFRAME_IMPL_H_ |
| 6 #define WEBKIT_GLUE_WEBVIDEOFRAME_IMPL_H_ | 6 #define WEBKIT_GLUE_WEBVIDEOFRAME_IMPL_H_ |
| 7 | 7 |
| 8 #include "media/base/video_frame.h" | 8 #include "media/base/video_frame.h" |
| 9 #include "third_party/WebKit/WebKit/chromium/public/WebVideoFrame.h" | 9 #include "third_party/WebKit/WebKit/chromium/public/WebVideoFrame.h" |
| 10 | 10 |
| 11 using namespace WebKit; | 11 using namespace WebKit; |
| 12 | 12 |
| 13 namespace webkit_glue { | 13 namespace webkit_glue { |
| 14 | 14 |
| 15 class WebVideoFrameImpl : public WebVideoFrame { | 15 class WebVideoFrameImpl : public WebVideoFrame { |
| 16 public: | 16 public: |
| 17 // This converts a WebKit::WebVideoFrame to a media::VideoFrame. | 17 // This converts a WebKit::WebVideoFrame to a media::VideoFrame. |
| 18 static media::VideoFrame* toVideoFrame(WebVideoFrame* web_video_frame); | 18 static media::VideoFrame* toVideoFrame(WebVideoFrame* web_video_frame); |
| 19 | 19 |
| 20 WebVideoFrameImpl(scoped_refptr<media::VideoFrame> video_frame); | 20 WebVideoFrameImpl(scoped_refptr<media::VideoFrame> video_frame); |
| 21 virtual ~WebVideoFrameImpl(); |
| 21 virtual WebVideoFrame::SurfaceType surfaceType() const; | 22 virtual WebVideoFrame::SurfaceType surfaceType() const; |
| 22 virtual WebVideoFrame::Format format() const; | 23 virtual WebVideoFrame::Format format() const; |
| 23 virtual unsigned width() const; | 24 virtual unsigned width() const; |
| 24 virtual unsigned height() const; | 25 virtual unsigned height() const; |
| 25 virtual unsigned planes() const; | 26 virtual unsigned planes() const; |
| 26 virtual int stride(unsigned plane) const; | 27 virtual int stride(unsigned plane) const; |
| 27 virtual const void* data(unsigned plane) const; | 28 virtual const void* data(unsigned plane) const; |
| 28 virtual unsigned texture(unsigned plane) const; | 29 virtual unsigned texture(unsigned plane) const; |
| 29 | 30 |
| 30 private: | 31 private: |
| 31 scoped_refptr<media::VideoFrame> video_frame_; | 32 scoped_refptr<media::VideoFrame> video_frame_; |
| 32 DISALLOW_COPY_AND_ASSIGN(WebVideoFrameImpl); | 33 DISALLOW_COPY_AND_ASSIGN(WebVideoFrameImpl); |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 } // namespace webkit_glue | 36 } // namespace webkit_glue |
| 36 | 37 |
| 37 #endif // WEBKIT_GLUE_WEBVIDEOFRAME_IMPL_H_ | 38 #endif // WEBKIT_GLUE_WEBVIDEOFRAME_IMPL_H_ |
| OLD | NEW |