Stream cursor for memory buffer access.
More...
#include <Stream/CMemoryStream.h>
|
|
| CMemoryStreamCursor (unsigned char *buffer, int size) |
| virtual int | seek (int pos, EOrigin origin) |
| | Move the cursor position.
|
| virtual int | tell () |
| | Get current cursor position.
|
| virtual int | read (unsigned char *buff, int len) |
| | Read data from the stream.
|
| virtual bool | endOfStream () |
| | Check if the cursor is at the end of the stream.
|
| virtual int | size () |
| | Get total size of the stream.
|
| virtual bool | readyReadData (int len) |
| | Check if a certain amount of data is ready to be read.
|
| virtual void | trim () |
| | Trim read data from the stream (used in dynamic streams).
|
|
|
unsigned char * | m_buffer |
|
int | m_size |
|
int | m_pos |
Stream cursor for memory buffer access.
◆ endOfStream()
| virtual bool Skylicht::Audio::CMemoryStreamCursor::endOfStream |
( |
| ) |
|
|
virtual |
◆ read()
| virtual int Skylicht::Audio::CMemoryStreamCursor::read |
( |
unsigned char * | buff, |
|
|
int | len ) |
|
virtual |
Read data from the stream.
- Parameters
-
| buff | Destination buffer |
| len | Number of bytes to read |
- Returns
- Number of bytes actually read
Implements Skylicht::Audio::IStreamCursor.
◆ readyReadData()
| virtual bool Skylicht::Audio::CMemoryStreamCursor::readyReadData |
( |
int | len | ) |
|
|
virtual |
Check if a certain amount of data is ready to be read.
- Parameters
-
| len | Number of bytes to check |
- Returns
- True if data is available
Implements Skylicht::Audio::IStreamCursor.
◆ seek()
| virtual int Skylicht::Audio::CMemoryStreamCursor::seek |
( |
int | pos, |
|
|
EOrigin | origin ) |
|
virtual |
Move the cursor position.
- Parameters
-
| pos | Offset in bytes |
| origin | Where to seek from |
- Returns
- 0 on success, or -1 on error
Implements Skylicht::Audio::IStreamCursor.
◆ size()
| virtual int Skylicht::Audio::CMemoryStreamCursor::size |
( |
| ) |
|
|
virtual |
◆ tell()
| virtual int Skylicht::Audio::CMemoryStreamCursor::tell |
( |
| ) |
|
|
virtual |
The documentation for this class was generated from the following file: