RTP Trace System  1.0
Coral::RTPSender Class Reference

RTP Sender. More...

#include <rtpsender.h>

Inheritance diagram for Coral::RTPSender:
Coral::ManagedStreamInterface Coral::TimedThread Coral::Thread Coral::Synchronizable

List of all members.

Public Member Functions

 RTPSender ()
 RTPSender (const card32 ssrc, EncoderInterface *encoder, Socket *senderSocket, const cardinal maxPacketSize=1500, BandwidthManager *bwManager=NULL)
 ~RTPSender ()
void init (const card32 ssrc, EncoderInterface *encoder, Socket *senderSocket, const cardinal maxPacketSize=1500, BandwidthManager *bwManager=NULL)
AbstractQoSDescriptiongetQoSDescription (const card64 offset)
void updateQuality (const AbstractQoSDescription *aqd)
void lock ()
void unlock ()
cardinal getMaxPacketSize () const
cardinal setMaxPacketSize (const cardinal size)
bool paused () const
bool transmissionErrorDetected ()
void setPause (const bool on)
card64 getBytesSent () const
card64 getPacketsSent () const
void resetBytesSent ()
void resetPacketsSent ()

Private Member Functions

void timerEvent ()
void update (const AbstractQoSDescription *aqd)

Private Attributes

EncoderInterfaceEncoder
SocketSenderSocket
cardinal FramesPerSecond
cardinal RenewCounter
cardinal MaxPacketSize
card32 SSRC
card64 BytesSent
card64 PacketsSent
card64 TimeStamp
card32 PayloadBytesSent
card32 PayloadPacketsSent
bool Pause
bool TransmissionError
InternetFlow Flow [RTPConstants::RTPMaxQualityLayers]
card16 SequenceNumber [RTPConstants::RTPMaxQualityLayers]
BandwidthManagerBandwidthMgr
cardinal Bandwidth [RTPConstants::RTPMaxQualityLayers]
double BufferDelay [RTPConstants::RTPMaxQualityLayers]
TrafficShaper SenderReportBuffer
TrafficShaper Shaper [RTPConstants::RTPMaxQualityLayers]

Detailed Description

RTP Sender.

This class implements an RTP sender based on TimedThread.

Author:
Thomas Dreibholz
Version:
1.0

Constructor & Destructor Documentation

Default constructor. You have to initialize RTPSender by calling init(...) later!

See also:
init
Coral::RTPSender::RTPSender ( const card32  ssrc,
EncoderInterface encoder,
Socket senderSocket,
const cardinal  maxPacketSize = 1500,
BandwidthManager bwManager = NULL 
)

Constructor for new RTPSender. The new sender's thread has to be started by calling start()!

Parameters:
ssrcSender's SSRC (see RFC 1889).
encoderEncoder to get packets to send from.
senderSocketSocket to write packets to.
maxPacketSizeMaximum packet size.
bwManagerBandwidth manager.
See also:
Thread::start

Member Function Documentation

Get number of bytes sent.

Returns:
Bytes sent.

Get maximum packet size.

Returns:
Maximum packet size.

Get number of packets sent.

Returns:
Packets sent.
void Coral::RTPSender::init ( const card32  ssrc,
EncoderInterface encoder,
Socket senderSocket,
const cardinal  maxPacketSize = 1500,
BandwidthManager bwManager = NULL 
)

Initialize new RTPSender. The new sender's thread has to be started by calling start()!

Parameters:
ssrcSender's SSRC (see RFC 1889).
encoderEncoder to get packets to send from.
senderSocketSocket to write packets to.
maxPacketSizeMaximum packet size.
bwManagerBandwidth manager.
See also:
Thread::start
bool Coral::RTPSender::paused ( ) const [inline]

Check, if transmission is paused.

Returns:
true, if paused; false otherwise.

Reset number of bytes sent.

Reset number of packets sent.

Set maximum packet size.

Parameters:
sizeMaximum packet size.
Returns:
Maximum packet size set.
void Coral::RTPSender::setPause ( const bool  on) [inline]

Set pause on or off.

Parameters:
ontrue to set pause on; false to set pause off.
void Coral::RTPSender::timerEvent ( ) [private, virtual]

The virtual timerEvent() method, which contains the timed thread's implementation. It has to be implemented by classes, which inherit TimedThread. This method is called regularly with the given interval.

Implements Coral::TimedThread.

Check, if transmission error has been detected (e.g. destination rejects packets, no route etc.). Note: The transmission error attribute will be resetted to false by calling this method.

void Coral::RTPSender::update ( const AbstractQoSDescription aqd) [private]

Member Data Documentation

bool Coral::RTPSender::Pause [private]

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