OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MEDIA_WEBVIDEOFRAME_IMPL_H_ | 5 #ifndef WEBKIT_MEDIA_WEBVIDEOFRAME_IMPL_H_ |
6 #define WEBKIT_MEDIA_WEBVIDEOFRAME_IMPL_H_ | 6 #define WEBKIT_MEDIA_WEBVIDEOFRAME_IMPL_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "media/base/video_frame.h" | 9 #include "media/base/video_frame.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVideoFrame.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVideoFrame.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 virtual int stride(unsigned plane) const; | 26 virtual int stride(unsigned plane) const; |
27 virtual const void* data(unsigned plane) const; | 27 virtual const void* data(unsigned plane) const; |
28 virtual unsigned textureId() const; | 28 virtual unsigned textureId() const; |
29 virtual unsigned textureTarget() const; | 29 virtual unsigned textureTarget() const; |
30 | 30 |
31 private: | 31 private: |
32 scoped_refptr<media::VideoFrame> video_frame_; | 32 scoped_refptr<media::VideoFrame> video_frame_; |
33 DISALLOW_COPY_AND_ASSIGN(WebVideoFrameImpl); | 33 DISALLOW_COPY_AND_ASSIGN(WebVideoFrameImpl); |
34 }; | 34 }; |
35 | 35 |
| 36 // TODO(skaslev) This is temporarily inline pending the removal of |
| 37 // WebKit::WebVideoFrame and WebVideoFrameImpl which are currently unused. |
| 38 inline media::VideoFrame* WebVideoFrameImpl::toVideoFrame( |
| 39 WebKit::WebVideoFrame* web_video_frame) { |
| 40 WebVideoFrameImpl* wrapped_frame = |
| 41 static_cast<WebVideoFrameImpl*>(web_video_frame); |
| 42 if (wrapped_frame) |
| 43 return wrapped_frame->video_frame_.get(); |
| 44 return NULL; |
| 45 } |
| 46 |
36 } // namespace webkit_media | 47 } // namespace webkit_media |
37 | 48 |
38 #endif // WEBKIT_MEDIA_WEBVIDEOFRAME_IMPL_H_ | 49 #endif // WEBKIT_MEDIA_WEBVIDEOFRAME_IMPL_H_ |
OLD | NEW |