RTP Trace System  1.0
Coral::EncoderInterface Class Reference

Encoder Interface. More...

#include <encoderinterface.h>

Inheritance diagram for Coral::EncoderInterface:
Coral::EncoderRepositoryInterface Coral::TraceEncoderInterface Coral::TraceEncoderRepository Coral::TraceEncoder Coral::TraceEncoderRepository

List of all members.

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 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

Constructor & Destructor Documentation

Virtual destructor.


Member Function Documentation

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().

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 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.

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 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!

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

Implemented in Coral::TraceEncoderRepository, and Coral::TraceEncoder.

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

Get the encoder's type ID.

Returns:
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.

Returns:
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.

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 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().

See also:
EncoderInterface::getQoSDescription

Implemented in Coral::TraceEncoderRepository, and Coral::TraceEncoder.


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