live
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
RTCPInstance Class Reference

#include <RTCP.hh>

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

Public Member Functions

unsigned numMembers () const
 
unsigned totSessionBW () const
 
void setByeHandler (TaskFunc *handlerTask, void *clientData, Boolean handleActiveParticipantsOnly=True)
 
void setSRHandler (TaskFunc *handlerTask, void *clientData)
 
void setRRHandler (TaskFunc *handlerTask, void *clientData)
 
void setSpecificRRHandler (netAddressBits fromAddress, Port fromPort, TaskFunc *handlerTask, void *clientData)
 
void unsetSpecificRRHandler (netAddressBits fromAddress, Port fromPort)
 
void setAppHandler (RTCPAppHandlerFunc *handlerTask, void *clientData)
 
void sendAppPacket (u_int8_t subtype, char const *name, u_int8_t *appDependentData, unsigned appDependentDataSize)
 
GroupsockRTCPgs () const
 
void setStreamSocket (int sockNum, unsigned char streamChannelId)
 
void addStreamSocket (int sockNum, unsigned char streamChannelId)
 
void removeStreamSocket (int sockNum, unsigned char streamChannelId)
 
void setAuxilliaryReadHandler (AuxHandlerFunc *handlerFunc, void *handlerClientData)
 
void injectReport (u_int8_t const *packet, unsigned packetSize, struct sockaddr_in const &fromAddress)
 
void schedule (double nextTime)
 
void reschedule (double nextTime)
 
void sendReport ()
 
void sendBYE ()
 
int typeOfEvent ()
 
int sentPacketSize ()
 
int packetType ()
 
int receivedPacketSize ()
 
int checkNewSSRC ()
 
void removeLastReceivedSSRC ()
 
void removeSSRC (u_int32_t ssrc, Boolean alsoRemoveStats)
 
UsageEnvironmentenvir () const
 
char const * name () const
 
virtual Boolean isSource () const
 
virtual Boolean isSink () const
 
virtual Boolean isRTSPClient () const
 
virtual Boolean isRTSPServer () const
 
virtual Boolean isMediaSession () const
 
virtual Boolean isServerMediaSession () const
 

Static Public Member Functions

static RTCPInstancecreateNew (UsageEnvironment &env, Groupsock *RTCPgs, unsigned totSessionBW, unsigned char const *cname, RTPSink *sink, RTPSource *source, Boolean isSSMSource=False)
 
static Boolean lookupByName (UsageEnvironment &env, char const *instanceName, RTCPInstance *&resultInstance)
 
static Boolean lookupByName (UsageEnvironment &env, char const *mediumName, Medium *&resultMedium)
 
static void close (UsageEnvironment &env, char const *mediumName)
 
static void close (Medium *medium)
 

Protected Member Functions

 RTCPInstance (UsageEnvironment &env, Groupsock *RTPgs, unsigned totSessionBW, unsigned char const *cname, RTPSink *sink, RTPSource *source, Boolean isSSMSource)
 
virtual ~RTCPInstance ()
 
virtual void noteArrivingRR (struct sockaddr_in const &fromAddressAndPort, int tcpSocketNum, unsigned char tcpStreamChannelId)
 
void incomingReportHandler1 ()
 
TaskTokennextTask ()
 

Private Member Functions

virtual Boolean isRTCPInstance () const
 
Boolean addReport (Boolean alwaysAdd=False)
 
void addSR ()
 
void addRR ()
 
void enqueueCommonReportPrefix (unsigned char packetType, u_int32_t SSRC, unsigned numExtraWords=0)
 
void enqueueCommonReportSuffix ()
 
void enqueueReportBlock (RTPReceptionStats *receptionStats)
 
void addSDES ()
 
void addBYE ()
 
void sendBuiltPacket ()
 
void onExpire1 ()
 
void processIncomingReport (unsigned packetSize, struct sockaddr_in const &fromAddressAndPort, int tcpSocketNum, unsigned char tcpStreamChannelId)
 
void onReceive (int typeOfPacket, int totPacketSize, u_int32_t ssrc)
 

Static Private Member Functions

static void onExpire (RTCPInstance *instance)
 
static void incomingReportHandler (RTCPInstance *instance, int)
 

Private Attributes

u_int8_t * fInBuf
 
unsigned fNumBytesAlreadyRead
 
OutPacketBufferfOutBuf
 
RTPInterface fRTCPInterface
 
unsigned fTotSessionBW
 
RTPSinkfSink
 
RTPSourcefSource
 
Boolean fIsSSMSource
 
SDESItem fCNAME
 
RTCPMemberDatabase * fKnownMembers
 
unsigned fOutgoingReportCount
 
double fAveRTCPSize
 
int fIsInitial
 
double fPrevReportTime
 
double fNextReportTime
 
int fPrevNumMembers
 
int fLastSentSize
 
int fLastReceivedSize
 
u_int32_t fLastReceivedSSRC
 
int fTypeOfEvent
 
int fTypeOfPacket
 
Boolean fHaveJustSentPacket
 
unsigned fLastPacketSentSize
 
TaskFuncfByeHandlerTask
 
void * fByeHandlerClientData
 
Boolean fByeHandleActiveParticipantsOnly
 
TaskFuncfSRHandlerTask
 
void * fSRHandlerClientData
 
TaskFuncfRRHandlerTask
 
void * fRRHandlerClientData
 
AddressPortLookupTablefSpecificRRHandlerTable
 
RTCPAppHandlerFuncfAppHandlerTask
 
void * fAppHandlerClientData
 

Detailed Description

Definition at line 48 of file RTCP.hh.

Constructor & Destructor Documentation

RTCPInstance::RTCPInstance ( UsageEnvironment env,
Groupsock RTPgs,
unsigned  totSessionBW,
unsigned char const *  cname,
RTPSink sink,
RTPSource source,
Boolean  isSSMSource 
)
protected
virtual RTCPInstance::~RTCPInstance ( )
protectedvirtual

Member Function Documentation

void RTCPInstance::addBYE ( )
private
Boolean RTCPInstance::addReport ( Boolean  alwaysAdd = False)
private
void RTCPInstance::addRR ( )
private
void RTCPInstance::addSDES ( )
private
void RTCPInstance::addSR ( )
private
void RTCPInstance::addStreamSocket ( int  sockNum,
unsigned char  streamChannelId 
)
int RTCPInstance::checkNewSSRC ( )
static void Medium::close ( UsageEnvironment env,
char const *  mediumName 
)
staticinherited
static void Medium::close ( Medium medium)
staticinherited
static RTCPInstance* RTCPInstance::createNew ( UsageEnvironment env,
Groupsock RTCPgs,
unsigned  totSessionBW,
unsigned char const *  cname,
RTPSink sink,
RTPSource source,
Boolean  isSSMSource = False 
)
static
void RTCPInstance::enqueueCommonReportPrefix ( unsigned char  packetType,
u_int32_t  SSRC,
unsigned  numExtraWords = 0 
)
private
void RTCPInstance::enqueueCommonReportSuffix ( )
private
void RTCPInstance::enqueueReportBlock ( RTPReceptionStats receptionStats)
private
UsageEnvironment& Medium::envir ( ) const
inlineinherited
static void RTCPInstance::incomingReportHandler ( RTCPInstance instance,
int   
)
staticprivate
void RTCPInstance::incomingReportHandler1 ( )
protected
void RTCPInstance::injectReport ( u_int8_t const *  packet,
unsigned  packetSize,
struct sockaddr_in const &  fromAddress 
)
virtual Boolean Medium::isMediaSession ( ) const
virtualinherited

Reimplemented in MediaSession.

virtual Boolean RTCPInstance::isRTCPInstance ( ) const
privatevirtual

Reimplemented from Medium.

virtual Boolean Medium::isRTSPClient ( ) const
virtualinherited

Reimplemented in RTSPClient.

virtual Boolean Medium::isRTSPServer ( ) const
virtualinherited

Reimplemented in RTSPServer.

virtual Boolean Medium::isServerMediaSession ( ) const
virtualinherited

Reimplemented in ServerMediaSession.

virtual Boolean Medium::isSink ( ) const
virtualinherited

Reimplemented in MediaSink.

virtual Boolean Medium::isSource ( ) const
virtualinherited

Reimplemented in MediaSource.

static Boolean Medium::lookupByName ( UsageEnvironment env,
char const *  mediumName,
Medium *&  resultMedium 
)
staticinherited
static Boolean RTCPInstance::lookupByName ( UsageEnvironment env,
char const *  instanceName,
RTCPInstance *&  resultInstance 
)
static
char const* Medium::name ( ) const
inlineinherited

Definition at line 61 of file Media.hh.

References Medium::fMediumName.

61 {return fMediumName;}
char fMediumName[mediumNameMaxLen]
Definition: Media.hh:83
TaskToken& Medium::nextTask ( )
inlineprotectedinherited

Definition at line 77 of file Media.hh.

References Medium::fNextTask.

77  {
78  return fNextTask;
79  }
TaskToken fNextTask
Definition: Media.hh:84
virtual void RTCPInstance::noteArrivingRR ( struct sockaddr_in const &  fromAddressAndPort,
int  tcpSocketNum,
unsigned char  tcpStreamChannelId 
)
protectedvirtual
unsigned RTCPInstance::numMembers ( ) const
static void RTCPInstance::onExpire ( RTCPInstance instance)
staticprivate
void RTCPInstance::onExpire1 ( )
private
void RTCPInstance::onReceive ( int  typeOfPacket,
int  totPacketSize,
u_int32_t  ssrc 
)
private
int RTCPInstance::packetType ( )
inline

Definition at line 201 of file RTCP.hh.

References fTypeOfPacket.

201 {return fTypeOfPacket;}
int fTypeOfPacket
Definition: RTCP.hh:179
void RTCPInstance::processIncomingReport ( unsigned  packetSize,
struct sockaddr_in const &  fromAddressAndPort,
int  tcpSocketNum,
unsigned char  tcpStreamChannelId 
)
private
int RTCPInstance::receivedPacketSize ( )
inline

Definition at line 202 of file RTCP.hh.

References fLastReceivedSize.

202 {return fLastReceivedSize;}
int fLastReceivedSize
Definition: RTCP.hh:176
void RTCPInstance::removeLastReceivedSSRC ( )
void RTCPInstance::removeSSRC ( u_int32_t  ssrc,
Boolean  alsoRemoveStats 
)
void RTCPInstance::removeStreamSocket ( int  sockNum,
unsigned char  streamChannelId 
)
inline

Definition at line 103 of file RTCP.hh.

References fRTCPInterface, and RTPInterface::removeStreamSocket().

103  {
104  fRTCPInterface.removeStreamSocket(sockNum, streamChannelId);
105  }
void removeStreamSocket(int sockNum, unsigned char streamChannelId)
RTPInterface fRTCPInterface
Definition: RTCP.hh:159
void RTCPInstance::reschedule ( double  nextTime)
Groupsock* RTCPInstance::RTCPgs ( ) const
inline

Definition at line 99 of file RTCP.hh.

References fRTCPInterface, and RTPInterface::gs().

99 { return fRTCPInterface.gs(); }
RTPInterface fRTCPInterface
Definition: RTCP.hh:159
Groupsock * gs() const
Definition: RTPInterface.hh:60
void RTCPInstance::schedule ( double  nextTime)
void RTCPInstance::sendAppPacket ( u_int8_t  subtype,
char const *  name,
u_int8_t *  appDependentData,
unsigned  appDependentDataSize 
)
void RTCPInstance::sendBuiltPacket ( )
private
void RTCPInstance::sendBYE ( )
void RTCPInstance::sendReport ( )
int RTCPInstance::sentPacketSize ( )
inline

Definition at line 200 of file RTCP.hh.

References fLastSentSize.

200 {return fLastSentSize;}
int fLastSentSize
Definition: RTCP.hh:175
void RTCPInstance::setAppHandler ( RTCPAppHandlerFunc handlerTask,
void *  clientData 
)
void RTCPInstance::setAuxilliaryReadHandler ( AuxHandlerFunc handlerFunc,
void *  handlerClientData 
)
inline

Definition at line 108 of file RTCP.hh.

References fRTCPInterface, and RTPInterface::setAuxilliaryReadHandler().

109  {
111  handlerClientData);
112  }
void setAuxilliaryReadHandler(AuxHandlerFunc *handlerFunc, void *handlerClientData)
Definition: RTPInterface.hh:88
RTPInterface fRTCPInterface
Definition: RTCP.hh:159
void RTCPInstance::setByeHandler ( TaskFunc handlerTask,
void *  clientData,
Boolean  handleActiveParticipantsOnly = True 
)
void RTCPInstance::setRRHandler ( TaskFunc handlerTask,
void *  clientData 
)
void RTCPInstance::setSpecificRRHandler ( netAddressBits  fromAddress,
Port  fromPort,
TaskFunc handlerTask,
void *  clientData 
)
void RTCPInstance::setSRHandler ( TaskFunc handlerTask,
void *  clientData 
)
void RTCPInstance::setStreamSocket ( int  sockNum,
unsigned char  streamChannelId 
)
unsigned RTCPInstance::totSessionBW ( ) const
inline

Definition at line 61 of file RTCP.hh.

References fTotSessionBW.

61 { return fTotSessionBW; }
unsigned fTotSessionBW
Definition: RTCP.hh:160
int RTCPInstance::typeOfEvent ( )
inline

Definition at line 199 of file RTCP.hh.

References fTypeOfEvent.

199 {return fTypeOfEvent;}
int fTypeOfEvent
Definition: RTCP.hh:178
void RTCPInstance::unsetSpecificRRHandler ( netAddressBits  fromAddress,
Port  fromPort 
)

Field Documentation

void* RTCPInstance::fAppHandlerClientData
private

Definition at line 192 of file RTCP.hh.

RTCPAppHandlerFunc* RTCPInstance::fAppHandlerTask
private

Definition at line 191 of file RTCP.hh.

double RTCPInstance::fAveRTCPSize
private

Definition at line 169 of file RTCP.hh.

Boolean RTCPInstance::fByeHandleActiveParticipantsOnly
private

Definition at line 185 of file RTCP.hh.

void* RTCPInstance::fByeHandlerClientData
private

Definition at line 184 of file RTCP.hh.

TaskFunc* RTCPInstance::fByeHandlerTask
private

Definition at line 183 of file RTCP.hh.

SDESItem RTCPInstance::fCNAME
private

Definition at line 165 of file RTCP.hh.

Boolean RTCPInstance::fHaveJustSentPacket
private

Definition at line 180 of file RTCP.hh.

u_int8_t* RTCPInstance::fInBuf
private

Definition at line 156 of file RTCP.hh.

int RTCPInstance::fIsInitial
private

Definition at line 170 of file RTCP.hh.

Boolean RTCPInstance::fIsSSMSource
private

Definition at line 163 of file RTCP.hh.

RTCPMemberDatabase* RTCPInstance::fKnownMembers
private

Definition at line 166 of file RTCP.hh.

unsigned RTCPInstance::fLastPacketSentSize
private

Definition at line 181 of file RTCP.hh.

int RTCPInstance::fLastReceivedSize
private

Definition at line 176 of file RTCP.hh.

Referenced by receivedPacketSize().

u_int32_t RTCPInstance::fLastReceivedSSRC
private

Definition at line 177 of file RTCP.hh.

int RTCPInstance::fLastSentSize
private

Definition at line 175 of file RTCP.hh.

Referenced by sentPacketSize().

double RTCPInstance::fNextReportTime
private

Definition at line 172 of file RTCP.hh.

unsigned RTCPInstance::fNumBytesAlreadyRead
private

Definition at line 157 of file RTCP.hh.

OutPacketBuffer* RTCPInstance::fOutBuf
private

Definition at line 158 of file RTCP.hh.

unsigned RTCPInstance::fOutgoingReportCount
private

Definition at line 167 of file RTCP.hh.

int RTCPInstance::fPrevNumMembers
private

Definition at line 173 of file RTCP.hh.

double RTCPInstance::fPrevReportTime
private

Definition at line 171 of file RTCP.hh.

void* RTCPInstance::fRRHandlerClientData
private

Definition at line 189 of file RTCP.hh.

TaskFunc* RTCPInstance::fRRHandlerTask
private

Definition at line 188 of file RTCP.hh.

RTPInterface RTCPInstance::fRTCPInterface
private

Definition at line 159 of file RTCP.hh.

Referenced by removeStreamSocket(), RTCPgs(), and setAuxilliaryReadHandler().

RTPSink* RTCPInstance::fSink
private

Definition at line 161 of file RTCP.hh.

RTPSource* RTCPInstance::fSource
private

Definition at line 162 of file RTCP.hh.

AddressPortLookupTable* RTCPInstance::fSpecificRRHandlerTable
private

Definition at line 190 of file RTCP.hh.

void* RTCPInstance::fSRHandlerClientData
private

Definition at line 187 of file RTCP.hh.

TaskFunc* RTCPInstance::fSRHandlerTask
private

Definition at line 186 of file RTCP.hh.

unsigned RTCPInstance::fTotSessionBW
private

Definition at line 160 of file RTCP.hh.

Referenced by totSessionBW().

int RTCPInstance::fTypeOfEvent
private

Definition at line 178 of file RTCP.hh.

Referenced by typeOfEvent().

int RTCPInstance::fTypeOfPacket
private

Definition at line 179 of file RTCP.hh.

Referenced by packetType().


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