RTP Audio System  2.0.0
RTPReceiver Class Reference

RTP Receiver. More...

#include <rtpreceiver.h>

Inheritance diagram for RTPReceiver:
Thread Synchronizable

List of all members.

Public Member Functions

 RTPReceiver ()
 RTPReceiver (DecoderInterface *decoder, Socket *receiverSocket)
 ~RTPReceiver ()
void init (DecoderInterface *decoder, Socket *receiverSocket)
card64 getPosition ()
card64 getMaxPosition ()
card64 getBytesReceived (const cardinal layer)
card64 getPacketsReceived (const cardinal layer)
void resetBytesReceived (const cardinal layer)
void resetPacketsReceived (const cardinal layer)
cardinal getLayers ()
InternetFlow getInternetFlow (const cardinal layer=0)
SourceStateInfo getSSI (const cardinal layer=0)

Protected Attributes

cardinal Layers
InternetFlow Flow [RTPConstants::RTPMaxQualityLayers]
SourceStateInfo SSI [RTPConstants::RTPMaxQualityLayers]
card64 BytesReceived [RTPConstants::RTPMaxQualityLayers]
card64 PacketsReceived [RTPConstants::RTPMaxQualityLayers]

Private Member Functions

void run ()

Private Attributes

DecoderInterfaceDecoder
SocketReceiverSocket

Friends

class RTCPSender

Detailed Description

RTP Receiver.

This class implements an RTP receiver based on Thread.

Author:
Thomas Dreibholz
Version:
1.0

Constructor & Destructor Documentation

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

See also:
init
RTPReceiver::RTPReceiver ( DecoderInterface decoder,
Socket receiverSocket 
)

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

Parameters:
decoderDecoder to handle packets received.
receiverSocketSocket to receive data from.
See also:
Thread::start

Destructor.


Member Function Documentation

card64 RTPReceiver::getBytesReceived ( const cardinal  layer) [inline]

Get number of bytes received.

Parameters:
layerLayer number or (cardinal)-1 to get sum of all layers.
Returns:
Bytes received.
InternetFlow RTPReceiver::getInternetFlow ( const cardinal  layer = 0) [inline]

Get InternetFlow of last transmission in a given layer.

Parameters:
layerLayer number.
Returns:
InternetFlow.

Get number of layers of last transmission.

Returns:
Number of layers.

Get maximum position of the encoder. The access is synchronized with the receiver thread.

Returns:
Maximum position in nanoseconds.
card64 RTPReceiver::getPacketsReceived ( const cardinal  layer) [inline]

Get number of packets received.

Parameters:
layerLayer number or (cardinal)-1 to get sum of all layers.
Returns:
Packets received.

Get position of the encoder. The access is synchronized with the receiver thread.

Returns:
Position in nanoseconds.
SourceStateInfo RTPReceiver::getSSI ( const cardinal  layer = 0) [inline]

Get SourceStateInfo for given layer.

void RTPReceiver::init ( DecoderInterface decoder,
Socket receiverSocket 
)

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

Parameters:
decoderDecoder to handle packets received.
receiverSocketSocket to receive data from.
See also:
Thread::start
void RTPReceiver::resetBytesReceived ( const cardinal  layer) [inline]

Reset number of bytes received.

Parameters:
layerLayer number.
void RTPReceiver::resetPacketsReceived ( const cardinal  layer) [inline]

Reset number of packets received.

Parameters:
layerLayer number.
void RTPReceiver::run ( ) [private, virtual]

The virtual run() method, which contains the thread's implementation. It has to be implemented by classes, which inherit Thread.

Implements Thread.


Friends And Related Function Documentation

friend class RTCPSender [friend]

RTCPSender is a friend class to enable efficient update of SSI data.


Member Data Documentation


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