RTP Trace System  1.0
Coral::TDTFMediaReader Class Reference

TDTF Media Reader. More...

#include <tdtfmediareader.h>

Inheritance diagram for Coral::TDTFMediaReader:
Coral::TDTFReader TDTFUtilizationUpdater

List of all members.

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 IntervalHeaderInterval
const ResourceUtilizationHeaderRUHeader
card64 Position
card64 MaxPosition
double FrameRate
MediaError ErrorCode

Detailed Description

TDTF Media Reader.

This class is a media reader for TDTF trace files.

Author:
Thomas Dreibholz
Version:
1.0

Constructor & Destructor Documentation


Member Function Documentation

bool Coral::TDTFMediaReader::checkInterval ( card64 time,
bool &  newRUList 
)

Check, if new interval is reached.

Parameters:
timeReference to store the time in microseconds to the next interval.
Referenceto store true, if new resource/utilization list has been reached since last call; false otherwise.
Returns:
true, if new interval is reached.
void Coral::TDTFMediaReader::close ( ) [virtual]

Close media, if opened.

Reimplemented from Coral::TDTFReader.

Get error code.

Returns:
Error code.
double Coral::TDTFMediaReader::getFrameRate ( ) const [inline]

Get frame rate.

Returns:
Frame rate.

Get maximum position.

Returns:
maximum position in nanoseconds.
void Coral::TDTFMediaReader::getMediaInfo ( MediaInfo mediaInfo) const

Get MediaInfo.

Parameters:
mediaInfoReference to store media info.
cardinal Coral::TDTFMediaReader::getNextBlock ( const cardinal  layers,
cardinal frameIDArray,
cardinal frameSizeArray 
)

Read next frame trace block.

Parameters:
layersMaximum number of layers to store in arrays.
frameIDArrayPointer to array to store frame-IDs.
frameSizeArrayPointer to array to store frame sizes.
newIntervalReference to boolean to store true, if new interval is reached; false otherwise.
Returns:
cardinal Number of layers read.

Get current position.

Returns:
Position in nanoseconds.
bool Coral::TDTFMediaReader::open ( const char *  name,
const bool  readWrite = false,
const bool  ruRequired = false 
)

Open media.

Parameters:
nameName of media, e.g. a file name.
readWritetrue to open file in read/write mode; false for read-only.
ruRequiredtrue, if file has to contain resource/utilization list for successful opening; false otherwise.
Returns:
true, if TDTFMediaReader is ready for reading; false otherwise.
bool Coral::TDTFMediaReader::ready ( ) const [inline]

Check, if TDTFMediaReader is ready for reading.

Returns:
true, if TDTFMediaReader is ready; false otherwise.
double Coral::TDTFMediaReader::setFrameRate ( const double  frameRate) [inline]

Set frame rate.

Parameters:
frameRateFrame rate.
Returns:
Frame rate set.
void Coral::TDTFMediaReader::setPosition ( const card64  position) [inline]

Get position.

Parameters:
positionPosition in nanoseconds.

Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines