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::RTCPInstance ( UsageEnvironment env,
Groupsock RTPgs,
unsigned  totSessionBW,
unsigned char const *  cname,
RTPSink sink,
RTPSource source,
Boolean  isSSMSource 
)
protected

◆ ~RTCPInstance()

virtual RTCPInstance::~RTCPInstance ( )
protectedvirtual

Member Function Documentation

◆ addBYE()

void RTCPInstance::addBYE ( )
private

◆ addReport()

Boolean RTCPInstance::addReport ( Boolean  alwaysAdd = False)
private

◆ addRR()

void RTCPInstance::addRR ( )
private

◆ addSDES()

void RTCPInstance::addSDES ( )
private

◆ addSR()

void RTCPInstance::addSR ( )
private

◆ addStreamSocket()

void RTCPInstance::addStreamSocket ( int  sockNum,
unsigned char  streamChannelId 
)

◆ checkNewSSRC()

int RTCPInstance::checkNewSSRC ( )

◆ close() [1/2]

static void Medium::close ( UsageEnvironment env,
char const *  mediumName 
)
staticinherited

◆ close() [2/2]

static void Medium::close ( Medium medium)
staticinherited

◆ createNew()

static RTCPInstance* RTCPInstance::createNew ( UsageEnvironment env,
Groupsock RTCPgs,
unsigned  totSessionBW,
unsigned char const *  cname,
RTPSink sink,
RTPSource source,
Boolean  isSSMSource = False 
)
static

◆ enqueueCommonReportPrefix()

void RTCPInstance::enqueueCommonReportPrefix ( unsigned char  packetType,
u_int32_t  SSRC,
unsigned  numExtraWords = 0 
)
private

◆ enqueueCommonReportSuffix()

void RTCPInstance::enqueueCommonReportSuffix ( )
private

◆ enqueueReportBlock()

void RTCPInstance::enqueueReportBlock ( RTPReceptionStats receptionStats)
private

◆ envir()

UsageEnvironment& Medium::envir ( ) const
inlineinherited

◆ incomingReportHandler()

static void RTCPInstance::incomingReportHandler ( RTCPInstance instance,
int   
)
staticprivate

◆ incomingReportHandler1()

void RTCPInstance::incomingReportHandler1 ( )
protected

◆ injectReport()

void RTCPInstance::injectReport ( u_int8_t const *  packet,
unsigned  packetSize,
struct sockaddr_in const &  fromAddress 
)

◆ isMediaSession()

virtual Boolean Medium::isMediaSession ( ) const
virtualinherited

Reimplemented in MediaSession.

◆ isRTCPInstance()

virtual Boolean RTCPInstance::isRTCPInstance ( ) const
privatevirtual

Reimplemented from Medium.

◆ isRTSPClient()

virtual Boolean Medium::isRTSPClient ( ) const
virtualinherited

Reimplemented in RTSPClient.

◆ isRTSPServer()

virtual Boolean Medium::isRTSPServer ( ) const
virtualinherited

Reimplemented in RTSPServer.

◆ isServerMediaSession()

virtual Boolean Medium::isServerMediaSession ( ) const
virtualinherited

Reimplemented in ServerMediaSession.

◆ isSink()

virtual Boolean Medium::isSink ( ) const
virtualinherited

Reimplemented in MediaSink.

◆ isSource()

virtual Boolean Medium::isSource ( ) const
virtualinherited

Reimplemented in MediaSource.

◆ lookupByName() [1/2]

static Boolean Medium::lookupByName ( UsageEnvironment env,
char const *  mediumName,
Medium *&  resultMedium 
)
staticinherited

◆ lookupByName() [2/2]

static Boolean RTCPInstance::lookupByName ( UsageEnvironment env,
char const *  instanceName,
RTCPInstance *&  resultInstance 
)
static

◆ name()

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

◆ nextTask()

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

◆ noteArrivingRR()

virtual void RTCPInstance::noteArrivingRR ( struct sockaddr_in const &  fromAddressAndPort,
int  tcpSocketNum,
unsigned char  tcpStreamChannelId 
)
protectedvirtual

◆ numMembers()

unsigned RTCPInstance::numMembers ( ) const

◆ onExpire()

static void RTCPInstance::onExpire ( RTCPInstance instance)
staticprivate

◆ onExpire1()

void RTCPInstance::onExpire1 ( )
private

◆ onReceive()

void RTCPInstance::onReceive ( int  typeOfPacket,
int  totPacketSize,
u_int32_t  ssrc 
)
private

◆ packetType()

int RTCPInstance::packetType ( )
inline

Definition at line 201 of file RTCP.hh.

References fTypeOfPacket.

201 {return fTypeOfPacket;}
int fTypeOfPacket
Definition: RTCP.hh:179

◆ processIncomingReport()

void RTCPInstance::processIncomingReport ( unsigned  packetSize,
struct sockaddr_in const &  fromAddressAndPort,
int  tcpSocketNum,
unsigned char  tcpStreamChannelId 
)
private

◆ receivedPacketSize()

int RTCPInstance::receivedPacketSize ( )
inline

Definition at line 202 of file RTCP.hh.

References fLastReceivedSize.

202 {return fLastReceivedSize;}
int fLastReceivedSize
Definition: RTCP.hh:176

◆ removeLastReceivedSSRC()

void RTCPInstance::removeLastReceivedSSRC ( )

◆ removeSSRC()

void RTCPInstance::removeSSRC ( u_int32_t  ssrc,
Boolean  alsoRemoveStats 
)

◆ removeStreamSocket()

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

◆ reschedule()

void RTCPInstance::reschedule ( double  nextTime)

◆ RTCPgs()

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

◆ schedule()

void RTCPInstance::schedule ( double  nextTime)

◆ sendAppPacket()

void RTCPInstance::sendAppPacket ( u_int8_t  subtype,
char const *  name,
u_int8_t *  appDependentData,
unsigned  appDependentDataSize 
)

◆ sendBuiltPacket()

void RTCPInstance::sendBuiltPacket ( )
private

◆ sendBYE()

void RTCPInstance::sendBYE ( )

◆ sendReport()

void RTCPInstance::sendReport ( )

◆ sentPacketSize()

int RTCPInstance::sentPacketSize ( )
inline

Definition at line 200 of file RTCP.hh.

References fLastSentSize.

200 {return fLastSentSize;}
int fLastSentSize
Definition: RTCP.hh:175

◆ setAppHandler()

void RTCPInstance::setAppHandler ( RTCPAppHandlerFunc handlerTask,
void *  clientData 
)

◆ setAuxilliaryReadHandler()

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

◆ setByeHandler()

void RTCPInstance::setByeHandler ( TaskFunc handlerTask,
void *  clientData,
Boolean  handleActiveParticipantsOnly = True 
)

◆ setRRHandler()

void RTCPInstance::setRRHandler ( TaskFunc handlerTask,
void *  clientData 
)

◆ setSpecificRRHandler()

void RTCPInstance::setSpecificRRHandler ( netAddressBits  fromAddress,
Port  fromPort,
TaskFunc handlerTask,
void *  clientData 
)

◆ setSRHandler()

void RTCPInstance::setSRHandler ( TaskFunc handlerTask,
void *  clientData 
)

◆ setStreamSocket()

void RTCPInstance::setStreamSocket ( int  sockNum,
unsigned char  streamChannelId 
)

◆ totSessionBW()

unsigned RTCPInstance::totSessionBW ( ) const
inline

Definition at line 61 of file RTCP.hh.

References fTotSessionBW.

61 { return fTotSessionBW; }
unsigned fTotSessionBW
Definition: RTCP.hh:160

◆ typeOfEvent()

int RTCPInstance::typeOfEvent ( )
inline

Definition at line 199 of file RTCP.hh.

References fTypeOfEvent.

199 {return fTypeOfEvent;}
int fTypeOfEvent
Definition: RTCP.hh:178

◆ unsetSpecificRRHandler()

void RTCPInstance::unsetSpecificRRHandler ( netAddressBits  fromAddress,
Port  fromPort 
)

Field Documentation

◆ fAppHandlerClientData

void* RTCPInstance::fAppHandlerClientData
private

Definition at line 192 of file RTCP.hh.

◆ fAppHandlerTask

RTCPAppHandlerFunc* RTCPInstance::fAppHandlerTask
private

Definition at line 191 of file RTCP.hh.

◆ fAveRTCPSize

double RTCPInstance::fAveRTCPSize
private

Definition at line 169 of file RTCP.hh.

◆ fByeHandleActiveParticipantsOnly

Boolean RTCPInstance::fByeHandleActiveParticipantsOnly
private

Definition at line 185 of file RTCP.hh.

◆ fByeHandlerClientData

void* RTCPInstance::fByeHandlerClientData
private

Definition at line 184 of file RTCP.hh.

◆ fByeHandlerTask

TaskFunc* RTCPInstance::fByeHandlerTask
private

Definition at line 183 of file RTCP.hh.

◆ fCNAME

SDESItem RTCPInstance::fCNAME
private

Definition at line 165 of file RTCP.hh.

◆ fHaveJustSentPacket

Boolean RTCPInstance::fHaveJustSentPacket
private

Definition at line 180 of file RTCP.hh.

◆ fInBuf

u_int8_t* RTCPInstance::fInBuf
private

Definition at line 156 of file RTCP.hh.

◆ fIsInitial

int RTCPInstance::fIsInitial
private

Definition at line 170 of file RTCP.hh.

◆ fIsSSMSource

Boolean RTCPInstance::fIsSSMSource
private

Definition at line 163 of file RTCP.hh.

◆ fKnownMembers

RTCPMemberDatabase* RTCPInstance::fKnownMembers
private

Definition at line 166 of file RTCP.hh.

◆ fLastPacketSentSize

unsigned RTCPInstance::fLastPacketSentSize
private

Definition at line 181 of file RTCP.hh.

◆ fLastReceivedSize

int RTCPInstance::fLastReceivedSize
private

Definition at line 176 of file RTCP.hh.

Referenced by receivedPacketSize().

◆ fLastReceivedSSRC

u_int32_t RTCPInstance::fLastReceivedSSRC
private

Definition at line 177 of file RTCP.hh.

◆ fLastSentSize

int RTCPInstance::fLastSentSize
private

Definition at line 175 of file RTCP.hh.

Referenced by sentPacketSize().

◆ fNextReportTime

double RTCPInstance::fNextReportTime
private

Definition at line 172 of file RTCP.hh.

◆ fNumBytesAlreadyRead

unsigned RTCPInstance::fNumBytesAlreadyRead
private

Definition at line 157 of file RTCP.hh.

◆ fOutBuf

OutPacketBuffer* RTCPInstance::fOutBuf
private

Definition at line 158 of file RTCP.hh.

◆ fOutgoingReportCount

unsigned RTCPInstance::fOutgoingReportCount
private

Definition at line 167 of file RTCP.hh.

◆ fPrevNumMembers

int RTCPInstance::fPrevNumMembers
private

Definition at line 173 of file RTCP.hh.

◆ fPrevReportTime

double RTCPInstance::fPrevReportTime
private

Definition at line 171 of file RTCP.hh.

◆ fRRHandlerClientData

void* RTCPInstance::fRRHandlerClientData
private

Definition at line 189 of file RTCP.hh.

◆ fRRHandlerTask

TaskFunc* RTCPInstance::fRRHandlerTask
private

Definition at line 188 of file RTCP.hh.

◆ fRTCPInterface

RTPInterface RTCPInstance::fRTCPInterface
private

Definition at line 159 of file RTCP.hh.

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

◆ fSink

RTPSink* RTCPInstance::fSink
private

Definition at line 161 of file RTCP.hh.

◆ fSource

RTPSource* RTCPInstance::fSource
private

Definition at line 162 of file RTCP.hh.

◆ fSpecificRRHandlerTable

AddressPortLookupTable* RTCPInstance::fSpecificRRHandlerTable
private

Definition at line 190 of file RTCP.hh.

◆ fSRHandlerClientData

void* RTCPInstance::fSRHandlerClientData
private

Definition at line 187 of file RTCP.hh.

◆ fSRHandlerTask

TaskFunc* RTCPInstance::fSRHandlerTask
private

Definition at line 186 of file RTCP.hh.

◆ fTotSessionBW

unsigned RTCPInstance::fTotSessionBW
private

Definition at line 160 of file RTCP.hh.

Referenced by totSessionBW().

◆ fTypeOfEvent

int RTCPInstance::fTypeOfEvent
private

Definition at line 178 of file RTCP.hh.

Referenced by typeOfEvent().

◆ fTypeOfPacket

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: