RTP Audio System  2.0.0
EncoderInterface Class Reference

Encoder Interface. More...

#include <encoderinterface.h>

Inheritance diagram for EncoderInterface:
AudioEncoderInterface EncoderRepositoryInterface AdvancedAudioEncoder AudioEncoderRepository SimpleAudioEncoder AudioEncoderRepository

List of all members.

Public Member Functions

virtual const card16 getTypeID () const =0
virtual const char * getTypeName () const =0
virtual void activate ()=0
virtual void deactivate ()=0
virtual void reset ()=0
virtual bool checkInterval (card64 &time, bool &newRUList)=0
virtual bool prepareNextFrame (const cardinal headerSize, const cardinal maxPacketSize, const cardinal flags=0)=0
virtual cardinal getNextPacket (EncoderPacket *packet)=0
virtual double getFrameRate () const =0
virtual AbstractQoSDescriptiongetQoSDescription (const cardinal pktHeaderSize, const cardinal pktMaxSize, const card64 offset)=0
virtual void updateQuality (const AbstractQoSDescription *aqd)=0

Detailed Description

Encoder Interface.

This class is the interface for an encoder.

Author:
Thomas Dreibholz
Version:
1.0

Member Function Documentation

virtual void EncoderInterface::activate ( ) [pure virtual]

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

Implemented in AudioEncoderRepository, AdvancedAudioEncoder, and SimpleAudioEncoder.

virtual bool EncoderInterface::checkInterval ( card64 time,
bool &  newRUList 
) [pure virtual]

Check, when prepareNextFrame() call reaches a new interval.

Parameters:
timeReference to store time to next interval in microseconds.
Referenceto store true, if new resource/utilization list has been reached since last call; false otherwise.
Returns:
true, if new interval has been reached since last call; false otherwise.

Implemented in AudioEncoderRepository, AdvancedAudioEncoder, and SimpleAudioEncoder.

virtual void EncoderInterface::deactivate ( ) [pure virtual]

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

Implemented in AudioEncoderRepository, AdvancedAudioEncoder, and SimpleAudioEncoder.

virtual double EncoderInterface::getFrameRate ( ) const [pure virtual]

Get frame rate.

Returns:
Frame rate.

Implemented in AudioEncoderRepository, AdvancedAudioEncoder, and SimpleAudioEncoder.

virtual cardinal EncoderInterface::getNextPacket ( EncoderPacket packet) [pure virtual]

Get next packet from current frame. The maximum payload length of the packet (the size of packet->Buffer) is in packet->MaxLength.

Parameters:
packetEncoderPacket structure.
bufferBuffer of the packet to write the data into.
maxLengthMaximum length of the packet
Returns:
Real length of the data written into the buffer or 0, if there is no more data of the current frame.

Implemented in AudioEncoderRepository, AdvancedAudioEncoder, and SimpleAudioEncoder.

virtual AbstractQoSDescription* EncoderInterface::getQoSDescription ( const cardinal  pktHeaderSize,
const cardinal  pktMaxSize,
const card64  offset 
) [pure virtual]

Get QoS description. Important note: This result is a global pointer, it becomes invalid when encoder is deleted!

Parameters:
pktHeaderSizePacket header size.
pktMaxSizeMaximum packet size.
offsetRTP position offset.
Returns:
QoS Description.

Implemented in AudioEncoderRepository, AdvancedAudioEncoder, and SimpleAudioEncoder.

virtual const card16 EncoderInterface::getTypeID ( ) const [pure virtual]

Get the encoder's type ID.

Returns:
Encoder's type ID.

Implemented in AudioEncoderRepository, AdvancedAudioEncoder, and SimpleAudioEncoder.

virtual const char* EncoderInterface::getTypeName ( ) const [pure virtual]

Get the encoder's name.

Returns:
Encoder's name

Implemented in AudioEncoderRepository, AdvancedAudioEncoder, and SimpleAudioEncoder.

virtual bool EncoderInterface::prepareNextFrame ( const cardinal  headerSize,
const cardinal  maxPacketSize,
const cardinal  flags = 0 
) [pure virtual]

Prepare next frame. Usage example: Read the next frame from file, transform it into packages for transport.

Parameters:
headerSizeSize of underlying protocol's header (e.g. RTP packet)
maxPacketSizeMaximum size of packet.
flagsEncoder-specific flags (e.g. compression or encryption).
Returns:
true, if there was a next frame; false, if not.

Implemented in AudioEncoderRepository, AdvancedAudioEncoder, and SimpleAudioEncoder.

virtual void EncoderInterface::reset ( ) [pure virtual]

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

Implemented in AudioEncoderRepository, AdvancedAudioEncoder, and SimpleAudioEncoder.

virtual void EncoderInterface::updateQuality ( const AbstractQoSDescription aqd) [pure virtual]

Update encoder quality to changes made in QoS description returned by getQoSDescription().

See also:
EncoderInterface::getQoSDescription

Implemented in AudioEncoderRepository, AdvancedAudioEncoder, and SimpleAudioEncoder.


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