RTP Trace System  1.0
Coral::RTCPSender Class Reference

RTCP Sender. More...

#include <rtcpsender.h>

Inheritance diagram for Coral::RTCPSender:
Coral::TimedThread Coral::Thread Coral::Synchronizable

List of all members.

Public Member Functions

 RTCPSender ()
 RTCPSender (const card32 ssrc, Socket *senderSocket, RTPReceiver *receiver, const card64 bandwidth)
 ~RTCPSender ()
void init (const card32 ssrc, Socket *senderSocket, RTPReceiver *receiver, const card64 bandwidth)
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

SocketAddressReceiverAddress
SocketSenderSocket
RTPReceiverReceiver
card32 SSRC
multimap< const card8,
RTCPSourceDescriptionItem * > 
SDESItemSet
Randomizer Random
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
Coral::RTCPSender::RTCPSender ( const card32  ssrc,
Socket senderSocket,
RTPReceiver receiver,
const card64  bandwidth 
)

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

Parameters:
ssrcSSRC.
senderSocketSocket to write data to.
receiverRTPReceiver for reports to send.
bandwidthRTCP Bandwidth (see RFC 1889).

Member Function Documentation

bool Coral::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 Coral::RTCPSender::init ( const card32  ssrc,
Socket senderSocket,
RTPReceiver receiver,
const card64  bandwidth 
)

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

Parameters:
ssrcSSRC.
senderSocketSocket to write data to.
receiverRTPReceiver for reports to send.
bandwidthRTCP Bandwidth (see RFC 1889).

Remove SDES item from SDES item list.

Parameters:
typeSDES item type to be removed.
See also:
addSDESItem
sendSDES
integer Coral::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 Coral::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 Coral::TimedThread.


Member Data Documentation

bool Coral::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