Stream cursor for dynamic/online memory streams. Supports trimming data from the start of the stream to save memory.
More...
#include <Stream/COnlineMemoryStream.h>
|
|
| COnlineMemoryStreamCursor (COnlineMemoryStream *stream) |
| 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 () |
| | Remove all data before the current cursor position from the stream.
|
Stream cursor for dynamic/online memory streams. Supports trimming data from the start of the stream to save memory.
◆ endOfStream()
| virtual bool Skylicht::Audio::COnlineMemoryStreamCursor::endOfStream |
( |
| ) |
|
|
virtual |
◆ read()
| virtual int Skylicht::Audio::COnlineMemoryStreamCursor::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::COnlineMemoryStreamCursor::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::COnlineMemoryStreamCursor::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::COnlineMemoryStreamCursor::size |
( |
| ) |
|
|
virtual |
◆ tell()
| virtual int Skylicht::Audio::COnlineMemoryStreamCursor::tell |
( |
| ) |
|
|
virtual |
◆ trim()
| virtual void Skylicht::Audio::COnlineMemoryStreamCursor::trim |
( |
| ) |
|
|
virtual |
The documentation for this class was generated from the following file: