ccRTP 2.1.2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends
RTPApplication Class Reference

An RTP application, holding identifying RTCP SDES item values. More...

#include <sources.h>

Inheritance diagram for RTPApplication:
Inheritance graph
[legend]
Collaboration diagram for RTPApplication:
Collaboration graph
[legend]

Data Structures

struct  ParticipantLink
 
class  ParticipantsIterator
 Iterator through the list of participants in this session. More...
 

Public Member Functions

 RTPApplication (const std::string &cname)
 Create a new RTP application. More...
 
 ~RTPApplication ()
 
void setSDESItem (SDESItemType item, const std::string &val)
 
void setPRIVPrefix (const std::string &val)
 
const std::string & getSDESItem (SDESItemType item) const
 
const std::string & getPRIVPrefix () const
 
ParticipantsIterator begin ()
 
ParticipantsIterator end ()
 
const ParticipantgetParticipant (const std::string &cname) const
 

Private Member Functions

void addParticipant (Participant &part)
 
void removeParticipant (ParticipantLink *part)
 
void findCNAME ()
 Find out the local CNAME as user@host and store it as part of the internal state of this class. More...
 
const std::string & getItem (SDESItemType type) const
 
void setItem (SDESItemType item, const std::string &val)
 

Private Attributes

Participant ** participants
 
ParticipantLinkfirstPart
 List of participants, ordered from older to newer. More...
 
ParticipantLinklastPart
 

Static Private Attributes

static const size_t defaultParticipantsNum = 11
 Hash table with sources of RTP and RTCP packets. More...
 

Friends

class ApplicationHandler
 

Detailed Description

An RTP application, holding identifying RTCP SDES item values.

Represents local participants.

An application in the context of RTP: an entity that has a CNAME (unique identifier in the form of user@host.domain) as well as other RTCP SDES items (such as NAME or TOOL), and may open a number of RTP sessions. Each application is a different source of synchronization (with a potentially diferent SSRC identifier) in each RTP session it participates. All the sources of synchronization from a participant are tied together by means of the CNAME.

The definition of this class allows applications based on ccRTP to implement several "RTP applications" in the same process. Each object of this class represents a local participant.

Author
Federico Montesino Pouzols fedem.nosp@m.p@al.nosp@m.tern..nosp@m.org

Definition at line 364 of file sources.h.

Constructor & Destructor Documentation

RTPApplication::RTPApplication ( const std::string &  cname)

Create a new RTP application.

If the CNAME string provided has zero length, it is guessed from the user and machine name.

Parameters
cnameLocal participant canonical name.

Definition at line 136 of file source.cpp.

RTPApplication::~RTPApplication ( )

Definition at line 147 of file source.cpp.

Member Function Documentation

void RTPApplication::addParticipant ( Participant part)
private

Definition at line 189 of file source.cpp.

ParticipantsIterator RTPApplication::begin ( )
inline

Definition at line 445 of file sources.h.

ParticipantsIterator RTPApplication::end ( )
inline

Definition at line 448 of file sources.h.

void RTPApplication::findCNAME ( )
private

Find out the local CNAME as user@host and store it as part of the internal state of this class.

Definition at line 212 of file source.cpp.

const std::string & SDESItemsHolder::getItem ( SDESItemType  type) const
inherited

Definition at line 99 of file source.cpp.

const Participant * RTPApplication::getParticipant ( const std::string &  cname) const

Definition at line 173 of file source.cpp.

const std::string& RTPApplication::getPRIVPrefix ( ) const
inline

Definition at line 394 of file sources.h.

const std::string& RTPApplication::getSDESItem ( SDESItemType  item) const
inline

Definition at line 390 of file sources.h.

void RTPApplication::removeParticipant ( ParticipantLink part)
private

Definition at line 200 of file source.cpp.

void SDESItemsHolder::setItem ( SDESItemType  item,
const std::string &  val 
)
inherited

Definition at line 91 of file source.cpp.

void RTPApplication::setPRIVPrefix ( const std::string &  val)
inline

Definition at line 386 of file sources.h.

void RTPApplication::setSDESItem ( SDESItemType  item,
const std::string &  val 
)
inline

Definition at line 382 of file sources.h.

Friends And Related Function Documentation

friend class ApplicationHandler
friend

Definition at line 455 of file sources.h.

Field Documentation

const size_t RTPApplication::defaultParticipantsNum = 11
staticprivate

Hash table with sources of RTP and RTCP packets.

Definition at line 486 of file sources.h.

ParticipantLink* RTPApplication::firstPart
private

List of participants, ordered from older to newer.

Definition at line 489 of file sources.h.

ParticipantLink * RTPApplication::lastPart
private

Definition at line 489 of file sources.h.

Participant** RTPApplication::participants
private

Definition at line 487 of file sources.h.


The documentation for this class was generated from the following files: