Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages Examples
MembershipControl Class Reference
Controls the group membership in the current session.
More...
#include <cc++/rtp.h>
Inheritance diagram for MembershipControl::
List of all members.
Detailed Description
Controls the group membership in the current session.
The use of RTCP is feasible in sessions with a few participants. However, when there are thousands or millions of participants, scalability problems impede the use of RTCP. In such situations, group membership sampling (see RFC 2762) is recommended instead of a membership table.
For now, this class implements only a hash table of members, but its design and relation with other classes is intented to support group membership sampling in case scalability problems arise.
-
Todo:
-
implement the reallocation mechanism (e.g., when the number of ssrcs per collision list goes up to 2, make the size approx. four times bigger (0.5 ssrcs per list now. when the number of ssrcs per list goes down to 0.5, decrease four times. Do not use 2 or 0.5, but `2 + something' and `0.5 - somehting'). Always jumping between prime numbers -> provide a table from 7 to many.
-
Author:
-
Federico Montesino Pouzols <p5087@quintero.fie.us.es>
Constructor & Destructor Documentation
MembershipControl::MembershipControl |
( |
uint32 |
initial_size = 7 |
) |
[protected] |
|
|
The initial size is a hint to allocate the resources needed in order to keep the members' identifiers and associated information.
Although ccRTP will reallocate resources when it becomes necessary, a good hint may save a lot of unpredictable time penalties. -
Parameters:
-
initial_size
|
an estimation of how many participants the session will consist of. |
|
virtual MembershipControl::~MembershipControl |
( |
|
) |
[protected, virtual] |
|
|
Destructor.
Purges all RTPSource structures created during the session, as well as the hast table and the list of sources. |
Member Function Documentation
bool MembershipControl::BYESource |
( |
uint32 |
ssrc |
) |
[protected] |
|
|
Mark the source identified by ssrc as having sent a BYE packet.
It is not deleted until a timeout expires, so that in case some packets from this source arrive a bit later the source is not inserted again in the table of known sources.
-
Returns:
-
true if the source had been previously identified. false if it was not in the table of known sources.
|
const RTPSource& MembershipControl::NullSource |
( |
|
) |
const [inline, protected] |
|
RTPSource& MembershipControl::addNewSource |
( |
uint32 |
ssrc |
) |
[protected] |
|
|
-
Parameters:
-
ssrc
|
Synchronization SouRCe identifier |
-
Returns:
-
the source object just created
|
void MembershipControl::endMembers |
( |
|
) |
[protected] |
|
|
Purge all RTPSource structures, the hash table and the list of sources.
|
const RTPSource& MembershipControl::getCurrentPlayer |
( |
|
) |
[protected] |
|
const RTPSource& MembershipControl::getFirstPlayer |
( |
|
) |
[protected] |
|
const RTPSource& MembershipControl::getLastPlayer |
( |
|
) |
[protected] |
|
const RTPSource& MembershipControl::getNextPlayer |
( |
|
) |
[protected] |
|
const RTPSource& MembershipControl::getOrCreateSource |
( |
uint32 |
ssrc |
) |
[inline] |
|
|
Get the description of a source by its ssrc identifier.
-
Parameters:
-
ssrc
|
SSRC identifier, int network order. |
-
Returns:
-
the RTPSource object identified by
ssrc
-
Return values:
-
a
|
dummy empty object if create == false and there is no source with the given ssrc identifier |
|
const RTPSource& MembershipControl::getSource |
( |
uint32 |
ssrc |
) |
const [inline] |
|
|
Get the description of a source by its SSRC identifier.
-
Parameters:
-
ssrc
|
SSRC identifier, int network order. |
-
Returns:
-
the RTPSource object identified by
ssrc
-
Return values:
-
a
|
dummy empty object if there is no source with the given ssrc identifier |
Reimplemented in RTPQueue. |
RTPSource& MembershipControl::getSourceBySSRC |
( |
uint32 |
ssrc, |
|
|
bool |
create = false |
|
) |
[protected] |
|
|
Get the description of a source by its ssrc identifier.
-
Parameters:
-
ssrc
|
SSRC identifier, int network order. |
create
|
whether to create a new source if not found |
-
Returns:
-
the RTPSource object identified by
ssrc
-
Return values:
-
a
|
dummy empty object if create == false and there is no source with the given ssrc identifier |
|
bool MembershipControl::removeSource |
( |
uint32 |
ssrc |
) |
[protected] |
|
|
Remove the description of the source identified by ssrc .
-
Returns:
-
whether the source has been actually removed or it did not exist.
|
Member Data Documentation
const RTPSource MembershipControl::dummysource [static, protected]
|
|
The documentation for this class was generated from the following file:
Generated at Sat Jan 5 09:08:54 2002 for ccRTP by
1.2.10 written by Dimitri van Heesch,
© 1997-2001