diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 20:04:29 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 20:04:29 +0000 |
commit | 40e5ac1f115a7905372d3414debaac63a5244886 (patch) | |
tree | 1613d237a6e69e0d1f95b1953b8b2572a9f5b52a /media/base/buffers.h | |
parent | b0c2bda2081e3627baac5814d6c66ef121b88515 (diff) | |
download | chromium_src-40e5ac1f115a7905372d3414debaac63a5244886.zip chromium_src-40e5ac1f115a7905372d3414debaac63a5244886.tar.gz chromium_src-40e5ac1f115a7905372d3414debaac63a5244886.tar.bz2 |
andrew's patch
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11904 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/buffers.h')
-rw-r--r-- | media/base/buffers.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/media/base/buffers.h b/media/base/buffers.h index 901a8a2..dddc5d3 100644 --- a/media/base/buffers.h +++ b/media/base/buffers.h @@ -97,7 +97,7 @@ class StreamSample : public base::RefCountedThreadSafe<StreamSample> { class Buffer : public StreamSample { public: // Returns a read only pointer to the buffer data. - virtual const uint8* GetData() const = 0; + virtual const char* GetData() const = 0; // Returns the size of valid data in bytes. virtual size_t GetDataSize() const = 0; @@ -106,18 +106,15 @@ class Buffer : public StreamSample { class WritableBuffer : public Buffer { public: - // Returns a read-write pointer to the buffer data. When this method is - // called, any pointers previously returned from this method are invalid, and - // any data previously written to the buffer is invalid. The buffer size - // is guaranteed to be at least the size of |buffer_size|. The size - // that the GetDataSize() method will return is set to |buffer_size|. - // If, after filling the buffer, the caller wants to set the size to a smaller - // value then they can call the SetDataSize() method. - virtual uint8* GetWritableData(size_t buffer_size) = 0; + // Returns a read-write pointer to the buffer data. + virtual char* GetWritableData() = 0; // Updates the size of valid data in bytes, which must be less than or equal - // to the |buffer_size| passed to GetWritableData(). + // to GetBufferSize. virtual void SetDataSize(size_t data_size) = 0; + + // Returns the maximum allocated size for this buffer. + virtual size_t GetBufferSize() const = 0; }; |