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

Unified Diff: media/base/buffers.h

Issue 149573: Refactor WritableBuffer interface for more useful ptr management. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/buffer_queue_unittest.cc ('k') | media/base/data_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/buffers.h
===================================================================
--- media/base/buffers.h (revision 20532)
+++ media/base/buffers.h (working copy)
@@ -102,18 +102,15 @@
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 uint8* 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 size of the underlying buffer.
+ virtual size_t GetBufferSize() const = 0;
};
« no previous file with comments | « media/base/buffer_queue_unittest.cc ('k') | media/base/data_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698