PrimoBurner(tm) for C++
4.6
CD, DVD and Blu-ray Software Development Kit
|
A buffer for media data. More...
#include <PrimoAV.h>
Inherits Reference.
Public Member Functions | |
virtual bool_t | alloc (int32_t size, bool_t keepData)=0 |
Allocates internal buffer storage. More... | |
virtual bool_t | append (const void *data, int32_t dataSize)=0 |
Appends data to the end of the MediaBuffer data. More... | |
virtual bool_t | attach (void *buffer, int32_t size, bool_t setData)=0 |
Attaches an external buffer storage. More... | |
virtual int32_t | capacity () const =0 |
Returns the size of the buffer in bytes. More... | |
virtual void | clear ()=0 |
Clears existing data. More... | |
virtual MediaBuffer * | clone () const =0 |
Creates a deep copy of this object. More... | |
virtual uint8_t * | data () const =0 |
Returns a pointer to the first byte of data. 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 * | detach ()=0 |
Detaches an external buffer storage. More... | |
virtual bool_t | external () const =0 |
Returns whether the MediaBuffer uses an external data buffer. More... | |
virtual void | free ()=0 |
Frees internal buffer storage. More... | |
virtual int32_t | freeLinearSpace () const =0 |
Returns the free linear space that can be used to append data without normalization. More... | |
virtual int32_t | freeSpace () const =0 |
Returns the free space that can be used to append data without buffer reallocation. More... | |
virtual void | normalize ()=0 |
Moves the existing data to the start of the buffer amd maximizes the free linear space. More... | |
virtual void | remove (int32_t dataSize)=0 |
Removes data from the beginning of the MediaBuffer data. More... | |
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 uint8_t * | start () const =0 |
Returns a pointer to the start of the buffer. More... | |
Public Member Functions inherited from Reference | |
virtual int32_t | release () const =0 |
Releases the instance. More... | |
virtual int32_t | retain () const =0 |
Retains 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 |
Allocates internal buffer storage.
size | Requested buffer size. A buffer storage is allocated only if the requested size exceeds the current buffer size (capacity). The actual allocated buffer may be larger than the requested size. |
keepData | Specifies whether to keep the existing data when the existing buffer is resized. |
|
pure virtual |
Appends data to the end of the MediaBuffer data.
data | A pointer to the data that should be appended. |
dataSize | The number of bytes that should be appended. |
Referenced by primo::codecs::PRIMO_DEPRECATED().
|
pure virtual |
Attaches an external buffer storage.
buffer | A pointer to the buffer storage. |
size | The buffer size. |
setData | Specifies whether to auto set data with a size equal to the buffer size. If TRUE the data size is set to the buffer size. If FALSE data size is 0. |
|
pure virtual |
Returns the size of the buffer in bytes.
Referenced by primo::codecs::PRIMO_DEPRECATED().
|
pure virtual |
Clears existing data.
Referenced by primo::codecs::PRIMO_DEPRECATED().
|
pure virtual |
Creates a deep copy of this object.
|
pure virtual |
Returns a pointer to the first byte of data.
This is effectively the same as start() + dataOffset().
|
pure virtual |
Returns the offset at which valid data starts in the buffer.
|
pure virtual |
Returns the size of the valid data that in the buffer.
Referenced by primo::codecs::PRIMO_DEPRECATED().
|
pure virtual |
Detaches an external buffer storage.
|
pure virtual |
Returns whether the MediaBuffer uses an external data buffer.
|
pure virtual |
Frees internal buffer storage.
|
pure virtual |
Returns the free linear space that can be used to append data without normalization.
Referenced by primo::codecs::PRIMO_DEPRECATED().
|
pure virtual |
Returns the free space that can be used to append data without buffer reallocation.
|
pure virtual |
Moves the existing data to the start of the buffer amd maximizes the free linear space.
Referenced by primo::codecs::PRIMO_DEPRECATED().
|
pure virtual |
Removes data from the beginning of the MediaBuffer data.
dataSize | The number of bytes that should be removed from the valid data. |
Referenced by primo::codecs::PRIMO_DEPRECATED().
|
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(). |
|
pure virtual |
Returns a pointer to the start of the buffer.