RTP Audio System  2.0.0
RTPSender Class Reference

RTP Sender. More...

#include <rtpsender.h>

Inheritance diagram for RTPSender:
ManagedStreamInterface TimedThread MultiTimerThread< Timers > Thread Synchronizable

List of all members.

Public Member Functions

 RTPSender ()
 RTPSender (const InternetFlow &flow, const card32 ssrc, EncoderInterface *encoder, Socket *senderSocket, const card32 controlPPID, const card32 dataPPID, const cardinal maxPacketSize=1500, QoSManagerInterface *qosManager=NULL)
 ~RTPSender ()
void init (const InternetFlow &flow, const card32 ssrc, EncoderInterface *encoder, Socket *senderSocket, const card32 controlPPID, const card32 dataPPID, const cardinal maxPacketSize=1500, QoSManagerInterface *qosManager=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 ()
card64 getPacketsSent ()
void resetBytesSent ()
void resetPacketsSent ()

Private Member Functions

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

Private Attributes

EncoderInterfaceEncoder
SocketSenderSocket
cardinal FramesPerSecond
cardinal RenewCounter
cardinal MaxPacketSize
card32 SSRC
card64 BytesSent
card64 PacketsSent
card64 TimeStamp
card32 ControlPPID
card32 DataPPID
card32 PayloadBytesSent
card32 PayloadPacketsSent
bool Pause
bool TransmissionError
InternetFlow Flow [RTPConstants::RTPMaxQualityLayers]
card16 SequenceNumber [RTPConstants::RTPMaxQualityLayers]
QoSManagerInterfaceQoSMgr
cardinal Bandwidth [RTPConstants::RTPMaxQualityLayers]
double BufferDelay [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
RTPSender::RTPSender ( const InternetFlow flow,
const card32  ssrc,
EncoderInterface encoder,
Socket senderSocket,
const card32  controlPPID,
const card32  dataPPID,
const cardinal  maxPacketSize = 1500,
QoSManagerInterface qosManager = NULL 
)

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

Parameters:
flowFlow to remote side.
ssrcSender's SSRC (see RFC 1889).
encoderEncoder to get packets to send from.
senderSocketSocket to write packets to.
controlPPIDPPID for SCTP control transport.
dataPPIDPPID for SCTP data transport.
maxPacketSizeMaximum packet size.
qosManagerQoS manager.
See also:
Thread::start

Destructor.


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 RTPSender::init ( const InternetFlow flow,
const card32  ssrc,
EncoderInterface encoder,
Socket senderSocket,
const card32  controlPPID,
const card32  dataPPID,
const cardinal  maxPacketSize = 1500,
QoSManagerInterface qosManager = NULL 
)

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

Parameters:
flowFlow to remote side.
ssrcSender's SSRC (see RFC 1889).
encoderEncoder to get packets to send from.
senderSocketSocket to write packets to.
controlPPIDPPID for SCTP control transport.
dataPPIDPPID for SCTP data transport.
maxPacketSizeMaximum packet size.
qosManagerQoS manager.
See also:
Thread::start
void RTPSender::lock ( ) [virtual]
bool RTPSender::paused ( ) const [inline]

Check, if transmission is paused.

Returns:
true, if paused; false otherwise.
void RTPSender::resetBytesSent ( ) [inline]

Reset number of bytes sent.

void RTPSender::resetPacketsSent ( ) [inline]

Reset number of packets sent.

cardinal RTPSender::setMaxPacketSize ( const cardinal  size) [inline]

Set maximum packet size.

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

Set pause on or off.

Parameters:
ontrue to set pause on; false to set pause off.
void 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 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 RTPSender::unlock ( ) [virtual]
void RTPSender::updateFrameRate ( const AbstractQoSDescription aqd) [private]

Member Data Documentation

bool 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