AVBlocks for C++
1.9
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. | |
virtual int32_t | dataOffset () const =0 |
Returns the offset at which valid data starts in the buffer. | |
virtual int32_t | dataSize () const =0 |
Returns the size of the valid data that in the buffer. | |
virtual uint8_t * | data () const =0 |
Returns a pointer to the first byte of data. | |
virtual uint8_t * | start () const =0 |
Returns a pointer to the start of the buffer. | |
virtual int32_t | capacity () const =0 |
Returns the size of the buffer in bytes. | |
Protected Member Functions | |
~MediaBuffer () | |
This object can be destroyed only by its implementation. |
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.
~MediaBuffer | ( | ) | [protected] |
This object can be destroyed only by its implementation.
The caller must use Reference::release.
virtual int32_t capacity | ( | ) | const [pure virtual] |
Returns the size of the buffer in bytes.
Referenced by Buffer::freeLinearSpace().
virtual uint8_t* data | ( | ) | const [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().
virtual int32_t dataOffset | ( | ) | const [pure virtual] |
Returns the offset at which valid data starts in the buffer.
Referenced by Buffer::freeLinearSpace(), Buffer::normalize(), Buffer::pop(), and Buffer::push().
virtual int32_t dataSize | ( | ) | const [pure virtual] |
Returns the size of the valid data that in the buffer.
Referenced by Buffer::freeLinearSpace(), Buffer::normalize(), Buffer::pop(), and Buffer::push().
virtual bool_t setData | ( | int32_t | dataOffset, |
int32_t | dataSize | ||
) | [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().
virtual uint8_t* start | ( | ) | const [pure virtual] |
Returns a pointer to the start of the buffer.
Referenced by Buffer::normalize().