Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

RTPSource Class Reference

A class of objects representing sources of RTP and RTCP packets. More...

#include <cc++/rtp.h>

List of all members.

Public Methods

uint32 getID () const
uint32 getRate () const
void setKitchenSize (microtimeout_t s)
microtimeout_t getKitchenDuration () const
uint32 getKitchenSize () const
microtimeout_t getCurrentKitchenDuration ()
microtimeout_t getCurrentKitchenSize ()
const char* const getSDESItem (sdes_item_type_t type) const
const char* const getCNAME () const
const char* const getNAME () const
const char* const getEMAIL () const
const char* const getPHONE () const
const char* const getLOC () const
const char* const getTOOL () const
const char* const getNOTE () const
const char* const getPRIV () const
const char* const getH323_CADDR () const
bool isSender () const
bool isValid () const
bool operator== (const RTPSource &rhs) const
bool operator!= (const RTPSource &rhs) const

Private Methods

 RTPSource (uint32 ssrc)
 ~RTPSource ()
 RTPSource (const RTPSource &origin)
RTPSource& operator= (const RTPSource &origin)
void setCurrentKitchenSize (uint32 s)
void endSource ()
void setSDESItem (sdes_item_type_t item, const char *const value)
void recordReception (IncomingRTPPkt &p)
void recordInsertion (IncomingRTPPkt &p)
void recordExtraction (IncomingRTPPkt &p)
void setSender (bool active)
void setInitialTimestamp (uint32 ts)
uint32 getInitialTimestamp ()
uint16 getExpectedSeqNum ()
void setExpectedSeqNum (uint16 n)

Private Attributes

uint32 ssrc
uint32 initial_timestamp
uint32 packet_count
struct timeval last_time
uint32 kitchensize
uint32 currentkitchen
uint16 expectedseqnum
bool valid
bool active_sender
RTPSource* prev
RTPSource * next
IncomingRTPPktfirst
IncomingRTPPktlast
RTPSource* nextcollis
SenderInfosender_info
ReceiverInforeceiver_info
char** sdes_items
friend RTPQueue
friend QueueRTCPManager
friend IncomingRTPPkt

Static Private Attributes

const char* const unknown
const SenderInfodummySI
const ReceiverInfodummyRB

Friends

class  MembershipControl


Detailed Description

A class of objects representing sources of RTP and RTCP packets.

Each source for which any RTP or RTCP packet has been received is represented through an RTPSource object, that provides access to all known data about the source.

Note:
Objects representing sources are dinamically created and destroyed as participants enter, leave or seem to leave the current session.

Author(s):
Federico Montesino Pouzols <p5087@quintero.fie.us.es>

Definition at line 297 of file rtp.h.


Constructor & Destructor Documentation

RTPSource::RTPSource ( uint32 ssrc ) [private]
 

Parameters:
ssrc   SSRC identifier of the source

RTPSource::~RTPSource ( ) [private]
 

Purges all incoming packets from this source.

RTPSource::RTPSource ( const RTPSource & origin ) [private]
 

Parameters:
origin   the RTPSource object being copied


Member Function Documentation

void RTPSource::endSource ( ) [private]
 

const char *const RTPSource::getCNAME ( ) const [inline]
 

Definition at line 362 of file rtp.h.

microtimeout_t RTPSource::getCurrentKitchenDuration ( ) [inline]
 

Get the current size of the kitchen (buffer) for this packet as the amount of time covered by the current buffered packet.

Returns:
amount of time covered by the source reception buffer.

Definition at line 351 of file rtp.h.

microtimeout_t RTPSource::getCurrentKitchenSize ( ) [inline]
 

Definition at line 355 of file rtp.h.

const char *const RTPSource::getEMAIL ( ) const [inline]
 

Definition at line 370 of file rtp.h.

uint16 RTPSource::getExpectedSeqNum ( ) [inline, private]
 

Get the expected sequence number for the next packet to be received.

Returns:
the expected sequence number for the next packet

Definition at line 523 of file rtp.h.

const char *const RTPSource::getH323_CADDR ( ) const [inline]
 

Definition at line 394 of file rtp.h.

uint32 RTPSource::getID ( ) const [inline]
 

Definition at line 301 of file rtp.h.

uint32 RTPSource::getInitialTimestamp ( ) [inline, private]
 

Get the timestamp of the first packet received from this source. This timestamp must be substracted to the timestamp of all packets from this source so that applications will not have to handle the initial timestamp.

Returns:
timestamp of the first packet from this source

Definition at line 513 of file rtp.h.

microtimeout_t RTPSource::getKitchenDuration ( ) const [inline]
 

Get the required size of the kitchen for this source.

Returns:
global kitchen size, in microseconds

Definition at line 335 of file rtp.h.

uint32 RTPSource::getKitchenSize ( ) const [inline]
 

Definition at line 339 of file rtp.h.

const char *const RTPSource::getLOC ( ) const [inline]
 

Definition at line 378 of file rtp.h.

const char *const RTPSource::getNAME ( ) const [inline]
 

Definition at line 366 of file rtp.h.

const char *const RTPSource::getNOTE ( ) const [inline]
 

Definition at line 386 of file rtp.h.

const char *const RTPSource::getPHONE ( ) const [inline]
 

Definition at line 374 of file rtp.h.

const char *const RTPSource::getPRIV ( ) const [inline]
 

Definition at line 390 of file rtp.h.

uint32 RTPSource::getRate ( ) const
 

Get the transmission rate for this source.

Todo:
implement with RTCP checking

Referenced by getCurrentKitchenDuration(), getKitchenDuration(), and setKitchenSize().

const char* const RTPSource::getSDESItem ( sdes_item_type_t type ) const
 

Referenced by getCNAME(), getEMAIL(), getH323_CADDR(), getLOC(), getNAME(), getNOTE(), getPHONE(), getPRIV(), and getTOOL().

const char *const RTPSource::getTOOL ( ) const [inline]
 

Definition at line 382 of file rtp.h.

bool RTPSource::isSender ( ) const [inline]
 

Get if this Source is currently an active sender.

Definition at line 401 of file rtp.h.

bool RTPSource::isValid ( ) const [inline]
 

Definition at line 404 of file rtp.h.

bool RTPSource::operator!= ( const RTPSource & rhs ) const [inline]
 

Definition at line 412 of file rtp.h.

RTPSource& RTPSource::operator= ( const RTPSource & origin ) [private]
 

bool RTPSource::operator== ( const RTPSource & rhs ) const [inline]
 

Definition at line 408 of file rtp.h.

void RTPSource::recordExtraction ( IncomingRTPPkt & p ) [private]
 

Log the extraction of a packet from this source from the scheduled queue. Updates the size of this source's kitchen.

Parameters:
p   packet extracted from the queue

void RTPSource::recordInsertion ( IncomingRTPPkt & p ) [private]
 

Log the insertion of a packet from this source into the scheduled queue. Updates the size of this source's kitchen. All received packets should be registered with recordReception(), but only those actually inserted into the queue should be registered via this method.

Parameters:
p   packet inserted into the queue

void RTPSource::recordReception ( IncomingRTPPkt & p ) [private]
 

Log the reception of a new packet from this source. Updates data such as the packet counter, the expected sequence number for the next packet and the time the last packet was received at.

Parameters:
p   packet just created and to be logged

void RTPSource::setCurrentKitchenSize ( uint32 s ) [inline, private]
 

Set the current size of the kitchen (buffer) for this packet as the amount of octets accummulated in the incoming packet queue.

Parameters:
s   octets accumulated in the buffer.

Definition at line 444 of file rtp.h.

void RTPSource::setExpectedSeqNum ( uint16 n ) [inline, private]
 

Set the expected sequence number for the next packet to be recived.

Parameters:
n   expected sequence number for the next packet

Definition at line 533 of file rtp.h.

void RTPSource::setInitialTimestamp ( uint32 ts ) [inline, private]
 

Set the timestamp of the first packet received from this source.

Parameters:
ts   timestamp of the first packet from this source

Definition at line 501 of file rtp.h.

void RTPSource::setKitchenSize ( microtimeout_t s ) [inline]
 

Specify how much time the incoming packets will be buffered for this source. Note that the size is specified in temporal units, thus the internal queue will usually hold as many packets as necessary to fill the specified amount of time. The default size is the global kitchen size when the source is created.

Parameters:
t   amount of time the reception buffer fills. 0 means there is no buffer/kitchen and, for this source, RTPQueue::getCookedPacket behaves as RTPQueue::getPacket does.

Definition at line 326 of file rtp.h.

void RTPSource::setSDESItem ( sdes_item_type_t item,
const char *const value ) [private]
 

Referenced by QueueRTCPManager::setEMAIL(), QueueRTCPManager::setH323_CADDR(), QueueRTCPManager::setLOC(), QueueRTCPManager::setNAME(), QueueRTCPManager::setNOTE(), QueueRTCPManager::setPHONE(), QueueRTCPManager::setPRIV(), and QueueRTCPManager::setTOOL().

void RTPSource::setSender ( bool active ) [inline, private]
 

Mark this source as an active sender.

Definition at line 492 of file rtp.h.


Friends And Related Function Documentation

class MembershipControl [friend]
 

Definition at line 580 of file rtp.h.


Member Data Documentation

IncomingRTPPkt [private]
 

Definition at line 583 of file rtp.h.

QueueRTCPManager [private]
 

Definition at line 582 of file rtp.h.

RTPQueue [private]
 

Definition at line 581 of file rtp.h.

bool RTPSource::active_sender [private]
 

Definition at line 558 of file rtp.h.

uint32 RTPSource::currentkitchen [private]
 

Definition at line 550 of file rtp.h.

const ReceiverInfo * RTPSource::dummyRB [static, private]
 

Definition at line 576 of file rtp.h.

const SenderInfo * RTPSource::dummySI [static, private]
 

Definition at line 572 of file rtp.h.

uint16 RTPSource::expectedseqnum [private]
 

Definition at line 552 of file rtp.h.

IncomingRTPPkt * RTPSource::first [private]
 

Definition at line 564 of file rtp.h.

uint32 RTPSource::initial_timestamp [private]
 

Definition at line 540 of file rtp.h.

uint32 RTPSource::kitchensize [private]
 

Definition at line 547 of file rtp.h.

IncomingRTPPkt * RTPSource::last [private]
 

Definition at line 564 of file rtp.h.

struct timeval RTPSource::last_time [private]
 

Definition at line 544 of file rtp.h.

RTPSource * RTPSource::next [private]
 

Definition at line 562 of file rtp.h.

RTPSource * RTPSource::nextcollis [private]
 

Definition at line 566 of file rtp.h.

uint32 RTPSource::packet_count [private]
 

Definition at line 542 of file rtp.h.

RTPSource * RTPSource::prev [private]
 

Definition at line 562 of file rtp.h.

ReceiverInfo * RTPSource::receiver_info [private]
 

Definition at line 574 of file rtp.h.

char ** RTPSource::sdes_items [private]
 

Definition at line 578 of file rtp.h.

SenderInfo * RTPSource::sender_info [private]
 

Definition at line 570 of file rtp.h.

uint32 RTPSource::ssrc [private]
 

Definition at line 538 of file rtp.h.

const char *const RTPSource::unknown [static, private]
 

Definition at line 568 of file rtp.h.

bool RTPSource::valid [private]
 

Definition at line 556 of file rtp.h.


The documentation for this class was generated from the following file:
Generated at Fri Oct 5 10:28:27 2001 for ccRTP by doxygen1.2.5 written by Dimitri van Heesch, © 1997-2001