Theora Playback Library  1.1.0
Public Member Functions | List of all members
TheoraMemoryFileDataSource Class Reference
Inheritance diagram for TheoraMemoryFileDataSource:
TheoraDataSource

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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

TheoraMemoryFileDataSource::TheoraMemoryFileDataSource ( unsigned char *  data,
long  size,
const std::string &  filename = "memory" 
)
TheoraMemoryFileDataSource::TheoraMemoryFileDataSource ( std::string  filename)
TheoraMemoryFileDataSource::~TheoraMemoryFileDataSource ( )

Member Function Documentation

std::string TheoraMemoryFileDataSource::getFilename ( )
inline
int TheoraMemoryFileDataSource::read ( void *  output,
int  nBytes 
)
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.

std::string TheoraMemoryFileDataSource::repr ( )
inlinevirtual

returns a string representation of the DataSource, eg 'File: source.ogg'

Implements TheoraDataSource.

void TheoraMemoryFileDataSource::seek ( uint64_t  byte_index)
virtual

position the source pointer to byte_index from the start of the source

Implements TheoraDataSource.

uint64_t TheoraMemoryFileDataSource::size ( )
virtual

return the size of the stream in bytes

Implements TheoraDataSource.

uint64_t TheoraMemoryFileDataSource::tell ( )
virtual

return the current position of the source pointer

Implements TheoraDataSource.


The documentation for this class was generated from the following file: