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" |
sheu
2013/01/03 22:00:27
You could just drop the header now and forward-dec
danakj
2013/01/03 22:44:54
Done.
| |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" | |
11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" | |
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVideoFrame.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVideoFrame.h" |
13 | 11 |
14 namespace webkit_media { | 12 namespace webkit_media { |
15 | 13 |
16 class WebVideoFrameImpl : public WebKit::WebVideoFrame { | 14 class WebVideoFrameImpl : public WebKit::WebVideoFrame { |
Ami GONE FROM CHROMIUM
2013/01/03 21:59:07
AFAICT at this point this class serves the sole pu
danakj
2013/01/03 22:44:54
Yep, as you said: https://bugs.webkit.org/show_bug
Ami GONE FROM CHROMIUM
2013/01/03 22:49:32
I take it you tested this (gutting WVF) and it wor
danakj
2013/01/03 22:53:57
I tested with:
- youtube html5 video
- html5doctor
| |
17 public: | 15 public: |
18 // This converts a WebKit::WebVideoFrame to a media::VideoFrame. | |
19 static media::VideoFrame* toVideoFrame( | |
20 WebKit::WebVideoFrame* web_video_frame); | |
21 | |
22 WebVideoFrameImpl(scoped_refptr<media::VideoFrame> video_frame); | 16 WebVideoFrameImpl(scoped_refptr<media::VideoFrame> video_frame); |
23 virtual ~WebVideoFrameImpl(); | 17 virtual ~WebVideoFrameImpl(); |
24 virtual WebVideoFrame::Format format() const; | 18 |
25 virtual unsigned planes() const; | 19 scoped_refptr<media::VideoFrame> video_frame; |
26 virtual const void* data(unsigned plane) const; | |
27 virtual unsigned textureId() const; | |
28 virtual unsigned textureTarget() const; | |
29 virtual WebKit::WebRect visibleRect() const; | |
30 virtual WebKit::WebSize textureSize() const; | |
31 | 20 |
32 private: | 21 private: |
33 scoped_refptr<media::VideoFrame> video_frame_; | |
34 DISALLOW_COPY_AND_ASSIGN(WebVideoFrameImpl); | 22 DISALLOW_COPY_AND_ASSIGN(WebVideoFrameImpl); |
35 }; | 23 }; |
36 | 24 |
37 // TODO(skaslev) This is temporarily inline pending the removal of | |
38 // WebKit::WebVideoFrame and WebVideoFrameImpl which are currently unused. | |
39 inline media::VideoFrame* WebVideoFrameImpl::toVideoFrame( | |
40 WebKit::WebVideoFrame* web_video_frame) { | |
41 WebVideoFrameImpl* wrapped_frame = | |
42 static_cast<WebVideoFrameImpl*>(web_video_frame); | |
43 if (wrapped_frame) | |
44 return wrapped_frame->video_frame_.get(); | |
45 return NULL; | |
46 } | |
47 | |
48 } // namespace webkit_media | 25 } // namespace webkit_media |
49 | 26 |
50 #endif // WEBKIT_MEDIA_WEBVIDEOFRAME_IMPL_H_ | 27 #endif // WEBKIT_MEDIA_WEBVIDEOFRAME_IMPL_H_ |
OLD | NEW |