RTP Audio System  2.0.0
RTCPSender Class Reference

RTCP Sender. More...

#include <rtcpsender.h>

Inheritance diagram for RTCPSender:
TimedThread MultiTimerThread< Timers > Thread Synchronizable

List of all members.

Public Member Functions

 RTCPSender ()
 RTCPSender (const InternetFlow &flow, const card32 ssrc, Socket *senderSocket, RTPReceiver *receiver, const card64 bandwidth, const card32 controlPPID)
 ~RTCPSender ()
void init (const InternetFlow &flow, const card32 ssrc, Socket *senderSocket, RTPReceiver *receiver, const card64 bandwidth, const card32 controlPPID)
integer sendApp (const char *name, const void *data, const cardinal dataLength)
integer sendBye ()
integer sendReport ()
integer sendSDES ()
bool addSDESItem (const card8 type, const void *data, const card8 length=0)
void removeSDESItem (const card8 type)

Private Member Functions

void timerEvent ()
double computeTransmissionInterval ()

Private Attributes

InternetFlow Flow
SocketAddressReceiverAddress
SocketSenderSocket
RTPReceiverReceiver
card32 SSRC
std::multimap< const card8,
RTCPSourceDescriptionItem * > 
SDESItemSet
Randomizer Random
card32 ControlPPID
bool Initial
bool WeSent
integer Senders
integer Members
double RTCPBandwidth
double AverageRTCPSize

Detailed Description

RTCP Sender.

This class implements an RTCP 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
RTCPSender::RTCPSender ( const InternetFlow flow,
const card32  ssrc,
Socket senderSocket,
RTPReceiver receiver,
const card64  bandwidth,
const card32  controlPPID 
)

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

Parameters:
flowFlow to remote side.
ssrcSSRC.
senderSocketSocket to write data to.
receiverRTPReceiver for reports to send.
bandwidthRTCP Bandwidth (see RFC 1889).
controlPPIDPPID for SCTP transport.

Destructor.


Member Function Documentation

bool RTCPSender::addSDESItem ( const card8  type,
const void *  data,
const card8  length = 0 
)

Add SDES item to SDES item list. If a SDES item with the same type already exists in the list, the new item replaces the old item.

Parameters:
typeSDES item type.
dataSDES item data.
lengthSDES item data length.
Returns:
true, if item has been added; false, if not.
See also:
sendSDES
void RTCPSender::init ( const InternetFlow flow,
const card32  ssrc,
Socket senderSocket,
RTPReceiver receiver,
const card64  bandwidth,
const card32  controlPPID 
)

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

Parameters:
flowFlow to remote side.
ssrcSSRC.
senderSocketSocket to write data to.
receiverRTPReceiver for reports to send.
bandwidthRTCP Bandwidth (see RFC 1889).
controlPPIDPPID for SCTP transport.
void RTCPSender::removeSDESItem ( const card8  type)

Remove SDES item from SDES item list.

Parameters:
typeSDES item type to be removed.
See also:
addSDESItem
sendSDES
integer RTCPSender::sendApp ( const char *  name,
const void *  data,
const cardinal  dataLength 
)

Send RTCP APP message.

Parameters:
nameRTCP APP name.
dataRTCP APP data.
dataLengthRTCP APP data length.
Returns:
Bytes sent.

Send RTCP BYE message.

Returns:
Bytes sent.

Send RTCP receiver report from the SourceStateInfo given in the constructor.

Returns:
Bytes sent.

Send RTCP SDES message from the list given by addSDESItem().

Returns:
Bytes sent.
See also:
addSDESItem
void RTCPSender::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.


Member Data Documentation

double RTCPSender::AverageRTCPSize [private]
bool RTCPSender::Initial [private]
double RTCPSender::RTCPBandwidth [private]
std::multimap<const card8,RTCPSourceDescriptionItem*> RTCPSender::SDESItemSet [private]
bool RTCPSender::WeSent [private]

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