diff options
author | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-25 20:25:03 +0000 |
---|---|---|
committer | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-25 20:25:03 +0000 |
commit | ee2a19b11962637b36171fef40eb85ab93958036 (patch) | |
tree | d934cc904a4515b9358efff92eae33bd0b29cef1 /media/video/picture.h | |
parent | 76420799ecf0dae804bd267d8336e96c031752ce (diff) | |
download | chromium_src-ee2a19b11962637b36171fef40eb85ab93958036.zip chromium_src-ee2a19b11962637b36171fef40eb85ab93958036.tar.gz chromium_src-ee2a19b11962637b36171fef40eb85ab93958036.tar.bz2 |
Revert 86681 - Updated OMX decoder for recent PPAPI changes, and added to the build.
Had to move from content/gpu to content/common/gpu to allow gpu_video_service.cc
to depend on the decoder.
Removed some dead code and did some random cleanup while I was in there.
BUG=none
TEST=chrome compiles on cros/arm!
Review URL: http://codereview.chromium.org/7057027
TBR=fischman@chromium.org
Review URL: http://codereview.chromium.org/6979017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/video/picture.h')
-rw-r--r-- | media/video/picture.h | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/media/video/picture.h b/media/video/picture.h index 860a4ee..f9611bd 100644 --- a/media/video/picture.h +++ b/media/video/picture.h @@ -15,13 +15,12 @@ struct PP_SysmemBuffer_Dev; namespace media { -// Common information about GLES & Sysmem picture buffers. +// Information about the picture buffer. // This is the media-namespace equivalent of PP_BufferInfo_Dev. -class BaseBuffer { +class BufferInfo { public: - BaseBuffer(int32 id, gfx::Size size); - BaseBuffer(const PP_BufferInfo_Dev& info); - virtual ~BaseBuffer(); + BufferInfo(int32 id, gfx::Size size); + BufferInfo(const PP_BufferInfo_Dev& info); // Returns the client-specified id of the buffer. int32 id() const { @@ -40,7 +39,7 @@ class BaseBuffer { // A picture buffer that is composed of a GLES2 texture and context. // This is the media-namespace equivalent of PP_GLESBuffer_Dev. -class GLESBuffer : public BaseBuffer { +class GLESBuffer { public: GLESBuffer(int32 id, gfx::Size size, uint32 texture_id, uint32 context_id); GLESBuffer(const PP_GLESBuffer_Dev& buffer); @@ -57,14 +56,20 @@ class GLESBuffer : public BaseBuffer { return context_id_; } + // Returns information regarding the buffer. + const BufferInfo& buffer_info() const { + return info_; + } + private: uint32 texture_id_; uint32 context_id_; + BufferInfo info_; }; // A picture buffer that lives in system memory. // This is the media-namespace equivalent of PP_SysmemBuffer_Dev. -class SysmemBuffer : public BaseBuffer { +class SysmemBuffer { public: SysmemBuffer(int32 id, gfx::Size size, void* data); SysmemBuffer(const PP_SysmemBuffer_Dev&); @@ -74,8 +79,14 @@ class SysmemBuffer : public BaseBuffer { return data_; } + // Returns information regarding the buffer. + const BufferInfo& buffer_info() const { + return info_; + } + private: void* data_; + BufferInfo info_; }; // A decoded picture frame. @@ -92,9 +103,7 @@ class Picture { } // Returns the id of the bitstream buffer from which this frame was decoded. - // TODO(fischman,vrk): Remove this field; pictures can span arbitrarily many - // BitstreamBuffers, and it's not clear what clients would do with this - // information, anyway. + // TODO(vrk): Handle the case where a picture can span multiple buffers. int32 bitstream_buffer_id() const { return bitstream_buffer_id_; } |