diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-28 22:16:07 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-28 22:16:07 +0000 |
commit | 0e4da3d4aa6d804fb55d798a439603d020847caf (patch) | |
tree | eb88da65440a642f011bd3253db6de68259a2bd2 | |
parent | f8f1a565e576fa56543147393c1a8269fe6a82e2 (diff) | |
download | chromium_src-0e4da3d4aa6d804fb55d798a439603d020847caf.zip chromium_src-0e4da3d4aa6d804fb55d798a439603d020847caf.tar.gz chromium_src-0e4da3d4aa6d804fb55d798a439603d020847caf.tar.bz2 |
Access texture in a WebVideoFrame
Provide getters for accessing textures in a WebVideoFrame
BUG=53714
TEST=None
Review URL: http://codereview.chromium.org/3472020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60852 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/webvideoframe_impl.cc | 6 | ||||
-rw-r--r-- | webkit/glue/webvideoframe_impl.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/webkit/glue/webvideoframe_impl.cc b/webkit/glue/webvideoframe_impl.cc index a838cd6..f50eded 100644 --- a/webkit/glue/webvideoframe_impl.cc +++ b/webkit/glue/webvideoframe_impl.cc @@ -87,4 +87,10 @@ const void* WebVideoFrameImpl::data(unsigned plane) const { return NULL; } +unsigned WebVideoFrameImpl::texture(unsigned plane) const { + if (video_frame_.get()) + return video_frame_->gl_texture(plane); + return NULL; +} + } // namespace webkit_glue diff --git a/webkit/glue/webvideoframe_impl.h b/webkit/glue/webvideoframe_impl.h index 6dc9cde..dfaac03 100644 --- a/webkit/glue/webvideoframe_impl.h +++ b/webkit/glue/webvideoframe_impl.h @@ -25,6 +25,7 @@ class WebVideoFrameImpl : public WebVideoFrame { virtual unsigned planes() const; virtual int stride(unsigned plane) const; virtual const void* data(unsigned plane) const; + virtual unsigned texture(unsigned plane) const; private: scoped_refptr<media::VideoFrame> video_frame_; |