|
RTP Audio System
2.0.0
|
Encoder Interface. More...
#include <encoderinterface.h>
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 AbstractQoSDescription * | getQoSDescription (const cardinal pktHeaderSize, const cardinal pktMaxSize, const card64 offset)=0 |
| virtual void | updateQuality (const AbstractQoSDescription *aqd)=0 |
Encoder Interface.
This class is the interface for an encoder.
| 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.
| time | Reference to store time to next interval in microseconds. |
| Reference | to store true, if new resource/utilization list 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.
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.
| packet | EncoderPacket structure. |
| buffer | Buffer of the packet to write the data into. |
| maxLength | Maximum length of the packet |
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!
| pktHeaderSize | Packet header size. |
| pktMaxSize | Maximum packet size. |
| offset | RTP position offset. |
Implemented in AudioEncoderRepository, AdvancedAudioEncoder, and SimpleAudioEncoder.
| virtual const card16 EncoderInterface::getTypeID | ( | ) | const [pure virtual] |
Get the encoder's type ID.
Implemented in AudioEncoderRepository, AdvancedAudioEncoder, and SimpleAudioEncoder.
| virtual const char* EncoderInterface::getTypeName | ( | ) | const [pure virtual] |
Get the 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.
| headerSize | Size of underlying protocol's header (e.g. RTP packet) |
| maxPacketSize | Maximum size of packet. |
| flags | Encoder-specific flags (e.g. compression or encryption). |
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().
Implemented in AudioEncoderRepository, AdvancedAudioEncoder, and SimpleAudioEncoder.