RTP Trace System
1.0
|
TDTF Media Reader. More...
#include <tdtfmediareader.h>
Public Member Functions | |
TDTFMediaReader () | |
bool | open (const char *name, const bool readWrite=false, const bool ruRequired=false) |
void | close () |
bool | ready () const |
void | getMediaInfo (MediaInfo &mediaInfo) const |
MediaError | getErrorCode () const |
card64 | getPosition () const |
card64 | getMaxPosition () const |
void | setPosition (const card64 position) |
double | getFrameRate () const |
double | setFrameRate (const double frameRate) |
bool | checkInterval (card64 &time, bool &newRUList) |
cardinal | getNextBlock (const cardinal layers, cardinal *frameIDArray, cardinal *frameSizeArray) |
Private Attributes | |
const IntervalHeader * | Interval |
const ResourceUtilizationHeader * | RUHeader |
card64 | Position |
card64 | MaxPosition |
double | FrameRate |
MediaError | ErrorCode |
TDTF Media Reader.
This class is a media reader for TDTF trace files.
Constructor.
bool Coral::TDTFMediaReader::checkInterval | ( | card64 & | time, |
bool & | newRUList | ||
) |
Check, if new interval is reached.
time | Reference to store the time in microseconds to the next interval. |
Reference | to store true, if new resource/utilization list has been reached since last call; false otherwise. |
void Coral::TDTFMediaReader::close | ( | ) | [virtual] |
Close media, if opened.
Reimplemented from Coral::TDTFReader.
MediaError Coral::TDTFMediaReader::getErrorCode | ( | ) | const [inline] |
Get error code.
double Coral::TDTFMediaReader::getFrameRate | ( | ) | const [inline] |
Get frame rate.
card64 Coral::TDTFMediaReader::getMaxPosition | ( | ) | const [inline] |
Get maximum position.
void Coral::TDTFMediaReader::getMediaInfo | ( | MediaInfo & | mediaInfo | ) | const |
Get MediaInfo.
mediaInfo | Reference to store media info. |
cardinal Coral::TDTFMediaReader::getNextBlock | ( | const cardinal | layers, |
cardinal * | frameIDArray, | ||
cardinal * | frameSizeArray | ||
) |
Read next frame trace block.
layers | Maximum number of layers to store in arrays. |
frameIDArray | Pointer to array to store frame-IDs. |
frameSizeArray | Pointer to array to store frame sizes. |
newInterval | Reference to boolean to store true, if new interval is reached; false otherwise. |
card64 Coral::TDTFMediaReader::getPosition | ( | ) | const [inline] |
Get current position.
bool Coral::TDTFMediaReader::open | ( | const char * | name, |
const bool | readWrite = false , |
||
const bool | ruRequired = false |
||
) |
Open media.
name | Name of media, e.g. a file name. |
readWrite | true to open file in read/write mode; false for read-only. |
ruRequired | true, if file has to contain resource/utilization list for successful opening; false otherwise. |
bool Coral::TDTFMediaReader::ready | ( | ) | const [inline] |
Check, if TDTFMediaReader is ready for reading.
double Coral::TDTFMediaReader::setFrameRate | ( | const double | frameRate | ) | [inline] |
Set frame rate.
frameRate | Frame rate. |
void Coral::TDTFMediaReader::setPosition | ( | const card64 | position | ) | [inline] |
Get position.
position | Position in nanoseconds. |
MediaError Coral::TDTFMediaReader::ErrorCode [private] |
double Coral::TDTFMediaReader::FrameRate [private] |
const IntervalHeader* Coral::TDTFMediaReader::Interval [private] |
card64 Coral::TDTFMediaReader::MaxPosition [private] |
card64 Coral::TDTFMediaReader::Position [private] |
const ResourceUtilizationHeader* Coral::TDTFMediaReader::RUHeader [private] |