RTP Trace System
1.0
|
Encoder Interface. More...
#include <encoderinterface.h>
Public Member Functions | |
virtual | ~EncoderInterface () |
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 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.
Coral::EncoderInterface::~EncoderInterface | ( | ) | [virtual] |
Virtual destructor.
virtual void Coral::EncoderInterface::activate | ( | ) | [pure virtual] |
Activate the encoder. Usage example: Start an encoder thread.
Implemented in Coral::TraceEncoderRepository, and Coral::TraceEncoder.
virtual bool Coral::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 Coral::TraceEncoderRepository, and Coral::TraceEncoder.
virtual void Coral::EncoderInterface::deactivate | ( | ) | [pure virtual] |
Deactivate the encoder. Usage example: Stop an encoder thread.
Implemented in Coral::TraceEncoderRepository, and Coral::TraceEncoder.
virtual cardinal Coral::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 Coral::TraceEncoderRepository, and Coral::TraceEncoder.
virtual AbstractQoSDescription* Coral::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 Coral::TraceEncoderRepository, and Coral::TraceEncoder.
virtual const card16 Coral::EncoderInterface::getTypeID | ( | ) | const [pure virtual] |
Get the encoder's type ID.
Implemented in Coral::TraceEncoderRepository, and Coral::TraceEncoder.
virtual const char* Coral::EncoderInterface::getTypeName | ( | ) | const [pure virtual] |
Get the encoder's name.
Implemented in Coral::TraceEncoderRepository, and Coral::TraceEncoder.
virtual bool Coral::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 Coral::TraceEncoderRepository, and Coral::TraceEncoder.
virtual void Coral::EncoderInterface::reset | ( | ) | [pure virtual] |
Reset the encoder. Usage example: Reset an encoder thread.
Implemented in Coral::TraceEncoderRepository, and Coral::TraceEncoder.
virtual void Coral::EncoderInterface::updateQuality | ( | const AbstractQoSDescription * | aqd | ) | [pure virtual] |
Update encoder quality to changes made in QoS description returned by getQoSDescription().
Implemented in Coral::TraceEncoderRepository, and Coral::TraceEncoder.