RTP Audio System  2.0.0
AudioReaderInterface Class Reference

Audio Reader Interface. More...

#include <audioreaderinterface.h>

Inheritance diagram for AudioReaderInterface:
AudioQualityInterface MP3AudioReader MultiAudioReader WavAudioReader

List of all members.

Public Member Functions

virtual bool openMedia (const char *name)=0
virtual void closeMedia ()=0
virtual bool ready () const =0
virtual void getMediaInfo (MediaInfo &mediaInfo) const =0
virtual MediaError getErrorCode () const =0
virtual card64 getPosition () const =0
virtual card64 getMaxPosition () const =0
virtual void setPosition (const card64 position)=0
virtual cardinal getNextBlock (void *buffer, const cardinal blockSize)=0

Detailed Description

Audio Reader Interface.

This class is the interface for an audio reader.

Author:
Thomas Dreibholz
Version:
1.0

Member Function Documentation

virtual void AudioReaderInterface::closeMedia ( ) [pure virtual]

Close media, if opened.

Implemented in MP3AudioReader, MultiAudioReader, and WavAudioReader.

virtual MediaError AudioReaderInterface::getErrorCode ( ) const [pure virtual]

Get error code.

Returns:
Error code.

Implemented in MP3AudioReader, MultiAudioReader, and WavAudioReader.

virtual card64 AudioReaderInterface::getMaxPosition ( ) const [pure virtual]

Get maximum position.

Returns:
maximum position in nanoseconds.

Implemented in MP3AudioReader, MultiAudioReader, and WavAudioReader.

virtual void AudioReaderInterface::getMediaInfo ( MediaInfo mediaInfo) const [pure virtual]

Get MediaInfo.

Parameters:
mediaInfoReference to store media info.

Implemented in MP3AudioReader, MultiAudioReader, and WavAudioReader.

virtual cardinal AudioReaderInterface::getNextBlock ( void *  buffer,
const cardinal  blockSize 
) [pure virtual]

Read next block. In case of an error, getNextBlock() should return 0 and set ready to false.

Parameters:
bufferBuffer for block to read.
blockSizeSize of block in bytes.
Returns:
Number of bytes read.

Implemented in MP3AudioReader, MultiAudioReader, and WavAudioReader.

virtual card64 AudioReaderInterface::getPosition ( ) const [pure virtual]

Get current position.

Returns:
Position in nanoseconds.

Implemented in MP3AudioReader, MultiAudioReader, and WavAudioReader.

virtual bool AudioReaderInterface::openMedia ( const char *  name) [pure virtual]

Open media.

Parameters:
nameName of media, e.g. a file name.
Returns:
true, if AudioReader is ready for reading; false otherwise.

Implemented in MP3AudioReader, MultiAudioReader, and WavAudioReader.

virtual bool AudioReaderInterface::ready ( ) const [pure virtual]

Check, if AudioReader is ready for reading.

Returns:
true, if AudioReader is ready; false otherwise.

Implemented in MP3AudioReader, MultiAudioReader, and WavAudioReader.

virtual void AudioReaderInterface::setPosition ( const card64  position) [pure virtual]

Get position.

Parameters:
positionPosition in nanoseconds.

Implemented in MP3AudioReader, MultiAudioReader, and WavAudioReader.


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