|
|
This class is the interface for a decoder.
~DecoderInterface () |
Virtual destructor.
const card16 getTypeID () |
Get the decoder's type ID.
Returns: Decoder's type ID.
const char* getTypeName () |
Get the decoder's name.
Returns: Decoder's name
void activate () |
Activate the decoder. Usage example: Start an decoder thread.
void deactivate () |
Deactivate the decoder. Usage example: Stop an decoder thread.
void reset () |
Reset the decoder. Usage example: Reset an decoder thread.
void getTransportInfo (TransportInfo& transportInfo, const cardinal headerSize, const cardinal maxPacketSize, const bool calculateLevels = true) |
Get TransportInfo for encoding.
Note: maxPacketSize gives the total size of the packet. The size usable by the encoder is maxPacketSize - headerSize!
Parameters:
transportInfo | Pointer to TransportInfo. |
headerSize | Size of underlying protocol's header (e.g. RTP packet) |
maxPacketSize | Maximum size of packet. |
wantedQuality | Audio quality wanted by the receiver. |
calculateLevels | true to calculate all level constants; false otherwise. |
bool checkNextPacket (DecoderPacket* packet) |
Check next packet. This function has to set valid packet->Layers and packet->Layer value.
Parameters:
decoderPacket | DecoderPacket structure. |
Returns: true, if packet is valid; false otherwise.
void handleNextPacket (const DecoderPacket* decoderPacket) |
Handle next received packet.
Parameters:
decoderPacket | DecoderPacket structure. |
void getMediaInfo (MediaInfo& mediaInfo) |
Get media info.
Parameters:
mediaInfo | Reference to store MediaInfo to. |
card8 getErrorCode () |
Get error code Usage example: Return error, if reading from file failed.
Returns: Error code
card64 getPosition () |
Get current position in nanoseconds.
Returns: Position in nanoseconds.
card64 getMaxPosition () |
Get maximum position in nanoseconds.
Returns: Maximum position in nanoseconds.