Chromium Code Reviews| Index: media/video/picture.h |
| diff --git a/media/video/picture.h b/media/video/picture.h |
| index f9611bd7afc8e995fe64c13bbc5f489e73301370..825a07d110b4daedb02d24f0b788040801620d6f 100644 |
| --- a/media/video/picture.h |
| +++ b/media/video/picture.h |
| @@ -15,12 +15,13 @@ struct PP_SysmemBuffer_Dev; |
| namespace media { |
| -// Information about the picture buffer. |
| +// Common information about GLES & Sysmem picture buffers. |
| // This is the media-namespace equivalent of PP_BufferInfo_Dev. |
| -class BufferInfo { |
| +class BaseBuffer { |
| public: |
| - BufferInfo(int32 id, gfx::Size size); |
| - BufferInfo(const PP_BufferInfo_Dev& info); |
| + BaseBuffer(int32 id, gfx::Size size); |
| + BaseBuffer(const PP_BufferInfo_Dev& info); |
| + virtual ~BaseBuffer(); |
| // Returns the client-specified id of the buffer. |
| int32 id() const { |
| @@ -39,7 +40,7 @@ class BufferInfo { |
| // A picture buffer that is composed of a GLES2 texture and context. |
| // This is the media-namespace equivalent of PP_GLESBuffer_Dev. |
| -class GLESBuffer { |
| +class GLESBuffer : public BaseBuffer { |
| public: |
| GLESBuffer(int32 id, gfx::Size size, uint32 texture_id, uint32 context_id); |
| GLESBuffer(const PP_GLESBuffer_Dev& buffer); |
| @@ -56,20 +57,14 @@ class GLESBuffer { |
| 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 { |
| +class SysmemBuffer : public BaseBuffer { |
| public: |
| SysmemBuffer(int32 id, gfx::Size size, void* data); |
| SysmemBuffer(const PP_SysmemBuffer_Dev&); |
| @@ -79,14 +74,8 @@ class SysmemBuffer { |
| return data_; |
| } |
| - // Returns information regarding the buffer. |
| - const BufferInfo& buffer_info() const { |
| - return info_; |
| - } |
| - |
| private: |
| void* data_; |
| - BufferInfo info_; |
| }; |
| // A decoded picture frame. |
| @@ -102,6 +91,7 @@ class Picture { |
| return picture_buffer_id_; |
| } |
| + // XXX what is this good for? Absolutely nuthin'!? |
|
Ken Russell (switch to Gerrit)
2011/05/23 18:15:59
Use a TODO here.
|
| // Returns the id of the bitstream buffer from which this frame was decoded. |
| // TODO(vrk): Handle the case where a picture can span multiple buffers. |
| int32 bitstream_buffer_id() const { |