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 setupForSRTCP ()
 
void setByeHandler (TaskFunc *handlerTask, void *clientData, Boolean handleActiveParticipantsOnly=True)
 
void setByeWithReasonHandler (ByeWithReasonHandlerFunc *handlerTask, void *clientData, Boolean handleActiveParticipantsOnly=True)
 
void setSRHandler (TaskFunc *handlerTask, void *clientData)
 
void setRRHandler (TaskFunc *handlerTask, void *clientData)
 
void setSpecificRRHandler (struct sockaddr_storage const &fromAddress, Port fromPort, TaskFunc *handlerTask, void *clientData)
 
void unsetSpecificRRHandler (struct sockaddr_storage const &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, TLSState *tlsState)
 
void addStreamSocket (int sockNum, unsigned char streamChannelId, TLSState *tlsState)
 
void removeStreamSocket (int sockNum, unsigned char streamChannelId)
 
void setAuxilliaryReadHandler (AuxHandlerFunc *handlerFunc, void *handlerClientData)
 
void injectReport (u_int8_t const *packet, unsigned packetSize, struct sockaddr_storage const &fromAddress)
 
void schedule (double nextTime)
 
void reschedule (double nextTime)
 
void sendReport ()
 
void sendBYE (char const *reason=NULL)
 
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 isSSMTransmitter=False, SRTPCryptographicContext *crypto=NULL)
 
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 isSSMTransmitter, SRTPCryptographicContext *crypto)
 
virtual ~RTCPInstance ()
 
virtual void noteArrivingRR (struct sockaddr_storage 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 (char const *reason)
 
void sendBuiltPacket ()
 
void onExpire1 ()
 
void processIncomingReport (unsigned packetSize, struct sockaddr_storage 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 fIsSSMTransmitter
 
SRTPCryptographicContextfCrypto
 
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
 
ByeWithReasonHandlerFuncfByeWithReasonHandlerTask
 
void * fByeHandlerClientData
 
Boolean fByeHandleActiveParticipantsOnly
 
TaskFuncfSRHandlerTask
 
void * fSRHandlerClientData
 
TaskFuncfRRHandlerTask
 
void * fRRHandlerClientData
 
AddressPortLookupTablefSpecificRRHandlerTable
 
RTCPAppHandlerFuncfAppHandlerTask
 
void * fAppHandlerClientData
 
UsageEnvironmentfEnviron
 
char fMediumName [mediumNameMaxLen]
 
TaskToken fNextTask
 

Detailed Description

Definition at line 53 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  isSSMTransmitter,
SRTPCryptographicContext crypto 
)
protected

◆ ~RTCPInstance()

virtual RTCPInstance::~RTCPInstance ( )
protectedvirtual

Member Function Documentation

◆ addBYE()

void RTCPInstance::addBYE ( char const *  reason)
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,
TLSState tlsState 
)

◆ checkNewSSRC()

int RTCPInstance::checkNewSSRC ( )

◆ close() [1/2]

static void Medium::close ( Medium medium)
staticinherited

◆ close() [2/2]

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

◆ createNew()

static RTCPInstance * RTCPInstance::createNew ( UsageEnvironment env,
Groupsock RTCPgs,
unsigned  totSessionBW,
unsigned char const *  cname,
RTPSink sink,
RTPSource source,
Boolean  isSSMTransmitter = False,
SRTPCryptographicContext crypto = NULL 
)
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_storage 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 RTCPInstance::lookupByName ( UsageEnvironment env,
char const *  instanceName,
RTCPInstance *&  resultInstance 
)
static

◆ lookupByName() [2/2]

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

◆ name()

char const * Medium::name ( ) const
inlineinherited

Definition at line 61 of file Media.hh.

61{return fMediumName;}
char fMediumName[mediumNameMaxLen]
Definition: Media.hh:83

References Medium::fMediumName.

◆ nextTask()

TaskToken & Medium::nextTask ( )
inlineprotectedinherited

Definition at line 77 of file Media.hh.

77 {
78 return fNextTask;
79 }
TaskToken fNextTask
Definition: Media.hh:84

References Medium::fNextTask.

◆ noteArrivingRR()

virtual void RTCPInstance::noteArrivingRR ( struct sockaddr_storage 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 218 of file RTCP.hh.

218{return fTypeOfPacket;}
int fTypeOfPacket
Definition: RTCP.hh:195

References fTypeOfPacket.

◆ processIncomingReport()

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

◆ receivedPacketSize()

int RTCPInstance::receivedPacketSize ( )
inline

Definition at line 219 of file RTCP.hh.

219{return fLastReceivedSize;}
int fLastReceivedSize
Definition: RTCP.hh:192

References fLastReceivedSize.

◆ 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 117 of file RTCP.hh.

117 {
118 fRTCPInterface.removeStreamSocket(sockNum, streamChannelId);
119 }
RTPInterface fRTCPInterface
Definition: RTCP.hh:174
void removeStreamSocket(int sockNum, unsigned char streamChannelId)

References fRTCPInterface, and RTPInterface::removeStreamSocket().

◆ reschedule()

void RTCPInstance::reschedule ( double  nextTime)

◆ RTCPgs()

Groupsock * RTCPInstance::RTCPgs ( ) const
inline

Definition at line 113 of file RTCP.hh.

113{ return fRTCPInterface.gs(); }
Groupsock * gs() const
Definition: RTPInterface.hh:51

References fRTCPInterface, and RTPInterface::gs().

◆ 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 ( char const *  reason = NULL)

◆ sendReport()

void RTCPInstance::sendReport ( )

◆ sentPacketSize()

int RTCPInstance::sentPacketSize ( )
inline

Definition at line 217 of file RTCP.hh.

217{return fLastSentSize;}
int fLastSentSize
Definition: RTCP.hh:191

References fLastSentSize.

◆ setAppHandler()

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

◆ setAuxilliaryReadHandler()

void RTCPInstance::setAuxilliaryReadHandler ( AuxHandlerFunc handlerFunc,
void *  handlerClientData 
)
inline

Definition at line 122 of file RTCP.hh.

123 {
125 handlerClientData);
126 }
void setAuxilliaryReadHandler(AuxHandlerFunc *handlerFunc, void *handlerClientData)
Definition: RTPInterface.hh:79

References fRTCPInterface, and RTPInterface::setAuxilliaryReadHandler().

◆ setByeHandler()

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

◆ setByeWithReasonHandler()

void RTCPInstance::setByeWithReasonHandler ( ByeWithReasonHandlerFunc handlerTask,
void *  clientData,
Boolean  handleActiveParticipantsOnly = True 
)

◆ setRRHandler()

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

◆ setSpecificRRHandler()

void RTCPInstance::setSpecificRRHandler ( struct sockaddr_storage const &  fromAddress,
Port  fromPort,
TaskFunc handlerTask,
void *  clientData 
)

◆ setSRHandler()

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

◆ setStreamSocket()

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

◆ setupForSRTCP()

void RTCPInstance::setupForSRTCP ( )

◆ totSessionBW()

unsigned RTCPInstance::totSessionBW ( ) const
inline

Definition at line 67 of file RTCP.hh.

67{ return fTotSessionBW; }
unsigned fTotSessionBW
Definition: RTCP.hh:175

References fTotSessionBW.

◆ typeOfEvent()

int RTCPInstance::typeOfEvent ( )
inline

Definition at line 216 of file RTCP.hh.

216{return fTypeOfEvent;}
int fTypeOfEvent
Definition: RTCP.hh:194

References fTypeOfEvent.

◆ unsetSpecificRRHandler()

void RTCPInstance::unsetSpecificRRHandler ( struct sockaddr_storage const &  fromAddress,
Port  fromPort 
)

Field Documentation

◆ fAppHandlerClientData

void* RTCPInstance::fAppHandlerClientData
private

Definition at line 209 of file RTCP.hh.

◆ fAppHandlerTask

RTCPAppHandlerFunc* RTCPInstance::fAppHandlerTask
private

Definition at line 208 of file RTCP.hh.

◆ fAveRTCPSize

double RTCPInstance::fAveRTCPSize
private

Definition at line 185 of file RTCP.hh.

◆ fByeHandleActiveParticipantsOnly

Boolean RTCPInstance::fByeHandleActiveParticipantsOnly
private

Definition at line 202 of file RTCP.hh.

◆ fByeHandlerClientData

void* RTCPInstance::fByeHandlerClientData
private

Definition at line 201 of file RTCP.hh.

◆ fByeHandlerTask

TaskFunc* RTCPInstance::fByeHandlerTask
private

Definition at line 199 of file RTCP.hh.

◆ fByeWithReasonHandlerTask

ByeWithReasonHandlerFunc* RTCPInstance::fByeWithReasonHandlerTask
private

Definition at line 200 of file RTCP.hh.

◆ fCNAME

SDESItem RTCPInstance::fCNAME
private

Definition at line 181 of file RTCP.hh.

◆ fCrypto

SRTPCryptographicContext* RTCPInstance::fCrypto
private

Definition at line 179 of file RTCP.hh.

◆ fEnviron

UsageEnvironment& Medium::fEnviron
privateinherited

Definition at line 82 of file Media.hh.

Referenced by Medium::envir().

◆ fHaveJustSentPacket

Boolean RTCPInstance::fHaveJustSentPacket
private

Definition at line 196 of file RTCP.hh.

◆ fInBuf

u_int8_t* RTCPInstance::fInBuf
private

Definition at line 171 of file RTCP.hh.

◆ fIsInitial

int RTCPInstance::fIsInitial
private

Definition at line 186 of file RTCP.hh.

◆ fIsSSMTransmitter

Boolean RTCPInstance::fIsSSMTransmitter
private

Definition at line 178 of file RTCP.hh.

◆ fKnownMembers

RTCPMemberDatabase* RTCPInstance::fKnownMembers
private

Definition at line 182 of file RTCP.hh.

◆ fLastPacketSentSize

unsigned RTCPInstance::fLastPacketSentSize
private

Definition at line 197 of file RTCP.hh.

◆ fLastReceivedSize

int RTCPInstance::fLastReceivedSize
private

Definition at line 192 of file RTCP.hh.

Referenced by receivedPacketSize().

◆ fLastReceivedSSRC

u_int32_t RTCPInstance::fLastReceivedSSRC
private

Definition at line 193 of file RTCP.hh.

◆ fLastSentSize

int RTCPInstance::fLastSentSize
private

Definition at line 191 of file RTCP.hh.

Referenced by sentPacketSize().

◆ fMediumName

char Medium::fMediumName[mediumNameMaxLen]
privateinherited

Definition at line 83 of file Media.hh.

Referenced by Medium::name().

◆ fNextReportTime

double RTCPInstance::fNextReportTime
private

Definition at line 188 of file RTCP.hh.

◆ fNextTask

TaskToken Medium::fNextTask
privateinherited

Definition at line 84 of file Media.hh.

Referenced by Medium::nextTask().

◆ fNumBytesAlreadyRead

unsigned RTCPInstance::fNumBytesAlreadyRead
private

Definition at line 172 of file RTCP.hh.

◆ fOutBuf

OutPacketBuffer* RTCPInstance::fOutBuf
private

Definition at line 173 of file RTCP.hh.

◆ fOutgoingReportCount

unsigned RTCPInstance::fOutgoingReportCount
private

Definition at line 183 of file RTCP.hh.

◆ fPrevNumMembers

int RTCPInstance::fPrevNumMembers
private

Definition at line 189 of file RTCP.hh.

◆ fPrevReportTime

double RTCPInstance::fPrevReportTime
private

Definition at line 187 of file RTCP.hh.

◆ fRRHandlerClientData

void* RTCPInstance::fRRHandlerClientData
private

Definition at line 206 of file RTCP.hh.

◆ fRRHandlerTask

TaskFunc* RTCPInstance::fRRHandlerTask
private

Definition at line 205 of file RTCP.hh.

◆ fRTCPInterface

RTPInterface RTCPInstance::fRTCPInterface
private

Definition at line 174 of file RTCP.hh.

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

◆ fSink

RTPSink* RTCPInstance::fSink
private

Definition at line 176 of file RTCP.hh.

◆ fSource

RTPSource* RTCPInstance::fSource
private

Definition at line 177 of file RTCP.hh.

◆ fSpecificRRHandlerTable

AddressPortLookupTable* RTCPInstance::fSpecificRRHandlerTable
private

Definition at line 207 of file RTCP.hh.

◆ fSRHandlerClientData

void* RTCPInstance::fSRHandlerClientData
private

Definition at line 204 of file RTCP.hh.

◆ fSRHandlerTask

TaskFunc* RTCPInstance::fSRHandlerTask
private

Definition at line 203 of file RTCP.hh.

◆ fTotSessionBW

unsigned RTCPInstance::fTotSessionBW
private

Definition at line 175 of file RTCP.hh.

Referenced by totSessionBW().

◆ fTypeOfEvent

int RTCPInstance::fTypeOfEvent
private

Definition at line 194 of file RTCP.hh.

Referenced by typeOfEvent().

◆ fTypeOfPacket

int RTCPInstance::fTypeOfPacket
private

Definition at line 195 of file RTCP.hh.

Referenced by packetType().


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