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)
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 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
virtual Boolean isDarwinInjector () const

Static Public Member Functions

static RTCPInstancecreateNew (UsageEnvironment &env, Groupsock *RTCPgs, unsigned totSessionBW, unsigned char const *cname, RTPSink *sink, RTPSource const *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 const *source, Boolean isSSMSource)
virtual ~RTCPInstance ()
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 incomingReportHandler1 ()
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

unsigned char * fInBuf
unsigned fNumBytesAlreadyRead
OutPacketBufferfOutBuf
RTPInterface fRTCPInterface
unsigned fTotSessionBW
RTPSinkfSink
RTPSource const * fSource
Boolean fIsSSMSource
SDESItem fCNAME
RTCPMemberDatabasefKnownMembers
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

Friends

class MediaLookupTable

Detailed Description

Definition at line 44 of file RTCP.hh.


Constructor & Destructor Documentation

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

Definition at line 120 of file RTCP.cpp.

References dTimeNow(), env, EVENT_REPORT, fInBuf, fKnownMembers, fNextReportTime, fNumBytesAlreadyRead, fOutBuf, fPrevReportTime, fRTCPInterface, fTotSessionBW, fTypeOfEvent, incomingReportHandler(), maxRTCPPacketSize, OutPacketBuffer::maxSize, Groupsock::multicastSendOnly(), NULL, onExpire(), preferredPacketSize, RTCPgs(), and RTPInterface::startNetworkReading().

Referenced by createNew().

00125   : Medium(env), fRTCPInterface(this, RTCPgs), fTotSessionBW(totSessionBW),
00126     fSink(sink), fSource(source), fIsSSMSource(isSSMSource),
00127     fCNAME(RTCP_SDES_CNAME, cname), fOutgoingReportCount(1),
00128     fAveRTCPSize(0), fIsInitial(1), fPrevNumMembers(0),
00129     fLastSentSize(0), fLastReceivedSize(0), fLastReceivedSSRC(0),
00130     fTypeOfEvent(EVENT_UNKNOWN), fTypeOfPacket(PACKET_UNKNOWN_TYPE),
00131     fHaveJustSentPacket(False), fLastPacketSentSize(0),
00132     fByeHandlerTask(NULL), fByeHandlerClientData(NULL),
00133     fSRHandlerTask(NULL), fSRHandlerClientData(NULL),
00134     fRRHandlerTask(NULL), fRRHandlerClientData(NULL),
00135     fSpecificRRHandlerTable(NULL) {
00136 #ifdef DEBUG
00137   fprintf(stderr, "RTCPInstance[%p]::RTCPInstance()\n", this);
00138 #endif
00139   if (fTotSessionBW == 0) { // not allowed!
00140     env << "RTCPInstance::RTCPInstance error: totSessionBW parameter should not be zero!\n";
00141     fTotSessionBW = 1;
00142   }
00143 
00144   if (isSSMSource) RTCPgs->multicastSendOnly(); // don't receive multicast
00145 
00146   double timeNow = dTimeNow();
00147   fPrevReportTime = fNextReportTime = timeNow;
00148 
00149   fKnownMembers = new RTCPMemberDatabase(*this);
00150   fInBuf = new unsigned char[maxRTCPPacketSize];
00151   if (fKnownMembers == NULL || fInBuf == NULL) return;
00152   fNumBytesAlreadyRead = 0;
00153 
00154   // A hack to save buffer space, because RTCP packets are always small:
00155   unsigned savedMaxSize = OutPacketBuffer::maxSize;
00156   OutPacketBuffer::maxSize = maxRTCPPacketSize;
00157   fOutBuf = new OutPacketBuffer(preferredPacketSize, maxRTCPPacketSize);
00158   OutPacketBuffer::maxSize = savedMaxSize;
00159   if (fOutBuf == NULL) return;
00160 
00161   // Arrange to handle incoming reports from others:
00162   TaskScheduler::BackgroundHandlerProc* handler
00163     = (TaskScheduler::BackgroundHandlerProc*)&incomingReportHandler;
00164   fRTCPInterface.startNetworkReading(handler);
00165 
00166   // Send our first report.
00167   fTypeOfEvent = EVENT_REPORT;
00168   onExpire(this);
00169 }

RTCPInstance::~RTCPInstance (  )  [protected, virtual]

Definition at line 176 of file RTCP.cpp.

References EVENT_BYE, fInBuf, fKnownMembers, fOutBuf, fRTCPInterface, fSpecificRRHandlerTable, fTypeOfEvent, iter, MediaSubsessionIterator::next(), NULL, sendBYE(), and RTPInterface::stopNetworkReading().

00176                             {
00177 #ifdef DEBUG
00178   fprintf(stderr, "RTCPInstance[%p]::~RTCPInstance()\n", this);
00179 #endif
00180   // Turn off background read handling:
00181   fRTCPInterface.stopNetworkReading();
00182 
00183   // Begin by sending a BYE.  We have to do this immediately, without
00184   // 'reconsideration', because "this" is going away.
00185   fTypeOfEvent = EVENT_BYE; // not used, but...
00186   sendBYE();
00187 
00188   if (fSpecificRRHandlerTable != NULL) {
00189     AddressPortLookupTable::Iterator iter(*fSpecificRRHandlerTable);
00190     RRHandlerRecord* rrHandler;
00191     while ((rrHandler = (RRHandlerRecord*)iter.next()) != NULL) {
00192       delete rrHandler;
00193     }
00194     delete fSpecificRRHandlerTable;
00195   }
00196 
00197   delete fKnownMembers;
00198   delete fOutBuf;
00199   delete[] fInBuf;
00200 }


Member Function Documentation

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

Definition at line 202 of file RTCP.cpp.

References env, RTCPgs(), and RTCPInstance().

Referenced by MediaSubsession::initiate(), main(), and StreamState::startPlaying().

00206                                                            {
00207   return new RTCPInstance(env, RTCPgs, totSessionBW, cname, sink, source,
00208                           isSSMSource);
00209 }

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

Definition at line 211 of file RTCP.cpp.

References env, False, Medium::isRTCPInstance(), Medium::lookupByName(), NULL, and True.

00213                                                                   {
00214   resultInstance = NULL; // unless we succeed
00215 
00216   Medium* medium;
00217   if (!Medium::lookupByName(env, instanceName, medium)) return False;
00218 
00219   if (!medium->isRTCPInstance()) {
00220     env.setResultMsg(instanceName, " is not a RTCP instance");
00221     return False;
00222   }
00223 
00224   resultInstance = (RTCPInstance*)medium;
00225   return True;
00226 }

unsigned RTCPInstance::numMembers (  )  const

Definition at line 232 of file RTCP.cpp.

References fKnownMembers, NULL, and RTCPMemberDatabase::numMembers().

Referenced by onExpire1().

00232                                         {
00233   if (fKnownMembers == NULL) return 0;
00234 
00235   return fKnownMembers->numMembers();
00236 }

unsigned RTCPInstance::totSessionBW (  )  const [inline]

Definition at line 57 of file RTCP.hh.

References fTotSessionBW.

Referenced by PassiveServerMediaSubsession::sdpLines(), and PassiveServerMediaSubsession::startStream().

00057 { return fTotSessionBW; }

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

Definition at line 238 of file RTCP.cpp.

References fByeHandleActiveParticipantsOnly, fByeHandlerClientData, and fByeHandlerTask.

Referenced by AVIFileSink::AVIFileSink(), ProxyServerMediaSubsession::createNewStreamSource(), QuickTimeFileSink::QuickTimeFileSink(), setupStreams(), and shutdownStream().

00239                                                                        {
00240   fByeHandlerTask = handlerTask;
00241   fByeHandlerClientData = clientData;
00242   fByeHandleActiveParticipantsOnly = handleActiveParticipantsOnly;
00243 }

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

Definition at line 245 of file RTCP.cpp.

References fSRHandlerClientData, and fSRHandlerTask.

00245                                                                        {
00246   fSRHandlerTask = handlerTask;
00247   fSRHandlerClientData = clientData;
00248 }

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

Definition at line 250 of file RTCP.cpp.

References fRRHandlerClientData, and fRRHandlerTask.

00250                                                                        {
00251   fRRHandlerTask = handlerTask;
00252   fRRHandlerClientData = clientData;
00253 }

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

Definition at line 256 of file RTCP.cpp.

References AddressPortLookupTable::Add(), fSpecificRRHandlerTable, NULL, RRHandlerRecord::rrHandlerClientData, RRHandlerRecord::rrHandlerTask, and unsetSpecificRRHandler().

Referenced by StreamState::startPlaying(), and PassiveServerMediaSubsession::startStream().

00257                                                                 {
00258   if (handlerTask == NULL && clientData == NULL) {
00259     unsetSpecificRRHandler(fromAddress, fromPort);
00260     return;
00261   }
00262 
00263   RRHandlerRecord* rrHandler = new RRHandlerRecord;
00264   rrHandler->rrHandlerTask = handlerTask;
00265   rrHandler->rrHandlerClientData = clientData;
00266   if (fSpecificRRHandlerTable == NULL) {
00267     fSpecificRRHandlerTable = new AddressPortLookupTable;
00268   }
00269   fSpecificRRHandlerTable->Add(fromAddress, (~0), fromPort, rrHandler);
00270 }

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

Definition at line 273 of file RTCP.cpp.

References fSpecificRRHandlerTable, AddressPortLookupTable::Lookup(), NULL, and AddressPortLookupTable::Remove().

Referenced by PassiveServerMediaSubsession::deleteStream(), StreamState::endPlaying(), and setSpecificRRHandler().

00273                                                                   {
00274   if (fSpecificRRHandlerTable == NULL) return;
00275 
00276   RRHandlerRecord* rrHandler
00277     = (RRHandlerRecord*)(fSpecificRRHandlerTable->Lookup(fromAddress, (~0), fromPort));
00278   if (rrHandler != NULL) {
00279     fSpecificRRHandlerTable->Remove(fromAddress, (~0), fromPort);
00280     delete rrHandler;
00281   }
00282 }

Groupsock* RTCPInstance::RTCPgs (  )  const [inline]

Definition at line 85 of file RTCP.hh.

References fRTCPInterface, and RTPInterface::gs().

Referenced by createNew(), PassiveServerMediaSubsession::getStreamParameters(), RTSPClient::handleSETUPResponse(), incomingReportHandler1(), and RTCPInstance().

00085 { return fRTCPInterface.gs(); }

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

Definition at line 284 of file RTCP.cpp.

References fRTCPInterface, incomingReportHandler(), RTPInterface::setStreamSocket(), RTPInterface::startNetworkReading(), and RTPInterface::stopNetworkReading().

Referenced by RTSPClient::handleSETUPResponse(), and DarwinInjector::setDestination().

00285                                                                   {
00286   // Turn off background read handling:
00287   fRTCPInterface.stopNetworkReading();
00288 
00289   // Switch to RTCP-over-TCP:
00290   fRTCPInterface.setStreamSocket(sockNum, streamChannelId);
00291 
00292   // Turn background reading back on:
00293   TaskScheduler::BackgroundHandlerProc* handler
00294     = (TaskScheduler::BackgroundHandlerProc*)&incomingReportHandler;
00295   fRTCPInterface.startNetworkReading(handler);
00296 }

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

Definition at line 298 of file RTCP.cpp.

References RTPInterface::addStreamSocket(), Medium::envir(), fRTCPInterface, RTPInterface::gs(), incomingReportHandler(), Socket::socketNum(), RTPInterface::startNetworkReading(), UsageEnvironment::taskScheduler(), and TaskScheduler::turnOffBackgroundReadHandling().

Referenced by StreamState::startPlaying().

00299                                                                   {
00300   // First, turn off background read handling for the default (UDP) socket:
00301   envir().taskScheduler().turnOffBackgroundReadHandling(fRTCPInterface.gs()->socketNum());
00302 
00303   // Add the RTCP-over-TCP interface:
00304   fRTCPInterface.addStreamSocket(sockNum, streamChannelId);
00305 
00306   // Turn on background reading for this socket (in case it's not on already):
00307   TaskScheduler::BackgroundHandlerProc* handler
00308     = (TaskScheduler::BackgroundHandlerProc*)&incomingReportHandler;
00309   fRTCPInterface.startNetworkReading(handler);
00310 }

void RTCPInstance::removeStreamSocket ( int  sockNum,
unsigned char  streamChannelId 
) [inline]

Definition at line 89 of file RTCP.hh.

References fRTCPInterface, and RTPInterface::removeStreamSocket().

Referenced by StreamState::endPlaying().

00089                                                                       {
00090     fRTCPInterface.removeStreamSocket(sockNum, streamChannelId);
00091   }

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

Definition at line 94 of file RTCP.hh.

References fRTCPInterface, and RTPInterface::setAuxilliaryReadHandler().

00095                                                          {
00096     fRTCPInterface.setAuxilliaryReadHandler(handlerFunc,
00097                                             handlerClientData);
00098   }

Boolean RTCPInstance::isRTCPInstance (  )  const [private, virtual]

Reimplemented from Medium.

Definition at line 228 of file RTCP.cpp.

References True.

00228                                            {
00229   return True;
00230 }

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

Definition at line 698 of file RTCP.cpp.

References addRR(), addSR(), RTPSink::enableRTCPReports(), False, fSink, fSource, RTPSink::nextTimestampHasBeenPreset(), NULL, and True.

Referenced by sendBYE(), and sendReport().

00698                                                  {
00699   // Include a SR or a RR, depending on whether we have an associated sink or source:
00700   if (fSink != NULL) {
00701     if (!alwaysAdd) {
00702       if (!fSink->enableRTCPReports()) return False;
00703 
00704       // Hack: Don't send a SR during those (brief) times when the timestamp of the
00705       // next outgoing RTP packet has been preset, to ensure that that timestamp gets
00706       // used for that outgoing packet. (David Bertrand, 2006.07.18)
00707       if (fSink->nextTimestampHasBeenPreset()) return False;
00708     }
00709 
00710     addSR();
00711   } else if (fSource != NULL) {
00712     addRR();
00713   }
00714 
00715   return True;
00716 }

void RTCPInstance::addSR (  )  [private]

Definition at line 718 of file RTCP.cpp.

References RTPSink::convertToRTPTimestamp(), enqueueCommonReportPrefix(), enqueueCommonReportSuffix(), OutPacketBuffer::enqueueWord(), fOutBuf, fSink, NULL, RTPSink::octetCount(), RTPSink::packetCount(), RTCP_PT_SR, and RTPSink::SSRC().

Referenced by addReport().

00718                          {
00719   // ASSERT: fSink != NULL
00720 
00721   enqueueCommonReportPrefix(RTCP_PT_SR, fSink->SSRC(),
00722                             5 /* extra words in a SR */);
00723 
00724   // Now, add the 'sender info' for our sink
00725 
00726   // Insert the NTP and RTP timestamps for the 'wallclock time':
00727   struct timeval timeNow;
00728   gettimeofday(&timeNow, NULL);
00729   fOutBuf->enqueueWord(timeNow.tv_sec + 0x83AA7E80);
00730       // NTP timestamp most-significant word (1970 epoch -> 1900 epoch)
00731   double fractionalPart = (timeNow.tv_usec/15625.0)*0x04000000; // 2^32/10^6
00732   fOutBuf->enqueueWord((unsigned)(fractionalPart+0.5));
00733       // NTP timestamp least-significant word
00734   unsigned rtpTimestamp = fSink->convertToRTPTimestamp(timeNow);
00735   fOutBuf->enqueueWord(rtpTimestamp); // RTP ts
00736 
00737   // Insert the packet and byte counts:
00738   fOutBuf->enqueueWord(fSink->packetCount());
00739   fOutBuf->enqueueWord(fSink->octetCount());
00740 
00741   enqueueCommonReportSuffix();
00742 }

void RTCPInstance::addRR (  )  [private]

Definition at line 744 of file RTCP.cpp.

References enqueueCommonReportPrefix(), enqueueCommonReportSuffix(), fSource, RTCP_PT_RR, and RTPSource::SSRC().

Referenced by addReport().

00744                          {
00745   // ASSERT: fSource != NULL
00746 
00747   enqueueCommonReportPrefix(RTCP_PT_RR, fSource->SSRC());
00748   enqueueCommonReportSuffix();
00749 }

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

Referenced by addRR(), and addSR().

void RTCPInstance::enqueueCommonReportSuffix (  )  [private]

Definition at line 776 of file RTCP.cpp.

References enqueueReportBlock(), fSource, RTPReceptionStatsDB::Iterator::next(), NULL, RTPSource::receptionStatsDB(), and RTPReceptionStatsDB::reset().

Referenced by addRR(), and addSR().

00776                                              {
00777   // Output the report blocks for each source:
00778   if (fSource != NULL) {
00779     RTPReceptionStatsDB& allReceptionStats
00780       = fSource->receptionStatsDB();
00781 
00782     RTPReceptionStatsDB::Iterator iterator(allReceptionStats);
00783     while (1) {
00784       RTPReceptionStats* receptionStats = iterator.next();
00785       if (receptionStats == NULL) break;
00786       enqueueReportBlock(receptionStats);
00787     }
00788 
00789     allReceptionStats.reset(); // because we have just generated a report
00790   }
00791 }

void RTCPInstance::enqueueReportBlock ( RTPReceptionStats receptionStats  )  [private]

Definition at line 794 of file RTCP.cpp.

References RTPReceptionStats::baseExtSeqNumReceived(), OutPacketBuffer::enqueueWord(), fOutBuf, RTPReceptionStats::highestExtSeqNumReceived(), RTPReceptionStats::jitter(), RTPReceptionStats::lastReceivedSR_NTPlsw(), RTPReceptionStats::lastReceivedSR_NTPmsw(), RTPReceptionStats::lastReceivedSR_time(), RTPReceptionStats::lastResetExtSeqNumReceived(), NULL, RTPReceptionStats::numPacketsReceivedSinceLastReset(), RTPReceptionStats::SSRC(), and RTPReceptionStats::totNumPacketsReceived().

Referenced by enqueueCommonReportSuffix().

00794                                                          {
00795   fOutBuf->enqueueWord(stats->SSRC());
00796 
00797   unsigned highestExtSeqNumReceived = stats->highestExtSeqNumReceived();
00798 
00799   unsigned totNumExpected
00800     = highestExtSeqNumReceived - stats->baseExtSeqNumReceived();
00801   int totNumLost = totNumExpected - stats->totNumPacketsReceived();
00802   // 'Clamp' this loss number to a 24-bit signed value:
00803   if (totNumLost > 0x007FFFFF) {
00804     totNumLost = 0x007FFFFF;
00805   } else if (totNumLost < 0) {
00806     if (totNumLost < -0x00800000) totNumLost = 0x00800000; // unlikely, but...
00807     totNumLost &= 0x00FFFFFF;
00808   }
00809 
00810   unsigned numExpectedSinceLastReset
00811     = highestExtSeqNumReceived - stats->lastResetExtSeqNumReceived();
00812   int numLostSinceLastReset
00813     = numExpectedSinceLastReset - stats->numPacketsReceivedSinceLastReset();
00814   unsigned char lossFraction;
00815   if (numExpectedSinceLastReset == 0 || numLostSinceLastReset < 0) {
00816     lossFraction = 0;
00817   } else {
00818     lossFraction = (unsigned char)
00819       ((numLostSinceLastReset << 8) / numExpectedSinceLastReset);
00820   }
00821 
00822   fOutBuf->enqueueWord((lossFraction<<24) | totNumLost);
00823   fOutBuf->enqueueWord(highestExtSeqNumReceived);
00824 
00825   fOutBuf->enqueueWord(stats->jitter());
00826 
00827   unsigned NTPmsw = stats->lastReceivedSR_NTPmsw();
00828   unsigned NTPlsw = stats->lastReceivedSR_NTPlsw();
00829   unsigned LSR = ((NTPmsw&0xFFFF)<<16)|(NTPlsw>>16); // middle 32 bits
00830   fOutBuf->enqueueWord(LSR);
00831 
00832   // Figure out how long has elapsed since the last SR rcvd from this src:
00833   struct timeval const& LSRtime = stats->lastReceivedSR_time(); // "last SR"
00834   struct timeval timeNow, timeSinceLSR;
00835   gettimeofday(&timeNow, NULL);
00836   if (timeNow.tv_usec < LSRtime.tv_usec) {
00837     timeNow.tv_usec += 1000000;
00838     timeNow.tv_sec -= 1;
00839   }
00840   timeSinceLSR.tv_sec = timeNow.tv_sec - LSRtime.tv_sec;
00841   timeSinceLSR.tv_usec = timeNow.tv_usec - LSRtime.tv_usec;
00842   // The enqueued time is in units of 1/65536 seconds.
00843   // (Note that 65536/1000000 == 1024/15625)
00844   unsigned DLSR;
00845   if (LSR == 0) {
00846     DLSR = 0;
00847   } else {
00848     DLSR = (timeSinceLSR.tv_sec<<16)
00849          | ( (((timeSinceLSR.tv_usec<<11)+15625)/31250) & 0xFFFF);
00850   }
00851   fOutBuf->enqueueWord(DLSR);
00852 }

void RTCPInstance::addSDES (  )  [private]

Definition at line 854 of file RTCP.cpp.

References OutPacketBuffer::curPacketSize(), SDESItem::data(), OutPacketBuffer::enqueue(), OutPacketBuffer::enqueueWord(), fCNAME, fOutBuf, fSink, fSource, NULL, RTCP_PT_SDES, RTPSink::SSRC(), RTPSource::SSRC(), and SDESItem::totalSize().

Referenced by sendReport().

00854                            {
00855   // For now we support only the CNAME item; later support more #####
00856 
00857   // Begin by figuring out the size of the entire SDES report:
00858   unsigned numBytes = 4;
00859       // counts the SSRC, but not the header; it'll get subtracted out
00860   numBytes += fCNAME.totalSize(); // includes id and length
00861   numBytes += 1; // the special END item
00862 
00863   unsigned num4ByteWords = (numBytes + 3)/4;
00864 
00865   unsigned rtcpHdr = 0x81000000; // version 2, no padding, 1 SSRC chunk
00866   rtcpHdr |= (RTCP_PT_SDES<<16);
00867   rtcpHdr |= num4ByteWords;
00868   fOutBuf->enqueueWord(rtcpHdr);
00869 
00870   if (fSource != NULL) {
00871     fOutBuf->enqueueWord(fSource->SSRC());
00872   } else if (fSink != NULL) {
00873     fOutBuf->enqueueWord(fSink->SSRC());
00874   }
00875 
00876   // Add the CNAME:
00877   fOutBuf->enqueue(fCNAME.data(), fCNAME.totalSize());
00878 
00879   // Add the 'END' item (i.e., a zero byte), plus any more needed to pad:
00880   unsigned numPaddingBytesNeeded = 4 - (fOutBuf->curPacketSize() % 4);
00881   unsigned char const zero = '\0';
00882   while (numPaddingBytesNeeded-- > 0) fOutBuf->enqueue(&zero, 1);
00883 }

void RTCPInstance::addBYE (  )  [private]

Definition at line 885 of file RTCP.cpp.

References OutPacketBuffer::enqueueWord(), fOutBuf, fSink, fSource, NULL, RTCP_PT_BYE, RTPSink::SSRC(), and RTPSource::SSRC().

Referenced by sendBYE().

00885                           {
00886   unsigned rtcpHdr = 0x81000000; // version 2, no padding, 1 SSRC
00887   rtcpHdr |= (RTCP_PT_BYE<<16);
00888   rtcpHdr |= 1; // 2 32-bit words total (i.e., with 1 SSRC)
00889   fOutBuf->enqueueWord(rtcpHdr);
00890 
00891   if (fSource != NULL) {
00892     fOutBuf->enqueueWord(fSource->SSRC());
00893   } else if (fSink != NULL) {
00894     fOutBuf->enqueueWord(fSink->SSRC());
00895   }
00896 }

void RTCPInstance::sendBuiltPacket (  )  [private]

Definition at line 654 of file RTCP.cpp.

References OutPacketBuffer::curPacketSize(), fHaveJustSentPacket, fLastPacketSentSize, fLastSentSize, fOutBuf, fRTCPInterface, IP_UDP_HDR_SIZE, OutPacketBuffer::packet(), OutPacketBuffer::resetOffset(), RTPInterface::sendPacket(), and True.

Referenced by sendBYE(), and sendReport().

00654                                    {
00655 #ifdef DEBUG
00656   fprintf(stderr, "sending RTCP packet\n");
00657   unsigned char* p = fOutBuf->packet();
00658   for (unsigned i = 0; i < fOutBuf->curPacketSize(); ++i) {
00659     if (i%4 == 0) fprintf(stderr," ");
00660     fprintf(stderr, "%02x", p[i]);
00661   }
00662   fprintf(stderr, "\n");
00663 #endif
00664   unsigned reportSize = fOutBuf->curPacketSize();
00665   fRTCPInterface.sendPacket(fOutBuf->packet(), reportSize);
00666   fOutBuf->resetOffset();
00667 
00668   fLastSentSize = IP_UDP_HDR_SIZE + reportSize;
00669   fHaveJustSentPacket = True;
00670   fLastPacketSentSize = reportSize;
00671 }

void RTCPInstance::onExpire ( RTCPInstance instance  )  [static, private]

Definition at line 692 of file RTCP.cpp.

References onExpire1().

Referenced by RTCPInstance(), and schedule().

00692                                                   {
00693   instance->onExpire1();
00694 }

void RTCPInstance::onExpire1 (  )  [private]

Definition at line 916 of file RTCP.cpp.

References dTimeNow(), fAveRTCPSize, fIsInitial, fPrevNumMembers, fPrevReportTime, fSink, fTotSessionBW, NULL, numMembers(), and OnExpire().

Referenced by onExpire().

00916                              {
00917   // Note: fTotSessionBW is kbits per second
00918   double rtcpBW = 0.05*fTotSessionBW*1024/8; // -> bytes per second
00919 
00920   OnExpire(this, // event
00921            numMembers(), // members
00922            (fSink != NULL) ? 1 : 0, // senders
00923            rtcpBW, // rtcp_bw
00924            (fSink != NULL) ? 1 : 0, // we_sent
00925            &fAveRTCPSize, // ave_rtcp_size
00926            &fIsInitial, // initial
00927            dTimeNow(), // tc
00928            &fPrevReportTime, // tp
00929            &fPrevNumMembers // pmembers
00930            );
00931 }

void RTCPInstance::incomingReportHandler ( RTCPInstance instance,
int   
) [static, private]

Definition at line 317 of file RTCP.cpp.

References incomingReportHandler1().

Referenced by addStreamSocket(), RTCPInstance(), and setStreamSocket().

00318                                                        {
00319   instance->incomingReportHandler1();
00320 }

void RTCPInstance::incomingReportHandler1 (  )  [private]

Definition at line 322 of file RTCP.cpp.

References ADVANCE, Medium::envir(), False, fByeHandleActiveParticipantsOnly, fByeHandlerClientData, fByeHandlerTask, fHaveJustSentPacket, fInBuf, fIsSSMSource, fLastPacketSentSize, fNumBytesAlreadyRead, fRRHandlerClientData, fRRHandlerTask, fRTCPInterface, fSink, fSource, fSpecificRRHandlerTable, fSRHandlerClientData, fSRHandlerTask, RTPInterface::handleRead(), IP_UDP_HDR_SIZE, RTPTransmissionStatsDB::lookup(), RTPReceptionStatsDB::lookup(), AddressPortLookupTable::Lookup(), maxRTCPPacketSize, RTPInterface::nextTCPReadStreamChannelId(), RTPInterface::nextTCPReadStreamSocketNum(), RTPTransmissionStatsDB::noteIncomingRR(), RTPReceptionStatsDB::noteIncomingSR(), NULL, onReceive(), PACKET_BYE, PACKET_RTCP_REPORT, PACKET_UNKNOWN_TYPE, RTPSource::receptionStatsDB(), RRHandlerRecord::rrHandlerClientData, RRHandlerRecord::rrHandlerTask, RTCP_PT_BYE, RTCP_PT_RR, RTCP_PT_SR, RTCPgs(), RTPInterface::sendPacket(), RTPSink::SSRC(), RTPSink::transmissionStatsDB(), and True.

Referenced by incomingReportHandler().

00322                                           {
00323   do {
00324     Boolean callByeHandler = False;
00325     int tcpReadStreamSocketNum = fRTCPInterface.nextTCPReadStreamSocketNum();
00326     unsigned char tcpReadStreamChannelId = fRTCPInterface.nextTCPReadStreamChannelId();
00327     unsigned packetSize = 0;
00328     unsigned numBytesRead;
00329     struct sockaddr_in fromAddress;
00330     Boolean packetReadWasIncomplete;
00331     if (fNumBytesAlreadyRead >= maxRTCPPacketSize) {
00332       envir() << "RTCPInstance error: Hit limit when reading incoming packet over TCP. Increase \"maxRTCPPacketSize\"\n";
00333       break;
00334     }
00335     Boolean readResult
00336       = fRTCPInterface.handleRead(&fInBuf[fNumBytesAlreadyRead], maxRTCPPacketSize - fNumBytesAlreadyRead,
00337                                   numBytesRead, fromAddress, packetReadWasIncomplete);
00338     if (packetReadWasIncomplete) {
00339       fNumBytesAlreadyRead += numBytesRead;
00340       return; // more reads are needed to get the entire packet
00341     } else { // normal case: We've read the entire packet 
00342       packetSize = fNumBytesAlreadyRead + numBytesRead;
00343       fNumBytesAlreadyRead = 0; // for next time
00344     }
00345     if (!readResult) break;
00346 
00347     // Ignore the packet if it was looped-back from ourself:
00348     Boolean packetWasFromOurHost = False;
00349     if (RTCPgs()->wasLoopedBackFromUs(envir(), fromAddress)) {
00350       packetWasFromOurHost = True;
00351       // However, we still want to handle incoming RTCP packets from
00352       // *other processes* on the same machine.  To distinguish this
00353       // case from a true loop-back, check whether we've just sent a
00354       // packet of the same size.  (This check isn't perfect, but it seems
00355       // to be the best we can do.)
00356       if (fHaveJustSentPacket && fLastPacketSentSize == packetSize) {
00357         // This is a true loop-back:
00358         fHaveJustSentPacket = False;
00359         break; // ignore this packet
00360       }
00361     }
00362 
00363     unsigned char* pkt = fInBuf;
00364     if (fIsSSMSource && !packetWasFromOurHost) {
00365       // This packet is assumed to have been received via unicast (because we're a SSM source, and SSM receivers send back RTCP "RR"
00366       // packets via unicast).  'Reflect' the packet by resending it to the multicast group, so that any other receivers can also
00367       // get to see it.
00368 
00369       // NOTE: Denial-of-service attacks are possible here.
00370       // Users of this software may wish to add their own,
00371       // application-specific mechanism for 'authenticating' the
00372       // validity of this packet before reflecting it.
00373 
00374       // NOTE: The test for "!packetWasFromOurHost" means that we won't reflect RTCP packets that come from other processes on
00375       // the same host as us.  The reason for this is that the 'packet size' test above is not 100% reliable; some packets
00376       // that were truly looped back from us might not be detected as such, and this might lead to infinite forwarding/receiving
00377       // of some packets.  To avoid this possibility, we only reflect RTCP packets that we know for sure originated elsewhere.
00378       // (Note, though, that if we ever re-enable the code in "Groupsock::multicastSendOnly()", then we could remove the test for
00379       // "!packetWasFromOurHost".)
00380       fRTCPInterface.sendPacket(pkt, packetSize);
00381       fHaveJustSentPacket = True;
00382       fLastPacketSentSize = packetSize;
00383     }
00384 
00385 #ifdef DEBUG
00386     fprintf(stderr, "[%p]saw incoming RTCP packet", this);
00387     if (tcpReadStreamSocketNum < 0) {
00388       // Note that "fromAddress" is valid only if we're receiving over UDP (not over TCP):
00389       fprintf(stderr, " (from address %s, port %d)", AddressString(fromAddress).val(), ntohs(fromAddress.sin_port));
00390     }
00391     fprintf(stderr, "\n");
00392     for (unsigned i = 0; i < packetSize; ++i) {
00393       if (i%4 == 0) fprintf(stderr, " ");
00394       fprintf(stderr, "%02x", pkt[i]);
00395     }
00396     fprintf(stderr, "\n");
00397 #endif
00398     int totPacketSize = IP_UDP_HDR_SIZE + packetSize;
00399 
00400     // Check the RTCP packet for validity:
00401     // It must at least contain a header (4 bytes), and this header
00402     // must be version=2, with no padding bit, and a payload type of
00403     // SR (200) or RR (201):
00404     if (packetSize < 4) break;
00405     unsigned rtcpHdr = ntohl(*(u_int32_t*)pkt);
00406     if ((rtcpHdr & 0xE0FE0000) != (0x80000000 | (RTCP_PT_SR<<16))) {
00407 #ifdef DEBUG
00408       fprintf(stderr, "rejected bad RTCP packet: header 0x%08x\n", rtcpHdr);
00409 #endif
00410       break;
00411     }
00412 
00413     // Process each of the individual RTCP 'subpackets' in (what may be)
00414     // a compound RTCP packet.
00415     int typeOfPacket = PACKET_UNKNOWN_TYPE;
00416     unsigned reportSenderSSRC = 0;
00417     Boolean packetOK = False;
00418     while (1) {
00419       unsigned rc = (rtcpHdr>>24)&0x1F;
00420       unsigned pt = (rtcpHdr>>16)&0xFF;
00421       unsigned length = 4*(rtcpHdr&0xFFFF); // doesn't count hdr
00422       ADVANCE(4); // skip over the header
00423       if (length > packetSize) break;
00424 
00425       // Assume that each RTCP subpacket begins with a 4-byte SSRC:
00426       if (length < 4) break; length -= 4;
00427       reportSenderSSRC = ntohl(*(u_int32_t*)pkt); ADVANCE(4);
00428 
00429       Boolean subPacketOK = False;
00430       switch (pt) {
00431         case RTCP_PT_SR: {
00432 #ifdef DEBUG
00433           fprintf(stderr, "SR\n");
00434 #endif
00435           if (length < 20) break; length -= 20;
00436 
00437           // Extract the NTP timestamp, and note this:
00438           unsigned NTPmsw = ntohl(*(u_int32_t*)pkt); ADVANCE(4);
00439           unsigned NTPlsw = ntohl(*(u_int32_t*)pkt); ADVANCE(4);
00440           unsigned rtpTimestamp = ntohl(*(u_int32_t*)pkt); ADVANCE(4);
00441           if (fSource != NULL) {
00442             RTPReceptionStatsDB& receptionStats
00443               = fSource->receptionStatsDB();
00444             receptionStats.noteIncomingSR(reportSenderSSRC,
00445                                           NTPmsw, NTPlsw, rtpTimestamp);
00446           }
00447           ADVANCE(8); // skip over packet count, octet count
00448 
00449           // If a 'SR handler' was set, call it now:
00450           if (fSRHandlerTask != NULL) (*fSRHandlerTask)(fSRHandlerClientData);
00451 
00452           // The rest of the SR is handled like a RR (so, no "break;" here)
00453         }
00454         case RTCP_PT_RR: {
00455 #ifdef DEBUG
00456           fprintf(stderr, "RR\n");
00457 #endif
00458           unsigned reportBlocksSize = rc*(6*4);
00459           if (length < reportBlocksSize) break;
00460           length -= reportBlocksSize;
00461 
00462           if (fSink != NULL) {
00463             // Use this information to update stats about our transmissions:
00464             RTPTransmissionStatsDB& transmissionStats = fSink->transmissionStatsDB();
00465             for (unsigned i = 0; i < rc; ++i) {
00466               unsigned senderSSRC = ntohl(*(u_int32_t*)pkt); ADVANCE(4);
00467               // We care only about reports about our own transmission, not others'
00468               if (senderSSRC == fSink->SSRC()) {
00469                 unsigned lossStats = ntohl(*(u_int32_t*)pkt); ADVANCE(4);
00470                 unsigned highestReceived = ntohl(*(u_int32_t*)pkt); ADVANCE(4);
00471                 unsigned jitter = ntohl(*(u_int32_t*)pkt); ADVANCE(4);
00472                 unsigned timeLastSR = ntohl(*(u_int32_t*)pkt); ADVANCE(4);
00473                 unsigned timeSinceLastSR = ntohl(*(u_int32_t*)pkt); ADVANCE(4);
00474                 transmissionStats.noteIncomingRR(reportSenderSSRC, fromAddress,
00475                                                  lossStats,
00476                                                  highestReceived, jitter,
00477                                                  timeLastSR, timeSinceLastSR);
00478               } else {
00479                 ADVANCE(4*5);
00480               }
00481             }
00482           } else {
00483             ADVANCE(reportBlocksSize);
00484           }
00485 
00486           if (pt == RTCP_PT_RR) { // i.e., we didn't fall through from 'SR'
00487             // If a 'RR handler' was set, call it now:
00488 
00489             // Specific RR handler:
00490             if (fSpecificRRHandlerTable != NULL) {
00491               netAddressBits fromAddr;
00492               portNumBits fromPortNum;
00493               if (tcpReadStreamSocketNum < 0) {
00494                 // Normal case: We read the RTCP packet over UDP
00495                 fromAddr = fromAddress.sin_addr.s_addr;
00496                 fromPortNum = ntohs(fromAddress.sin_port);
00497               } else {
00498                 // Special case: We read the RTCP packet over TCP (interleaved)
00499                 // Hack: Use the TCP socket and channel id to look up the handler
00500                 fromAddr = tcpReadStreamSocketNum;
00501                 fromPortNum = tcpReadStreamChannelId;
00502               }
00503               Port fromPort(fromPortNum);
00504               RRHandlerRecord* rrHandler
00505                 = (RRHandlerRecord*)(fSpecificRRHandlerTable->Lookup(fromAddr, (~0), fromPort));
00506               if (rrHandler != NULL) {
00507                 if (rrHandler->rrHandlerTask != NULL) {
00508                   (*(rrHandler->rrHandlerTask))(rrHandler->rrHandlerClientData);
00509                 }
00510               }
00511             }
00512 
00513             // General RR handler:
00514             if (fRRHandlerTask != NULL) (*fRRHandlerTask)(fRRHandlerClientData);
00515           }
00516 
00517           subPacketOK = True;
00518           typeOfPacket = PACKET_RTCP_REPORT;
00519           break;
00520         }
00521         case RTCP_PT_BYE: {
00522 #ifdef DEBUG
00523           fprintf(stderr, "BYE\n");
00524 #endif
00525           // If a 'BYE handler' was set, arrange for it to be called at the end of this routine.
00526           // (Note: We don't call it immediately, in case it happens to cause "this" to be deleted.)
00527           if (fByeHandlerTask != NULL
00528               && (!fByeHandleActiveParticipantsOnly
00529                   || (fSource != NULL
00530                       && fSource->receptionStatsDB().lookup(reportSenderSSRC) != NULL)
00531                   || (fSink != NULL
00532                       && fSink->transmissionStatsDB().lookup(reportSenderSSRC) != NULL))) {
00533             callByeHandler = True;
00534           }
00535 
00536           // We should really check for & handle >1 SSRCs being present #####
00537 
00538           subPacketOK = True;
00539           typeOfPacket = PACKET_BYE;
00540           break;
00541         }
00542         // Later handle SDES, APP, and compound RTCP packets #####
00543         default:
00544 #ifdef DEBUG
00545           fprintf(stderr, "UNSUPPORTED TYPE(0x%x)\n", pt);
00546 #endif
00547           subPacketOK = True;
00548           break;
00549       }
00550       if (!subPacketOK) break;
00551 
00552       // need to check for (& handle) SSRC collision! #####
00553 
00554 #ifdef DEBUG
00555       fprintf(stderr, "validated RTCP subpacket (type %d): %d, %d, %d, 0x%08x\n", typeOfPacket, rc, pt, length, reportSenderSSRC);
00556 #endif
00557 
00558       // Skip over any remaining bytes in this subpacket:
00559       ADVANCE(length);
00560 
00561       // Check whether another RTCP 'subpacket' follows:
00562       if (packetSize == 0) {
00563         packetOK = True;
00564         break;
00565       } else if (packetSize < 4) {
00566 #ifdef DEBUG
00567         fprintf(stderr, "extraneous %d bytes at end of RTCP packet!\n", packetSize);
00568 #endif
00569         break;
00570       }
00571       rtcpHdr = ntohl(*(u_int32_t*)pkt);
00572       if ((rtcpHdr & 0xC0000000) != 0x80000000) {
00573 #ifdef DEBUG
00574         fprintf(stderr, "bad RTCP subpacket: header 0x%08x\n", rtcpHdr);
00575 #endif
00576         break;
00577       }
00578     }
00579 
00580     if (!packetOK) {
00581 #ifdef DEBUG
00582       fprintf(stderr, "rejected bad RTCP subpacket: header 0x%08x\n", rtcpHdr);
00583 #endif
00584       break;
00585     } else {
00586 #ifdef DEBUG
00587       fprintf(stderr, "validated entire RTCP packet\n");
00588 #endif
00589     }
00590 
00591     onReceive(typeOfPacket, totPacketSize, reportSenderSSRC);
00592 
00593     // Finally, if we need to call a "BYE" handler, do so now (in case it causes "this" to get deleted):
00594     if (callByeHandler && fByeHandlerTask != NULL/*sanity check*/) {
00595       TaskFunc* byeHandler = fByeHandlerTask;
00596       fByeHandlerTask = NULL; // because we call the handler only once, by default
00597       (*byeHandler)(fByeHandlerClientData);
00598     }
00599   } while (0);
00600 }

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

Referenced by incomingReportHandler1().

void RTCPInstance::schedule ( double  nextTime  ) 

Definition at line 898 of file RTCP.cpp.

References dTimeNow(), Medium::envir(), fNextReportTime, Medium::nextTask(), onExpire(), TaskScheduler::scheduleDelayedTask(), and UsageEnvironment::taskScheduler().

Referenced by reschedule(), and Schedule().

00898                                            {
00899   fNextReportTime = nextTime;
00900 
00901   double secondsToDelay = nextTime - dTimeNow();
00902   if (secondsToDelay < 0) secondsToDelay = 0;
00903 #ifdef DEBUG
00904   fprintf(stderr, "schedule(%f->%f)\n", secondsToDelay, nextTime);
00905 #endif
00906   int64_t usToGo = (int64_t)(secondsToDelay * 1000000);
00907   nextTask() = envir().taskScheduler().scheduleDelayedTask(usToGo,
00908                                 (TaskFunc*)RTCPInstance::onExpire, this);
00909 }

void RTCPInstance::reschedule ( double  nextTime  ) 

Definition at line 911 of file RTCP.cpp.

References Medium::envir(), Medium::nextTask(), schedule(), UsageEnvironment::taskScheduler(), and TaskScheduler::unscheduleDelayedTask().

Referenced by Reschedule().

00911                                              {
00912   envir().taskScheduler().unscheduleDelayedTask(nextTask());
00913   schedule(nextTime);
00914 }

void RTCPInstance::sendReport (  ) 

Definition at line 622 of file RTCP.cpp.

References addReport(), addSDES(), fKnownMembers, fOutgoingReportCount, RTCPMemberDatabase::reapOldMembers(), and sendBuiltPacket().

Referenced by SendRTCPReport(), StreamState::startPlaying(), and PassiveServerMediaSubsession::startStream().

00622                               {
00623 #ifdef DEBUG
00624   fprintf(stderr, "sending REPORT\n");
00625 #endif
00626   // Begin by including a SR and/or RR report:
00627   if (!addReport()) return;
00628 
00629   // Then, include a SDES:
00630   addSDES();
00631 
00632   // Send the report:
00633   sendBuiltPacket();
00634 
00635   // Periodically clean out old members from our SSRC membership database:
00636   const unsigned membershipReapPeriod = 5;
00637   if ((++fOutgoingReportCount) % membershipReapPeriod == 0) {
00638     unsigned threshold = fOutgoingReportCount - membershipReapPeriod;
00639     fKnownMembers->reapOldMembers(threshold);
00640   }
00641 }

void RTCPInstance::sendBYE (  ) 

Definition at line 643 of file RTCP.cpp.

References addBYE(), addReport(), sendBuiltPacket(), and True.

Referenced by StreamState::endPlaying(), SendBYEPacket(), and ~RTCPInstance().

00643                            {
00644 #ifdef DEBUG
00645   fprintf(stderr, "sending BYE\n");
00646 #endif
00647   // The packet must begin with a SR and/or RR report:
00648   (void)addReport(True);
00649 
00650   addBYE();
00651   sendBuiltPacket();
00652 }

int RTCPInstance::typeOfEvent (  )  [inline]

Definition at line 174 of file RTCP.hh.

References fTypeOfEvent.

Referenced by TypeOfEvent().

00174 {return fTypeOfEvent;}

int RTCPInstance::sentPacketSize (  )  [inline]

Definition at line 175 of file RTCP.hh.

References fLastSentSize.

Referenced by SentPacketSize().

00175 {return fLastSentSize;}

int RTCPInstance::packetType (  )  [inline]

Definition at line 176 of file RTCP.hh.

References fTypeOfPacket.

Referenced by PacketType().

00176 {return fTypeOfPacket;}

int RTCPInstance::receivedPacketSize (  )  [inline]

Definition at line 177 of file RTCP.hh.

References fLastReceivedSize.

Referenced by ReceivedPacketSize().

00177 {return fLastReceivedSize;}

int RTCPInstance::checkNewSSRC (  ) 

Definition at line 673 of file RTCP.cpp.

References fKnownMembers, fLastReceivedSSRC, fOutgoingReportCount, and RTCPMemberDatabase::noteMembership().

Referenced by NewMember().

00673                                {
00674   return fKnownMembers->noteMembership(fLastReceivedSSRC,
00675                                        fOutgoingReportCount);
00676 }

void RTCPInstance::removeLastReceivedSSRC (  ) 

Definition at line 678 of file RTCP.cpp.

References False, fLastReceivedSSRC, and removeSSRC().

Referenced by RemoveMember().

00678                                           {
00679   removeSSRC(fLastReceivedSSRC, False/*keep stats around*/);
00680 }

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

Definition at line 682 of file RTCP.cpp.

References fKnownMembers, fSink, fSource, NULL, RTPSource::receptionStatsDB(), RTCPMemberDatabase::remove(), RTPTransmissionStatsDB::removeRecord(), RTPReceptionStatsDB::removeRecord(), and RTPSink::transmissionStatsDB().

Referenced by RTCPMemberDatabase::reapOldMembers(), and removeLastReceivedSSRC().

00682                                                                      {
00683   fKnownMembers->remove(ssrc);
00684 
00685   if (alsoRemoveStats) {
00686     // Also, remove records of this SSRC from any reception or transmission stats
00687     if (fSource != NULL) fSource->receptionStatsDB().removeRecord(ssrc);
00688     if (fSink != NULL) fSink->transmissionStatsDB().removeRecord(ssrc);
00689   }
00690 }

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

Definition at line 41 of file Media.cpp.

References env, False, MediaLookupTable::lookup(), NULL, MediaLookupTable::ourMedia(), UsageEnvironment::setResultMsg(), and True.

Referenced by ServerMediaSession::lookupByName(), RTSPServer::lookupByName(), RTSPClient::lookupByName(), lookupByName(), MediaSource::lookupByName(), MediaSink::lookupByName(), MediaSession::lookupByName(), and DarwinInjector::lookupByName().

00042                                                          {
00043   resultMedium = MediaLookupTable::ourMedia(env)->lookup(mediumName);
00044   if (resultMedium == NULL) {
00045     env.setResultMsg("Medium ", mediumName, " does not exist");
00046     return False;
00047   }
00048 
00049   return True;
00050 }

void Medium::close ( UsageEnvironment env,
char const *  mediumName 
) [static, inherited]

Definition at line 52 of file Media.cpp.

References env, MediaLookupTable::ourMedia(), and MediaLookupTable::remove().

Referenced by afterPlaying(), Medium::close(), closeMediaSinks(), OnDemandServerMediaSubsession::closeStreamSource(), continueAfterTEARDOWN(), WAVAudioFileSource::createNew(), QuickTimeFileSink::createNew(), QCELPAudioRTPSource::createNew(), MP3FileSource::createNew(), AVIFileSink::createNew(), AMRAudioRTPSource::createNew(), WAVAudioFileServerMediaSubsession::createNewStreamSource(), MPEG1or2DemuxedServerMediaSubsession::createNewStreamSource(), MediaSubsession::deInitiate(), ServerMediaSession::deleteAllSubsessions(), RTSPServerSupportingHTTPStreaming::RTSPClientConnectionSupportingHTTPStreaming::handleHTTPCmd_StreamingGET(), MediaSubsession::initiate(), MPEG1or2ProgramStreamFileDuration(), MPEG1or2Demux::noteElementaryStreamDeletion(), ByteStreamMultiFileSource::onSourceClosure1(), StreamState::reclaim(), RTSPServer::removeServerMediaSession(), ProxyServerMediaSession::resetDESCRIBEState(), OnDemandServerMediaSubsession::sdpLines(), shutdownStream(), subsessionAfterPlaying(), ClientTrickPlayState::updateStateOnScaleChange(), AMRDeinterleaver::~AMRDeinterleaver(), ByteStreamMultiFileSource::~ByteStreamMultiFileSource(), DarwinInjector::~DarwinInjector(), FramedFilter::~FramedFilter(), H264VideoRTPSink::~H264VideoRTPSink(), InputESSourceRecord::~InputESSourceRecord(), MatroskaFileParser::~MatroskaFileParser(), MatroskaFileServerDemux::~MatroskaFileServerDemux(), MPEG1or2Demux::~MPEG1or2Demux(), MPEG1or2FileServerDemux::~MPEG1or2FileServerDemux(), MPEG2TransportFileServerMediaSubsession::~MPEG2TransportFileServerMediaSubsession(), MPEG2TransportStreamFromPESSource::~MPEG2TransportStreamFromPESSource(), ProxyServerMediaSession::~ProxyServerMediaSession(), RTSPServerSupportingHTTPStreaming::RTSPClientConnectionSupportingHTTPStreaming::~RTSPClientConnectionSupportingHTTPStreaming(), ServerMediaSubsession::~ServerMediaSubsession(), StreamClientState::~StreamClientState(), StreamReplicator::~StreamReplicator(), and T140TextRTPSink::~T140TextRTPSink().

00052                                                           {
00053   MediaLookupTable::ourMedia(env)->remove(name);
00054 }

void Medium::close ( Medium medium  )  [static, inherited]

Definition at line 56 of file Media.cpp.

References Medium::close(), Medium::envir(), Medium::name(), and NULL.

00056                                  {
00057   if (medium == NULL) return;
00058 
00059   close(medium->envir(), medium->name());
00060 }

UsageEnvironment& Medium::envir (  )  const [inline, inherited]

Definition at line 59 of file Media.hh.

References Medium::fEnviron.

Referenced by QuickTimeFileSink::addArbitraryString(), FileSink::addData(), addStreamSocket(), MPEG2IFrameIndexFromTransportStream::addToTail(), StreamParser::afterGettingBytes1(), DummySink::afterGettingFrame(), TCPStreamSink::afterGettingFrame(), T140IdleFilter::afterGettingFrame(), FileSink::afterGettingFrame(), MultiFramedRTPSink::afterGettingFrame1(), InputESSourceRecord::afterGettingFrame1(), MPEG2TransportStreamFramer::afterGettingFrame1(), MPEG2IFrameIndexFromTransportStream::afterGettingFrame1(), H264VideoStreamDiscreteFramer::afterGettingFrame1(), BasicUDPSink::afterGettingFrame1(), MPEG4VideoFileServerMediaSubsession::afterPlayingDummy1(), H264VideoFileServerMediaSubsession::afterPlayingDummy1(), MPEG4VideoStreamParser::analyzeVOLHeader(), announceStream(), RTSPServer::RTSPClientConnection::changeClientInputSocket(), MPEG4VideoFileServerMediaSubsession::checkForAuxSDPLine1(), H264VideoFileServerMediaSubsession::checkForAuxSDPLine1(), Medium::close(), ProxyServerMediaSubsession::closeStreamSource(), MPEG2IFrameIndexFromTransportStream::compactParseBuffer(), RTSPClient::connectionHandler1(), RTSPClient::connectToServer(), ProxyServerMediaSession::continueAfterDESCRIBE(), ProxyRTSPClient::continueAfterLivenessCommand(), ProxyRTSPClient::continueAfterSETUP(), T140TextRTPSink::continuePlaying(), QuickTimeFileSink::continuePlaying(), H264VideoRTPSink::continuePlaying(), AVIFileSink::continuePlaying(), VP8VideoMatroskaFileServerMediaSubsession::createNewRTPSink(), VorbisAudioMatroskaFileServerMediaSubsession::createNewRTPSink(), T140TextMatroskaFileServerMediaSubsession::createNewRTPSink(), ProxyServerMediaSubsession::createNewRTPSink(), MPEG4VideoFileServerMediaSubsession::createNewRTPSink(), MPEG2TransportUDPServerMediaSubsession::createNewRTPSink(), MPEG2TransportFileServerMediaSubsession::createNewRTPSink(), MPEG1or2VideoFileServerMediaSubsession::createNewRTPSink(), MPEG1or2DemuxedServerMediaSubsession::createNewRTPSink(), MP3AudioFileServerMediaSubsession::createNewRTPSink(), H264VideoFileServerMediaSubsession::createNewRTPSink(), H263plusVideoFileServerMediaSubsession::createNewRTPSink(), DVVideoFileServerMediaSubsession::createNewRTPSink(), AMRAudioFileServerMediaSubsession::createNewRTPSink(), ADTSAudioFileServerMediaSubsession::createNewRTPSink(), AC3AudioMatroskaFileServerMediaSubsession::createNewRTPSink(), AC3AudioFileServerMediaSubsession::createNewRTPSink(), AACAudioMatroskaFileServerMediaSubsession::createNewRTPSink(), ProxyServerMediaSubsession::createNewStreamSource(), MPEG4VideoFileServerMediaSubsession::createNewStreamSource(), MPEG2TransportUDPServerMediaSubsession::createNewStreamSource(), MPEG2TransportFileServerMediaSubsession::createNewStreamSource(), MPEG1or2VideoFileServerMediaSubsession::createNewStreamSource(), MPEG1or2DemuxedServerMediaSubsession::createNewStreamSource(), MP3AudioFileServerMediaSubsession::createNewStreamSource(), H264VideoMatroskaFileServerMediaSubsession::createNewStreamSource(), H264VideoFileServerMediaSubsession::createNewStreamSource(), H263plusVideoFileServerMediaSubsession::createNewStreamSource(), DVVideoFileServerMediaSubsession::createNewStreamSource(), AMRAudioFileServerMediaSubsession::createNewStreamSource(), ADTSAudioFileServerMediaSubsession::createNewStreamSource(), AC3AudioFileServerMediaSubsession::createNewStreamSource(), AMRDeinterleavingBuffer::deliverIncomingFrame(), MPEG2IFrameIndexFromTransportStream::deliverIndexRecord(), SegmentQueue::dequeue(), DeviceSource::DeviceSource(), WAVAudioFileSource::doGetNextFrame(), T140IdleFilter::doGetNextFrame(), MPEG2TransportStreamMultiplexor::doGetNextFrame(), MPEG2IFrameIndexFromTransportStream::doGetNextFrame(), MP3FileSource::doGetNextFrame(), H264FUAFragmenter::doGetNextFrame(), ByteStreamMultiFileSource::doGetNextFrame(), ByteStreamFileSource::doGetNextFrame(), BasicUDPSource::doGetNextFrame(), AMRAudioFileSource::doGetNextFrame(), ADTSAudioFileSource::doGetNextFrame(), MultiFramedRTPSource::doGetNextFrame1(), MP3FileSource::doGetNextFrame1(), ADUFromMP3Source::doGetNextFrame1(), SIPClient::doInviteStateMachine(), WAVAudioFileSource::doReadFromFile(), ByteStreamFileSource::doReadFromFile(), MPEG1or2VideoRTPSink::doSpecialFrameHandling(), MP3ADURTPSink::doSpecialFrameHandling(), H263plusVideoRTPSink::doSpecialFrameHandling(), WAVAudioFileSource::doStopGettingFrames(), T140IdleFilter::doStopGettingFrames(), MultiFramedRTPSource::doStopGettingFrames(), FramedSource::doStopGettingFrames(), ByteStreamFileSource::doStopGettingFrames(), BasicUDPSource::doStopGettingFrames(), SegmentQueue::enqueueNewSegment(), StreamParser::ensureValidBytes1(), MediaSubsession::env(), SubsessionIOState::envir(), RTSPServer::RTSPClientSession::envir(), RTSPServer::RTSPClientConnection::envir(), RTPInterface::envir(), AVISubsessionIOState::envir(), ServerMediaSession::generateSDPDescription(), RTPSource::getAttributes(), MP3FileSource::getAttributes(), MP3ADUTranscoder::getAttributes(), MediaSource::getAttributes(), MPEG4VideoFileServerMediaSubsession::getAuxSDPLine(), H264VideoFileServerMediaSubsession::getAuxSDPLine(), getMPEG1or2TimeCode(), FramedSource::getNextFrame(), getOptions(), DVVideoStreamFramer::getProfile(), SIPClient::getResponse(), SIPClient::getResponseCode(), getSDPDescription(), OnDemandServerMediaSubsession::getStreamParameters(), RTSPClient::handleAlternativeRequestByte1(), RTSPClient::handleGET_PARAMETERResponse(), RTSPServerSupportingHTTPStreaming::RTSPClientConnectionSupportingHTTPStreaming::handleHTTPCmd_StreamingGET(), RTSPClient::handleIncomingRequest(), RTSPClient::handlePLAYResponse(), RTSPClient::handleRequestError(), RTSPClient::handleResponseBytes(), RTSPClient::handleSETUPResponse(), RTSPServer::incomingConnectionHandler(), RTSPClient::incomingDataHandler1(), incomingReportHandler1(), MP3FileSource::initializeStream(), MediaSession::initializeWithSDP(), MediaSession::initiateByMediaType(), SIPClient::invite1(), DynamicRTSPServer::lookupServerMediaSession(), MatroskaDemux::MatroskaDemux(), MatroskaFile::MatroskaFile(), MPEG4GenericRTPSource::MPEG4GenericRTPSource(), MultiFramedRTPSource::networkReadHandler1(), MatroskaDemux::newDemuxedTrack(), MPEG1or2FileServerDemux::newElementaryStream(), MPEG1or2Demux::newElementaryStream(), MPEG4GenericBufferedPacket::nextEnclosedFrameSize(), AMRBufferedPacket::nextEnclosedFrameSize(), T140IdleFilter::onSourceClosure(), RTSPClient::openConnection(), MPEG2TransportStreamIndexFile::openFid(), MPEG2IFrameIndexFromTransportStream::parseFrame(), AC3AudioStreamParser::parseFrame(), MPEGProgramStreamParser::parsePackHeader(), MPEGProgramStreamParser::parsePESPacket(), SIPClient::parseResponseCode(), MediaSession::parseSDPLine(), MPEG1or2VideoStreamParser::parseSlice(), MatroskaFileParser::parseStartOfFile(), MPEGProgramStreamParser::parseSystemHeader(), MPEG4VideoStreamParser::parseVideoObjectLayer(), MPEG4VideoStreamParser::parseVideoObjectPlane(), MPEG4VideoStreamParser::parseVisualObject(), TCPStreamSink::processBuffer(), SIPClient::processURL(), AC3AudioStreamParser::readAndSaveAFrame(), MPEG1or2Demux::registerReadInterest(), reschedule(), RTSPClient::resendCommand(), ProxyRTSPClient::reset(), RTSPClient::resetTCPSockets(), RTSPClient::responseHandlerForHTTP_GET1(), RTSPServer::rtspURLPrefix(), schedule(), ProxyRTSPClient::scheduleDESCRIBECommand(), ProxyRTSPClient::scheduleLivenessCommand(), OnDemandServerMediaSubsession::sdpLines(), SIPClient::sendACK(), SIPClient::sendBYE(), SIPClient::sendINVITE(), MultiFramedRTPSink::sendPacketIfNecessary(), SIPClient::sendRequest(), RTSPClient::sendRequest(), DarwinInjector::setDestination(), RTSPClient::setupHTTPTunneling1(), setupNextSubsession(), RTSPServer::setUpTunnelingOverHTTP(), QuickTimeFileSink::setWord(), AVIFileSink::setWord(), QuickTimeFileSink::setWord64(), shutdownStream(), SIPClient::SIPClient(), TCPStreamSink::socketWritableHandler1(), AMRAudioRTPSink::sourceIsCompatibleWithUs(), QuickTimeFileSink::startPlaying(), StreamState::startPlaying(), MediaSink::startPlaying(), AVIFileSink::startPlaying(), startPlayingSession(), PassiveServerMediaSubsession::startStream(), MediaSink::stopPlaying(), ProxyServerMediaSubsession::subsessionByeHandler(), tearDownSession(), SIPClient::timerAHandler(), SIPClient::timerBHandler(), SIPClient::timerDHandler(), ClientTrickPlayState::updateStateOnScaleChange(), MPEG2TransportStreamFramer::updateTSPacketDurationEstimate(), BasicUDPSource::~BasicUDPSource(), ByteStreamFileSource::~ByteStreamFileSource(), DeviceSource::~DeviceSource(), ProxyServerMediaSession::~ProxyServerMediaSession(), ProxyServerMediaSubsession::~ProxyServerMediaSubsession(), RTSPServer::~RTSPServer(), StreamClientState::~StreamClientState(), T140IdleFilter::~T140IdleFilter(), and WAVAudioFileSource::~WAVAudioFileSource().

00059 {return fEnviron;}

char const* Medium::name (  )  const [inline, inherited]

Definition at line 61 of file Media.hh.

References Medium::fMediumName.

Referenced by QuickTimeFileSink::addAtom_hdlr2(), Medium::close(), MP3ADUTranscoder::createNew(), MP3FromADUSource::createNew(), ADUFromMP3Source::createNew(), and MP3FileSource::initializeStream().

00061 {return fMediumName;}

Boolean Medium::isSource (  )  const [virtual, inherited]

Reimplemented in MediaSource.

Definition at line 62 of file Media.cpp.

References False.

Referenced by MediaSource::lookupByName().

00062                                {
00063   return False; // default implementation
00064 }

Boolean Medium::isSink (  )  const [virtual, inherited]

Reimplemented in MediaSink.

Definition at line 66 of file Media.cpp.

References False.

Referenced by MediaSink::lookupByName().

00066                              {
00067   return False; // default implementation
00068 }

Boolean Medium::isRTSPClient (  )  const [virtual, inherited]

Reimplemented in RTSPClient.

Definition at line 74 of file Media.cpp.

References False.

Referenced by RTSPClient::lookupByName().

00074                                    {
00075   return False; // default implementation
00076 }

Boolean Medium::isRTSPServer (  )  const [virtual, inherited]

Reimplemented in RTSPServer.

Definition at line 78 of file Media.cpp.

References False.

Referenced by RTSPServer::lookupByName().

00078                                    {
00079   return False; // default implementation
00080 }

Boolean Medium::isMediaSession (  )  const [virtual, inherited]

Reimplemented in MediaSession.

Definition at line 82 of file Media.cpp.

References False.

Referenced by MediaSession::lookupByName().

00082                                      {
00083   return False; // default implementation
00084 }

Boolean Medium::isServerMediaSession (  )  const [virtual, inherited]

Reimplemented in ServerMediaSession.

Definition at line 86 of file Media.cpp.

References False.

Referenced by ServerMediaSession::lookupByName().

00086                                            {
00087   return False; // default implementation
00088 }

Boolean Medium::isDarwinInjector (  )  const [virtual, inherited]

Reimplemented in DarwinInjector.

Definition at line 90 of file Media.cpp.

References False.

Referenced by DarwinInjector::lookupByName().

00090                                        {
00091   return False; // default implementation
00092 }

TaskToken& Medium::nextTask (  )  [inline, protected, inherited]

Definition at line 78 of file Media.hh.

References Medium::fNextTask.

Referenced by BasicUDPSink::afterGettingFrame1(), MPEG4VideoFileServerMediaSubsession::afterPlayingDummy1(), H264VideoFileServerMediaSubsession::afterPlayingDummy1(), MPEG4VideoFileServerMediaSubsession::checkForAuxSDPLine1(), H264VideoFileServerMediaSubsession::checkForAuxSDPLine1(), MP3FileSource::doGetNextFrame(), AMRAudioFileSource::doGetNextFrame(), ADTSAudioFileSource::doGetNextFrame(), MultiFramedRTPSource::doGetNextFrame1(), WAVAudioFileSource::doReadFromFile(), ByteStreamFileSource::doReadFromFile(), MultiFramedRTPSource::doStopGettingFrames(), FramedSource::doStopGettingFrames(), ByteStreamFileSource::doStopGettingFrames(), reschedule(), schedule(), MultiFramedRTPSink::sendPacketIfNecessary(), and MediaSink::stopPlaying().

00078                         {
00079         return fNextTask;
00080   }


Friends And Related Function Documentation

friend class MediaLookupTable [friend, inherited]

Definition at line 74 of file Media.hh.


Field Documentation

unsigned char* RTCPInstance::fInBuf [private]

Definition at line 133 of file RTCP.hh.

Referenced by incomingReportHandler1(), RTCPInstance(), and ~RTCPInstance().

unsigned RTCPInstance::fNumBytesAlreadyRead [private]

Definition at line 134 of file RTCP.hh.

Referenced by incomingReportHandler1(), and RTCPInstance().

OutPacketBuffer* RTCPInstance::fOutBuf [private]

Definition at line 135 of file RTCP.hh.

Referenced by addBYE(), addSDES(), addSR(), enqueueReportBlock(), RTCPInstance(), sendBuiltPacket(), and ~RTCPInstance().

RTPInterface RTCPInstance::fRTCPInterface [private]

Definition at line 136 of file RTCP.hh.

Referenced by addStreamSocket(), incomingReportHandler1(), removeStreamSocket(), RTCPgs(), RTCPInstance(), sendBuiltPacket(), setAuxilliaryReadHandler(), setStreamSocket(), and ~RTCPInstance().

unsigned RTCPInstance::fTotSessionBW [private]

Definition at line 137 of file RTCP.hh.

Referenced by onExpire1(), RTCPInstance(), and totSessionBW().

RTPSink* RTCPInstance::fSink [private]

Definition at line 138 of file RTCP.hh.

Referenced by addBYE(), addReport(), addSDES(), addSR(), incomingReportHandler1(), onExpire1(), and removeSSRC().

RTPSource const* RTCPInstance::fSource [private]

Definition at line 139 of file RTCP.hh.

Referenced by addBYE(), addReport(), addRR(), addSDES(), enqueueCommonReportSuffix(), incomingReportHandler1(), and removeSSRC().

Boolean RTCPInstance::fIsSSMSource [private]

Definition at line 140 of file RTCP.hh.

Referenced by incomingReportHandler1().

SDESItem RTCPInstance::fCNAME [private]

Definition at line 142 of file RTCP.hh.

Referenced by addSDES().

RTCPMemberDatabase* RTCPInstance::fKnownMembers [private]

Definition at line 143 of file RTCP.hh.

Referenced by checkNewSSRC(), numMembers(), removeSSRC(), RTCPInstance(), sendReport(), and ~RTCPInstance().

unsigned RTCPInstance::fOutgoingReportCount [private]

Definition at line 144 of file RTCP.hh.

Referenced by checkNewSSRC(), and sendReport().

double RTCPInstance::fAveRTCPSize [private]

Definition at line 146 of file RTCP.hh.

Referenced by onExpire1().

int RTCPInstance::fIsInitial [private]

Definition at line 147 of file RTCP.hh.

Referenced by onExpire1().

double RTCPInstance::fPrevReportTime [private]

Definition at line 148 of file RTCP.hh.

Referenced by onExpire1(), and RTCPInstance().

double RTCPInstance::fNextReportTime [private]

Definition at line 149 of file RTCP.hh.

Referenced by RTCPInstance(), and schedule().

int RTCPInstance::fPrevNumMembers [private]

Definition at line 150 of file RTCP.hh.

Referenced by onExpire1().

int RTCPInstance::fLastSentSize [private]

Definition at line 152 of file RTCP.hh.

Referenced by sendBuiltPacket(), and sentPacketSize().

int RTCPInstance::fLastReceivedSize [private]

Definition at line 153 of file RTCP.hh.

Referenced by receivedPacketSize().

u_int32_t RTCPInstance::fLastReceivedSSRC [private]

Definition at line 154 of file RTCP.hh.

Referenced by checkNewSSRC(), and removeLastReceivedSSRC().

int RTCPInstance::fTypeOfEvent [private]

Definition at line 155 of file RTCP.hh.

Referenced by RTCPInstance(), typeOfEvent(), and ~RTCPInstance().

int RTCPInstance::fTypeOfPacket [private]

Definition at line 156 of file RTCP.hh.

Referenced by packetType().

Boolean RTCPInstance::fHaveJustSentPacket [private]

Definition at line 157 of file RTCP.hh.

Referenced by incomingReportHandler1(), and sendBuiltPacket().

unsigned RTCPInstance::fLastPacketSentSize [private]

Definition at line 158 of file RTCP.hh.

Referenced by incomingReportHandler1(), and sendBuiltPacket().

TaskFunc* RTCPInstance::fByeHandlerTask [private]

Definition at line 160 of file RTCP.hh.

Referenced by incomingReportHandler1(), and setByeHandler().

void* RTCPInstance::fByeHandlerClientData [private]

Definition at line 161 of file RTCP.hh.

Referenced by incomingReportHandler1(), and setByeHandler().

Boolean RTCPInstance::fByeHandleActiveParticipantsOnly [private]

Definition at line 162 of file RTCP.hh.

Referenced by incomingReportHandler1(), and setByeHandler().

TaskFunc* RTCPInstance::fSRHandlerTask [private]

Definition at line 163 of file RTCP.hh.

Referenced by incomingReportHandler1(), and setSRHandler().

void* RTCPInstance::fSRHandlerClientData [private]

Definition at line 164 of file RTCP.hh.

Referenced by incomingReportHandler1(), and setSRHandler().

TaskFunc* RTCPInstance::fRRHandlerTask [private]

Definition at line 165 of file RTCP.hh.

Referenced by incomingReportHandler1(), and setRRHandler().

void* RTCPInstance::fRRHandlerClientData [private]

Definition at line 166 of file RTCP.hh.

Referenced by incomingReportHandler1(), and setRRHandler().

AddressPortLookupTable* RTCPInstance::fSpecificRRHandlerTable [private]

Definition at line 167 of file RTCP.hh.

Referenced by incomingReportHandler1(), setSpecificRRHandler(), unsetSpecificRRHandler(), and ~RTCPInstance().


The documentation for this class was generated from the following files:
Generated on Mon Apr 29 13:32:28 2013 for live by  doxygen 1.5.2