Theora Playback Library
1.1.0
|
Public Member Functions | |
TheoraMemoryFileDataSource (unsigned char *data, long size, const std::string &filename="memory") | |
TheoraMemoryFileDataSource (std::string filename) | |
~TheoraMemoryFileDataSource () | |
int | read (void *output, int nBytes) |
void | seek (uint64_t byte_index) |
position the source pointer to byte_index from the start of the source More... | |
std::string | repr () |
returns a string representation of the DataSource, eg 'File: source.ogg' More... | |
uint64_t | size () |
return the size of the stream in bytes More... | |
uint64_t | tell () |
return the current position of the source pointer More... | |
std::string | getFilename () |
Public Member Functions inherited from TheoraDataSource | |
virtual | ~TheoraDataSource () |
Pre-loads the entire file and streams from memory. Very useful if you're continuously displaying a video and want to avoid disk reads. Not very practical for large files.
TheoraMemoryFileDataSource::TheoraMemoryFileDataSource | ( | unsigned char * | data, |
long | size, | ||
const std::string & | filename = "memory" |
||
) |
TheoraMemoryFileDataSource::TheoraMemoryFileDataSource | ( | std::string | filename | ) |
TheoraMemoryFileDataSource::~TheoraMemoryFileDataSource | ( | ) |
|
inline |
|
virtual |
Reads nBytes bytes from data source and returns number of read bytes. if function returns less bytes then nBytes, the system assumes EOF is reached.
Implements TheoraDataSource.
|
inlinevirtual |
returns a string representation of the DataSource, eg 'File: source.ogg'
Implements TheoraDataSource.
|
virtual |
position the source pointer to byte_index from the start of the source
Implements TheoraDataSource.
|
virtual |
return the size of the stream in bytes
Implements TheoraDataSource.
|
virtual |
return the current position of the source pointer
Implements TheoraDataSource.