class DecoderInterface

Decoder Interface. More...

Contains pure virtuals
Full nameCoral::DecoderInterface
Definition#include <decoderinterface.h>
Inherited byAudioDecoderInterface, AdvancedAudioDecoder, AudioDecoderRepository, SimpleAudioDecoder, DecoderRepositoryInterface, AudioDecoderRepository
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Members


Detailed Description

This class is the interface for a decoder.

~DecoderInterface ()
[virtual]

Virtual destructor.

const card16 getTypeID ()
[const pure virtual]

Get the decoder's type ID.

Returns: Decoder's type ID.

const char* getTypeName ()
[const pure virtual]

Get the decoder's name.

Returns: Decoder's name

void activate ()
[pure virtual]

Activate the decoder. Usage example: Start an decoder thread.

void deactivate ()
[pure virtual]

Deactivate the decoder. Usage example: Stop an decoder thread.

void reset ()
[pure virtual]

Reset the decoder. Usage example: Reset an decoder thread.

void getTransportInfo (TransportInfo& transportInfo, const cardinal headerSize, const cardinal maxPacketSize, const bool calculateLevels = true)
[const pure virtual]

Get TransportInfo for encoding.

Note: maxPacketSize gives the total size of the packet. The size usable by the encoder is maxPacketSize - headerSize!

Parameters:
transportInfoPointer to TransportInfo.
headerSizeSize of underlying protocol's header (e.g. RTP packet)
maxPacketSizeMaximum size of packet.
wantedQualityAudio quality wanted by the receiver.
calculateLevelstrue to calculate all level constants; false otherwise.

bool checkNextPacket (DecoderPacket* packet)
[pure virtual]

Check next packet. This function has to set valid packet->Layers and packet->Layer value.

Parameters:
decoderPacketDecoderPacket structure.

Returns: true, if packet is valid; false otherwise.

void handleNextPacket (const DecoderPacket* decoderPacket)
[pure virtual]

Handle next received packet.

Parameters:
decoderPacketDecoderPacket structure.

void getMediaInfo (MediaInfo& mediaInfo)
[const pure virtual]

Get media info.

Parameters:
mediaInfoReference to store MediaInfo to.

card8 getErrorCode ()
[const pure virtual]

Get error code Usage example: Return error, if reading from file failed.

Returns: Error code

card64 getPosition ()
[const pure virtual]

Get current position in nanoseconds.

Returns: Position in nanoseconds.

card64 getMaxPosition ()
[const pure virtual]

Get maximum position in nanoseconds.

Returns: Maximum position in nanoseconds.