Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <AERingBuffer.h>
Public Member Functions | |
AERingBuffer ()=default | |
AERingBuffer (unsigned int size, unsigned int planes=1) | |
~AERingBuffer () | |
bool | Create (int size, unsigned int planes=1) |
void | Reset () |
int | Write (unsigned char *src, unsigned int size, unsigned int plane=0) |
int | Read (unsigned char *dest, unsigned int size, unsigned int plane=0) |
void | Dump () |
unsigned int | GetWriteSize () |
unsigned int | GetReadSize () |
unsigned int | GetMaxSize () |
unsigned int | NumPlanes () const |
This buffer can be used by one read and one write thread at any one time without the risk of data corruption. If you intend to call the Reset() method, please use Locks. All other operations are thread-safe.
|
default |
|
inline |
Allocates space for buffer, and sets it's contents to 0.
|
inline |
Dumps the buffer.
|
inline |
Returns the buffer size.
|
inline |
Returns available space for reading from buffer. Attempt to read more bytes than available results in AE_RING_BUFFER_EMPTY.
|
inline |
Returns available space for writing to buffer. Attempt to write more bytes than available results in AE_RING_BUFFER_FULL.
|
inline |
Returns the number of planes
Reads data from buffer. Attempt to read more bytes than available results in RING_BUFFER_NOTAVAILABLE. Reading from empty buffer returns AE_RING_BUFFER_EMPTY
|
inline |
Fills the buffer with zeros and resets the pointers. This method is not thread-safe, so before using this method please acquire a Lock()
Writes data to buffer. Attempt to write more bytes than available results in AE_RING_BUFFER_FULL.