AVBlocks for C++
1.13
Audio and Video Software Development Kit
|
A buffer for media data. More...
Inherits Reference.
Public Member Functions | |
virtual bool_t | setData (int32_t dataOffset, int32_t dataSize)=0 |
Sets the offset at which valid data starts in the buffer block and the data size in bytes. More... | |
virtual int32_t | dataOffset () const =0 |
Returns the offset at which valid data starts in the buffer. More... | |
virtual int32_t | dataSize () const =0 |
Returns the size of the valid data that in the buffer. More... | |
virtual uint8_t * | data () const =0 |
Returns a pointer to the first byte of data. More... | |
virtual uint8_t * | start () const =0 |
Returns a pointer to the start of the buffer. More... | |
virtual int32_t | capacity () const =0 |
Returns the size of the buffer in bytes. More... | |
Public Member Functions inherited from Reference | |
virtual int32_t | retain () const =0 |
Retains the instance. More... | |
virtual int32_t | release () const =0 |
Releases the instance. More... | |
virtual int32_t | retainCount () const =0 |
Returns the current reference count. More... | |
Protected Member Functions | |
~MediaBuffer () | |
This object can be destroyed only by its implementation. More... | |
A buffer for media data.
MediaBuffer has a capacity which is the size of the buffer and data size which is the size of the actual data in the buffer. The buffer is a continuous block of memory. The valid data is also a continuous block. The data can start at any offset in the buffer.
|
protected |
This object can be destroyed only by its implementation.
The caller must use Reference::release.
|
pure virtual |
Returns the size of the buffer in bytes.
Referenced by Buffer::freeLinearSpace().
|
pure virtual |
Returns a pointer to the first byte of data.
This is effectively the same as start() + dataOffset().
Referenced by Buffer::normalize(), and Buffer::push().
|
pure virtual |
Returns the offset at which valid data starts in the buffer.
Referenced by Buffer::freeLinearSpace(), Buffer::normalize(), Buffer::pop(), and Buffer::push().
|
pure virtual |
Returns the size of the valid data that in the buffer.
Referenced by Buffer::freeLinearSpace(), Buffer::normalize(), Buffer::pop(), and Buffer::push().
|
pure virtual |
Sets the offset at which valid data starts in the buffer block and the data size in bytes.
The data offset and size are validated so that they are always within the buffer.
dataOffset | The offset at which valid data starts in the buffer. Allowed values range from 0 to capacity()-1. |
dataSize | The size of the valid data in the buffer. Allowed values range from 0 to capacity(). |
Referenced by Buffer::clear(), Buffer::normalize(), Buffer::pop(), and Buffer::push().
|
pure virtual |
Returns a pointer to the start of the buffer.
Referenced by Buffer::normalize().