Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: webkit/media/webvideoframe_impl.h

Issue 11269017: Plumb through cropped output size for VideoFrame (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Found the windows failure, and fixed it. Thanks akalin@ Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webkit/media/simple_video_frame_provider.cc ('k') | webkit/media/webvideoframe_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/platform/WebRect.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVideoFrame.h" 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVideoFrame.h"
11 13
12 namespace webkit_media { 14 namespace webkit_media {
13 15
14 class WebVideoFrameImpl : public WebKit::WebVideoFrame { 16 class WebVideoFrameImpl : public WebKit::WebVideoFrame {
15 public: 17 public:
16 // This converts a WebKit::WebVideoFrame to a media::VideoFrame. 18 // This converts a WebKit::WebVideoFrame to a media::VideoFrame.
17 static media::VideoFrame* toVideoFrame( 19 static media::VideoFrame* toVideoFrame(
18 WebKit::WebVideoFrame* web_video_frame); 20 WebKit::WebVideoFrame* web_video_frame);
19 21
20 WebVideoFrameImpl(scoped_refptr<media::VideoFrame> video_frame); 22 WebVideoFrameImpl(scoped_refptr<media::VideoFrame> video_frame);
21 virtual ~WebVideoFrameImpl(); 23 virtual ~WebVideoFrameImpl();
22 virtual WebVideoFrame::Format format() const; 24 virtual WebVideoFrame::Format format() const;
23 virtual unsigned width() const;
24 virtual unsigned height() const;
25 virtual unsigned planes() const; 25 virtual unsigned planes() const;
26 virtual int stride(unsigned plane) const;
27 virtual const void* data(unsigned plane) const; 26 virtual const void* data(unsigned plane) const;
28 virtual unsigned textureId() const; 27 virtual unsigned textureId() const;
29 virtual unsigned textureTarget() const; 28 virtual unsigned textureTarget() const;
29 virtual WebKit::WebRect visibleRect() const;
30 virtual WebKit::WebSize textureSize() const;
30 31
31 private: 32 private:
32 scoped_refptr<media::VideoFrame> video_frame_; 33 scoped_refptr<media::VideoFrame> video_frame_;
33 DISALLOW_COPY_AND_ASSIGN(WebVideoFrameImpl); 34 DISALLOW_COPY_AND_ASSIGN(WebVideoFrameImpl);
34 }; 35 };
35 36
36 // TODO(skaslev) This is temporarily inline pending the removal of 37 // TODO(skaslev) This is temporarily inline pending the removal of
37 // WebKit::WebVideoFrame and WebVideoFrameImpl which are currently unused. 38 // WebKit::WebVideoFrame and WebVideoFrameImpl which are currently unused.
38 inline media::VideoFrame* WebVideoFrameImpl::toVideoFrame( 39 inline media::VideoFrame* WebVideoFrameImpl::toVideoFrame(
39 WebKit::WebVideoFrame* web_video_frame) { 40 WebKit::WebVideoFrame* web_video_frame) {
40 WebVideoFrameImpl* wrapped_frame = 41 WebVideoFrameImpl* wrapped_frame =
41 static_cast<WebVideoFrameImpl*>(web_video_frame); 42 static_cast<WebVideoFrameImpl*>(web_video_frame);
42 if (wrapped_frame) 43 if (wrapped_frame)
43 return wrapped_frame->video_frame_.get(); 44 return wrapped_frame->video_frame_.get();
44 return NULL; 45 return NULL;
45 } 46 }
46 47
47 } // namespace webkit_media 48 } // namespace webkit_media
48 49
49 #endif // WEBKIT_MEDIA_WEBVIDEOFRAME_IMPL_H_ 50 #endif // WEBKIT_MEDIA_WEBVIDEOFRAME_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/media/simple_video_frame_provider.cc ('k') | webkit/media/webvideoframe_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698