#include <MultiFramedRTPSource.hh>
Inheritance diagram for MultiFramedRTPSource:


Public Types | |
| typedef void( | afterGettingFunc )(void *clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds) |
| typedef void( | onCloseFunc )(void *clientData) |
Public Member Functions | |
| Boolean | curPacketMarkerBit () const |
| unsigned char | rtpPayloadFormat () const |
| virtual Boolean | hasBeenSynchronizedUsingRTCP () |
| Groupsock * | RTPgs () const |
| u_int32_t | SSRC () const |
| unsigned | timestampFrequency () const |
| RTPReceptionStatsDB & | receptionStatsDB () const |
| u_int32_t | lastReceivedSSRC () const |
| void | setStreamSocket (int sockNum, unsigned char streamChannelId) |
| void | setAuxilliaryReadHandler (AuxHandlerFunc *handlerFunc, void *handlerClientData) |
| u_int16_t | curPacketRTPSeqNum () const |
| u_int32_t | curPacketRTPTimestamp () const |
| void | getNextFrame (unsigned char *to, unsigned maxSize, afterGettingFunc *afterGettingFunc, void *afterGettingClientData, onCloseFunc *onCloseFunc, void *onCloseClientData) |
| void | stopGettingFrames () |
| virtual unsigned | maxFrameSize () const |
| Boolean | isCurrentlyAwaitingData () const |
| virtual char const * | MIMEtype () const |
| virtual Boolean | isMPEG1or2VideoStreamFramer () const |
| virtual Boolean | isMPEG4VideoStreamFramer () const |
| virtual Boolean | isH264VideoStreamFramer () const |
| virtual Boolean | isJPEGVideoSource () const |
| virtual Boolean | isAMRAudioSource () const |
| UsageEnvironment & | envir () const |
| char const * | name () const |
| virtual Boolean | isSink () const |
| virtual Boolean | isRTCPInstance () 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 Boolean | lookupByName (UsageEnvironment &env, char const *sourceName, RTPSource *&resultSource) |
| static Boolean | lookupByName (UsageEnvironment &env, char const *sourceName, FramedSource *&resultSource) |
| static Boolean | lookupByName (UsageEnvironment &env, char const *sourceName, MediaSource *&resultSource) |
| static Boolean | lookupByName (UsageEnvironment &env, char const *mediumName, Medium *&resultMedium) |
| static void | handleClosure (void *clientData) |
| static void | close (UsageEnvironment &env, char const *mediumName) |
| static void | close (Medium *medium) |
Protected Member Functions | |
| MultiFramedRTPSource (UsageEnvironment &env, Groupsock *RTPgs, unsigned char rtpPayloadFormat, unsigned rtpTimestampFrequency, BufferedPacketFactory *packetFactory=NULL) | |
| virtual | ~MultiFramedRTPSource () |
| virtual Boolean | processSpecialHeader (BufferedPacket *packet, unsigned &resultSpecialHeaderSize) |
| virtual Boolean | packetIsUsableInJitterCalculation (unsigned char *packet, unsigned packetSize) |
| virtual void | doStopGettingFrames () |
| TaskToken & | nextTask () |
Static Protected Member Functions | |
| static void | afterGetting (FramedSource *source) |
Protected Attributes | |
| Boolean | fCurrentPacketBeginsFrame |
| Boolean | fCurrentPacketCompletesFrame |
| RTPInterface | fRTPInterface |
| u_int16_t | fCurPacketRTPSeqNum |
| u_int32_t | fCurPacketRTPTimestamp |
| Boolean | fCurPacketMarkerBit |
| Boolean | fCurPacketHasBeenSynchronizedUsingRTCP |
| u_int32_t | fLastReceivedSSRC |
| unsigned char * | fTo |
| unsigned | fMaxSize |
| unsigned | fFrameSize |
| unsigned | fNumTruncatedBytes |
| timeval | fPresentationTime |
| unsigned | fDurationInMicroseconds |
Private Member Functions | |
| virtual void | doGetNextFrame () |
| virtual void | setPacketReorderingThresholdTime (unsigned uSeconds) |
| void | reset () |
| void | doGetNextFrame1 () |
Static Private Member Functions | |
| static void | networkReadHandler (MultiFramedRTPSource *source, int) |
Private Attributes | |
| Boolean | fAreDoingNetworkReads |
| Boolean | fNeedDelivery |
| Boolean | fPacketLossInFragmentedFrame |
| unsigned char * | fSavedTo |
| unsigned | fSavedMaxSize |
| ReorderingPacketBuffer * | fReorderingBuffer |
Friends | |
| void | networkReadHandler (MultiFramedRTPSource *, int) |
Definition at line 32 of file MultiFramedRTPSource.hh.
typedef void( FramedSource::afterGettingFunc)(void *clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds) [inherited] |
Definition at line 36 of file FramedSource.hh.
typedef void( FramedSource::onCloseFunc)(void *clientData) [inherited] |
Definition at line 40 of file FramedSource.hh.
| MultiFramedRTPSource::MultiFramedRTPSource | ( | UsageEnvironment & | env, | |
| Groupsock * | RTPgs, | |||
| unsigned char | rtpPayloadFormat, | |||
| unsigned | rtpTimestampFrequency, | |||
| BufferedPacketFactory * | packetFactory = NULL | |||
| ) | [protected] |
Definition at line 64 of file MultiFramedRTPSource.cpp.
References env, increaseReceiveBufferTo(), reset(), and Socket::socketNum().
00068 : RTPSource(env, RTPgs, rtpPayloadFormat, rtpTimestampFrequency) { 00069 reset(); 00070 fReorderingBuffer = new ReorderingPacketBuffer(packetFactory); 00071 00072 // Try to use a big receive buffer for RTP: 00073 increaseReceiveBufferTo(env, RTPgs->socketNum(), 50*1024); 00074 }
| MultiFramedRTPSource::~MultiFramedRTPSource | ( | ) | [protected, virtual] |
Definition at line 84 of file MultiFramedRTPSource.cpp.
References fReorderingBuffer, RTPSource::fRTPInterface, and RTPInterface::stopNetworkReading().
00084 { 00085 fRTPInterface.stopNetworkReading(); 00086 delete fReorderingBuffer; 00087 }
| Boolean MultiFramedRTPSource::processSpecialHeader | ( | BufferedPacket * | packet, | |
| unsigned & | resultSpecialHeaderSize | |||
| ) | [protected, virtual] |
Reimplemented in RawAMRRTPSource, AC3AudioRTPSource, H261VideoRTPSource, H263plusVideoRTPSource, H264VideoRTPSource, JPEGVideoRTPSource, MPEG1or2AudioRTPSource, MPEG1or2VideoRTPSource, MPEG4ESVideoRTPSource, MPEG4GenericRTPSource, MPEG4LATMAudioRTPSource, QuickTimeGenericRTPSource, SimpleRTPSource, and RawQCELPRTPSource.
Definition at line 90 of file MultiFramedRTPSource.cpp.
References True.
Referenced by doGetNextFrame1().
00091 { 00092 // Default implementation: Assume no special header: 00093 resultSpecialHeaderSize = 0; 00094 return True; 00095 }
| Boolean MultiFramedRTPSource::packetIsUsableInJitterCalculation | ( | unsigned char * | packet, | |
| unsigned | packetSize | |||
| ) | [protected, virtual] |
Reimplemented in MPEG1or2VideoRTPSource.
Definition at line 98 of file MultiFramedRTPSource.cpp.
References True.
Referenced by networkReadHandler().
00099 { 00100 // Default implementation: 00101 return True; 00102 }
| void MultiFramedRTPSource::doStopGettingFrames | ( | ) | [protected, virtual] |
Reimplemented from FramedSource.
Definition at line 104 of file MultiFramedRTPSource.cpp.
References fReorderingBuffer, RTPSource::fRTPInterface, reset(), ReorderingPacketBuffer::reset(), and RTPInterface::stopNetworkReading().
00104 { 00105 fRTPInterface.stopNetworkReading(); 00106 fReorderingBuffer->reset(); 00107 reset(); 00108 }
| void MultiFramedRTPSource::doGetNextFrame | ( | ) | [private, virtual] |
Implements FramedSource.
Definition at line 110 of file MultiFramedRTPSource.cpp.
References doGetNextFrame1(), fAreDoingNetworkReads, FramedSource::fFrameSize, FramedSource::fMaxSize, fNeedDelivery, RTPSource::fRTPInterface, fSavedMaxSize, fSavedTo, FramedSource::fTo, networkReadHandler(), RTPInterface::startNetworkReading(), and True.
00110 { 00111 if (!fAreDoingNetworkReads) { 00112 // Turn on background read handling of incoming packets: 00113 fAreDoingNetworkReads = True; 00114 TaskScheduler::BackgroundHandlerProc* handler 00115 = (TaskScheduler::BackgroundHandlerProc*)&networkReadHandler; 00116 fRTPInterface.startNetworkReading(handler); 00117 } 00118 00119 fSavedTo = fTo; 00120 fSavedMaxSize = fMaxSize; 00121 fFrameSize = 0; // for now 00122 fNeedDelivery = True; 00123 doGetNextFrame1(); 00124 }
| void MultiFramedRTPSource::setPacketReorderingThresholdTime | ( | unsigned | uSeconds | ) | [private, virtual] |
Implements RTPSource.
Definition at line 211 of file MultiFramedRTPSource.cpp.
References fReorderingBuffer, and ReorderingPacketBuffer::setThresholdTime().
Referenced by networkReadHandler().
00211 { 00212 fReorderingBuffer->setThresholdTime(uSeconds); 00213 }
| void MultiFramedRTPSource::reset | ( | ) | [private] |
Definition at line 76 of file MultiFramedRTPSource.cpp.
References False, fAreDoingNetworkReads, fCurrentPacketBeginsFrame, fCurrentPacketCompletesFrame, fNeedDelivery, fPacketLossInFragmentedFrame, and True.
Referenced by doStopGettingFrames().
00076 { 00077 fCurrentPacketBeginsFrame = True; // by default 00078 fCurrentPacketCompletesFrame = True; // by default 00079 fAreDoingNetworkReads = False; 00080 fNeedDelivery = False; 00081 fPacketLossInFragmentedFrame = False; 00082 }
| void MultiFramedRTPSource::doGetNextFrame1 | ( | ) | [private] |
Definition at line 126 of file MultiFramedRTPSource.cpp.
References FramedSource::afterGetting(), Medium::envir(), False, RTPSource::fCurPacketHasBeenSynchronizedUsingRTCP, RTPSource::fCurPacketMarkerBit, RTPSource::fCurPacketRTPSeqNum, RTPSource::fCurPacketRTPTimestamp, fCurrentPacketBeginsFrame, fCurrentPacketCompletesFrame, FramedSource::fFrameSize, FramedSource::fMaxSize, fNeedDelivery, FramedSource::fNumTruncatedBytes, fPacketLossInFragmentedFrame, FramedSource::fPresentationTime, frameSize, fReorderingBuffer, fSavedMaxSize, fSavedTo, FramedSource::fTo, ReorderingPacketBuffer::getNextCompletedPacket(), BufferedPacket::hasUsableData(), ReorderingPacketBuffer::isEmpty(), Medium::nextTask(), NULL, processSpecialHeader(), ReorderingPacketBuffer::releaseUsedPacket(), TaskScheduler::scheduleDelayedTask(), BufferedPacket::skip(), UsageEnvironment::taskScheduler(), True, BufferedPacket::use(), and BufferedPacket::useCount().
Referenced by doGetNextFrame(), and networkReadHandler().
00126 { 00127 while (fNeedDelivery) { 00128 // If we already have packet data available, then deliver it now. 00129 Boolean packetLossPrecededThis; 00130 BufferedPacket* nextPacket 00131 = fReorderingBuffer->getNextCompletedPacket(packetLossPrecededThis); 00132 if (nextPacket == NULL) break; 00133 00134 fNeedDelivery = False; 00135 00136 if (nextPacket->useCount() == 0) { 00137 // Before using the packet, check whether it has a special header 00138 // that needs to be processed: 00139 unsigned specialHeaderSize; 00140 if (!processSpecialHeader(nextPacket, specialHeaderSize)) { 00141 // Something's wrong with the header; reject the packet: 00142 fReorderingBuffer->releaseUsedPacket(nextPacket); 00143 fNeedDelivery = True; 00144 break; 00145 } 00146 nextPacket->skip(specialHeaderSize); 00147 } 00148 00149 // Check whether we're part of a multi-packet frame, and whether 00150 // there was packet loss that would render this packet unusable: 00151 if (fCurrentPacketBeginsFrame) { 00152 if (packetLossPrecededThis || fPacketLossInFragmentedFrame) { 00153 // We didn't get all of the previous frame. 00154 // Forget any data that we used from it: 00155 fTo = fSavedTo; fMaxSize = fSavedMaxSize; 00156 fFrameSize = 0; 00157 } 00158 fPacketLossInFragmentedFrame = False; 00159 } else if (packetLossPrecededThis) { 00160 // We're in a multi-packet frame, with preceding packet loss 00161 fPacketLossInFragmentedFrame = True; 00162 } 00163 if (fPacketLossInFragmentedFrame) { 00164 // This packet is unusable; reject it: 00165 fReorderingBuffer->releaseUsedPacket(nextPacket); 00166 fNeedDelivery = True; 00167 break; 00168 } 00169 00170 // The packet is usable. Deliver all or part of it to our caller: 00171 unsigned frameSize; 00172 nextPacket->use(fTo, fMaxSize, frameSize, fNumTruncatedBytes, 00173 fCurPacketRTPSeqNum, fCurPacketRTPTimestamp, 00174 fPresentationTime, fCurPacketHasBeenSynchronizedUsingRTCP, 00175 fCurPacketMarkerBit); 00176 fFrameSize += frameSize; 00177 00178 if (!nextPacket->hasUsableData()) { 00179 // We're completely done with this packet now 00180 fReorderingBuffer->releaseUsedPacket(nextPacket); 00181 } 00182 00183 if (fCurrentPacketCompletesFrame || fNumTruncatedBytes > 0) { 00184 // We have all the data that the client wants. 00185 if (fNumTruncatedBytes > 0) { 00186 envir() << "MultiFramedRTPSource::doGetNextFrame1(): The total received frame size exceeds the client's buffer size (" 00187 << fSavedMaxSize << "). " 00188 << fNumTruncatedBytes << " bytes of trailing data will be dropped!\n"; 00189 } 00190 // Call our own 'after getting' function, so that the downstream object can consume the data: 00191 if (fReorderingBuffer->isEmpty()) { 00192 // Common case optimization: There are no more queued incoming packets, so this code will not get 00193 // executed again without having first returned to the event loop. Call our 'after getting' function 00194 // directly, because there's no risk of a long chain of recursion (and thus stack overflow): 00195 afterGetting(this); 00196 } else { 00197 // Special case: Call our 'after getting' function via the event loop. 00198 nextTask() = envir().taskScheduler().scheduleDelayedTask(0, 00199 (TaskFunc*)FramedSource::afterGetting, this); 00200 } 00201 } else { 00202 // This packet contained fragmented data, and does not complete 00203 // the data that the client wants. Keep getting data: 00204 fTo += frameSize; fMaxSize -= frameSize; 00205 fNeedDelivery = True; 00206 } 00207 } 00208 }
| void MultiFramedRTPSource::networkReadHandler | ( | MultiFramedRTPSource * | source, | |
| int | ||||
| ) | [static, private] |
Definition at line 217 of file MultiFramedRTPSource.cpp.
References ADVANCE, BufferedPacket::assignMiscParams(), BufferedPacket::data(), BufferedPacket::dataSize(), doGetNextFrame1(), False, BufferedPacket::fillInData(), RTPSource::fLastReceivedSSRC, ReorderingPacketBuffer::freePacket(), fReorderingBuffer, RTPSource::fRTPInterface, ReorderingPacketBuffer::getFreePacket(), RTPReceptionStatsDB::noteIncomingPacket(), NULL, our_random(), packetIsUsableInJitterCalculation(), RTPSource::receptionStatsDB(), BufferedPacket::removePadding(), RTPSource::rtpPayloadFormat(), setPacketReorderingThresholdTime(), ReorderingPacketBuffer::storePacket(), RTPSource::timestampFrequency(), and True.
Referenced by doGetNextFrame().
00218 { 00219 // Get a free BufferedPacket descriptor to hold the new network packet: 00220 BufferedPacket* bPacket 00221 = source->fReorderingBuffer->getFreePacket(source); 00222 00223 // Read the network packet, and perform sanity checks on the RTP header: 00224 Boolean readSuccess = False; 00225 do { 00226 if (!bPacket->fillInData(source->fRTPInterface)) break; 00227 #ifdef TEST_LOSS 00228 source->setPacketReorderingThresholdTime(0); 00229 // don't wait for 'lost' packets to arrive out-of-order later 00230 if ((our_random()%10) == 0) break; // simulate 10% packet loss 00231 #endif 00232 00233 // Check for the 12-byte RTP header: 00234 if (bPacket->dataSize() < 12) break; 00235 unsigned rtpHdr = ntohl(*(unsigned*)(bPacket->data())); ADVANCE(4); 00236 Boolean rtpMarkerBit = (rtpHdr&0x00800000) >> 23; 00237 unsigned rtpTimestamp = ntohl(*(unsigned*)(bPacket->data()));ADVANCE(4); 00238 unsigned rtpSSRC = ntohl(*(unsigned*)(bPacket->data())); ADVANCE(4); 00239 00240 // Check the RTP version number (it should be 2): 00241 if ((rtpHdr&0xC0000000) != 0x80000000) break; 00242 00243 // Skip over any CSRC identifiers in the header: 00244 unsigned cc = (rtpHdr>>24)&0xF; 00245 if (bPacket->dataSize() < cc) break; 00246 ADVANCE(cc*4); 00247 00248 // Check for (& ignore) any RTP header extension 00249 if (rtpHdr&0x10000000) { 00250 if (bPacket->dataSize() < 4) break; 00251 unsigned extHdr = ntohl(*(unsigned*)(bPacket->data())); ADVANCE(4); 00252 unsigned remExtSize = 4*(extHdr&0xFFFF); 00253 if (bPacket->dataSize() < remExtSize) break; 00254 ADVANCE(remExtSize); 00255 } 00256 00257 // Discard any padding bytes: 00258 if (rtpHdr&0x20000000) { 00259 if (bPacket->dataSize() == 0) break; 00260 unsigned numPaddingBytes 00261 = (unsigned)(bPacket->data())[bPacket->dataSize()-1]; 00262 if (bPacket->dataSize() < numPaddingBytes) break; 00263 bPacket->removePadding(numPaddingBytes); 00264 } 00265 // Check the Payload Type. 00266 if ((unsigned char)((rtpHdr&0x007F0000)>>16) 00267 != source->rtpPayloadFormat()) { 00268 break; 00269 } 00270 00271 // The rest of the packet is the usable data. Record and save it: 00272 source->fLastReceivedSSRC = rtpSSRC; 00273 unsigned short rtpSeqNo = (unsigned short)(rtpHdr&0xFFFF); 00274 Boolean usableInJitterCalculation 00275 = source->packetIsUsableInJitterCalculation((bPacket->data()), 00276 bPacket->dataSize()); 00277 struct timeval presentationTime; // computed by: 00278 Boolean hasBeenSyncedUsingRTCP; // computed by: 00279 source->receptionStatsDB() 00280 .noteIncomingPacket(rtpSSRC, rtpSeqNo, rtpTimestamp, 00281 source->timestampFrequency(), 00282 usableInJitterCalculation, presentationTime, 00283 hasBeenSyncedUsingRTCP, bPacket->dataSize()); 00284 00285 // Fill in the rest of the packet descriptor, and store it: 00286 struct timeval timeNow; 00287 gettimeofday(&timeNow, NULL); 00288 bPacket->assignMiscParams(rtpSeqNo, rtpTimestamp, presentationTime, 00289 hasBeenSyncedUsingRTCP, rtpMarkerBit, 00290 timeNow); 00291 if (!source->fReorderingBuffer->storePacket(bPacket)) break; 00292 00293 readSuccess = True; 00294 } while (0); 00295 if (!readSuccess) source->fReorderingBuffer->freePacket(bPacket); 00296 00297 source->doGetNextFrame1(); 00298 // If we didn't get proper data this time, we'll get another chance 00299 }
| Boolean RTPSource::lookupByName | ( | UsageEnvironment & | env, | |
| char const * | sourceName, | |||
| RTPSource *& | resultSource | |||
| ) | [static, inherited] |
Definition at line 26 of file RTPSource.cpp.
References env, False, MediaSource::isRTPSource(), MediaSource::lookupByName(), NULL, and True.
00028 { 00029 resultSource = NULL; // unless we succeed 00030 00031 MediaSource* source; 00032 if (!MediaSource::lookupByName(env, sourceName, source)) return False; 00033 00034 if (!source->isRTPSource()) { 00035 env.setResultMsg(sourceName, " is not a RTP source"); 00036 return False; 00037 } 00038 00039 resultSource = (RTPSource*)source; 00040 return True; 00041 }
| Boolean FramedSource::lookupByName | ( | UsageEnvironment & | env, | |
| char const * | sourceName, | |||
| FramedSource *& | resultSource | |||
| ) | [static, inherited] |
Definition at line 41 of file FramedSource.cpp.
References env, False, MediaSource::isFramedSource(), MediaSource::lookupByName(), NULL, and True.
Referenced by MP3ADUinterleaverBase::getInputSource().
00042 { 00043 resultSource = NULL; // unless we succeed 00044 00045 MediaSource* source; 00046 if (!MediaSource::lookupByName(env, sourceName, source)) return False; 00047 00048 if (!source->isFramedSource()) { 00049 env.setResultMsg(sourceName, " is not a framed source"); 00050 return False; 00051 } 00052 00053 resultSource = (FramedSource*)source; 00054 return True; 00055 }
| Boolean MediaSource::lookupByName | ( | UsageEnvironment & | env, | |
| char const * | sourceName, | |||
| MediaSource *& | resultSource | |||
| ) | [static, inherited] |
Definition at line 62 of file MediaSource.cpp.
References env, False, Medium::isSource(), Medium::lookupByName(), NULL, and True.
Referenced by RTPSource::lookupByName(), and FramedSource::lookupByName().
00064 { 00065 resultSource = NULL; // unless we succeed 00066 00067 Medium* medium; 00068 if (!Medium::lookupByName(env, sourceName, medium)) return False; 00069 00070 if (!medium->isSource()) { 00071 env.setResultMsg(sourceName, " is not a media source"); 00072 return False; 00073 } 00074 00075 resultSource = (MediaSource*)medium; 00076 return True; 00077 }
| Boolean Medium::lookupByName | ( | UsageEnvironment & | env, | |
| char const * | mediumName, | |||
| Medium *& | resultMedium | |||
| ) | [static, inherited] |
Definition at line 65 of file Media.cpp.
References env, False, MediaLookupTable::lookup(), NULL, MediaLookupTable::ourMedia(), UsageEnvironment::setResultMsg(), and True.
Referenced by ServerMediaSession::lookupByName(), RTSPServer::lookupByName(), RTSPClient::lookupByName(), RTCPInstance::lookupByName(), MediaSource::lookupByName(), MediaSink::lookupByName(), MediaSession::lookupByName(), and DarwinInjector::lookupByName().
00066 { 00067 resultMedium = MediaLookupTable::ourMedia(env)->lookup(mediumName); 00068 if (resultMedium == NULL) { 00069 env.setResultMsg("Medium ", mediumName, " does not exist"); 00070 return False; 00071 } 00072 00073 return True; 00074 }
| Boolean RTPSource::curPacketMarkerBit | ( | ) | const [inline, inherited] |
Definition at line 38 of file RTPSource.hh.
References RTPSource::fCurPacketMarkerBit.
Referenced by SubsessionIOState::useFrameForHinting().
00038 { return fCurPacketMarkerBit; }
| unsigned char RTPSource::rtpPayloadFormat | ( | ) | const [inline, inherited] |
Definition at line 40 of file RTPSource.hh.
References RTPSource::fRTPPayloadFormat.
Referenced by QuickTimeFileSink::addAtom_hdlr2(), networkReadHandler(), and SubsessionIOState::useFrameForHinting().
00040 { return fRTPPayloadFormat; }
| Boolean RTPSource::hasBeenSynchronizedUsingRTCP | ( | ) | [virtual, inherited] |
Reimplemented in RawAMRRTPSource, and RawQCELPRTPSource.
Definition at line 43 of file RTPSource.cpp.
References RTPSource::fCurPacketHasBeenSynchronizedUsingRTCP.
Referenced by checkForPacketArrival(), RawQCELPRTPSource::processSpecialHeader(), RawAMRRTPSource::processSpecialHeader(), SubsessionIOState::syncOK(), and SubsessionIOState::useFrame().
00043 { 00044 return fCurPacketHasBeenSynchronizedUsingRTCP; 00045 }
| Groupsock* RTPSource::RTPgs | ( | ) | const [inline, inherited] |
Definition at line 44 of file RTPSource.hh.
References RTPSource::fRTPInterface, and RTPInterface::gs().
Referenced by SimpleRTPSource::createNew(), QuickTimeGenericRTPSource::createNew(), RawQCELPRTPSource::createNew(), MPEG4LATMAudioRTPSource::createNew(), MPEG4GenericRTPSource::createNew(), MPEG4ESVideoRTPSource::createNew(), MPEG1or2VideoRTPSource::createNew(), MPEG1or2AudioRTPSource::createNew(), MP3ADURTPSource::createNew(), JPEGVideoRTPSource::createNew(), H264VideoRTPSource::createNew(), H263plusVideoRTPSource::createNew(), H261VideoRTPSource::createNew(), RawAMRRTPSource::createNew(), AC3AudioRTPSource::createNew(), and main().
00044 { return fRTPInterface.gs(); }
| u_int32_t RTPSource::SSRC | ( | ) | const [inline, inherited] |
Definition at line 49 of file RTPSource.hh.
References RTPSource::fSSRC.
Referenced by RTCPInstance::addBYE(), RTCPInstance::addRR(), and RTCPInstance::addSDES().
00049 { return fSSRC; }
| unsigned RTPSource::timestampFrequency | ( | ) | const [inline, inherited] |
Definition at line 53 of file RTPSource.hh.
References RTPSource::fTimestampFrequency.
Referenced by QuickTimeFileSink::addAtom_hdlr2(), networkReadHandler(), and RTPReceptionStats::noteIncomingPacket().
00053 {return fTimestampFrequency;}
| RTPReceptionStatsDB& RTPSource::receptionStatsDB | ( | ) | const [inline, inherited] |
Definition at line 55 of file RTPSource.hh.
References RTPSource::fReceptionStatsDB.
Referenced by checkForPacketArrival(), checkInterPacketGaps(), RTCPInstance::enqueueCommonReportSuffix(), RTCPInstance::incomingReportHandler1(), networkReadHandler(), printQOSData(), qosMeasurementRecord::qosMeasurementRecord(), and RTCPInstance::removeSSRC().
00055 { 00056 return *fReceptionStatsDB; 00057 }
| u_int32_t RTPSource::lastReceivedSSRC | ( | ) | const [inline, inherited] |
Definition at line 59 of file RTPSource.hh.
References RTPSource::fLastReceivedSSRC.
00059 { return fLastReceivedSSRC; }
| void RTPSource::setStreamSocket | ( | int | sockNum, | |
| unsigned char | streamChannelId | |||
| ) | [inline, inherited] |
Definition at line 62 of file RTPSource.hh.
References RTPSource::fRTPInterface, and RTPInterface::setStreamSocket().
Referenced by RTSPClient::setupMediaSubsession().
00062 { 00063 // hack to allow sending RTP over TCP (RFC 2236, section 10.12) 00064 fRTPInterface.setStreamSocket(sockNum, streamChannelId); 00065 }
| void RTPSource::setAuxilliaryReadHandler | ( | AuxHandlerFunc * | handlerFunc, | |
| void * | handlerClientData | |||
| ) | [inline, inherited] |
Definition at line 67 of file RTPSource.hh.
References RTPSource::fRTPInterface, and RTPInterface::setAuxilliaryReadHandler().
00068 { 00069 fRTPInterface.setAuxilliaryReadHandler(handlerFunc, 00070 handlerClientData); 00071 }
| u_int16_t RTPSource::curPacketRTPSeqNum | ( | ) | const [inline, inherited] |
Definition at line 76 of file RTPSource.hh.
References RTPSource::fCurPacketRTPSeqNum.
Referenced by SubsessionIOState::afterGettingFrame(), AVISubsessionIOState::afterGettingFrame(), QCELPDeinterleaver::afterGettingFrame1(), and AMRDeinterleavingBuffer::deliverIncomingFrame().
00076 { return fCurPacketRTPSeqNum; }
| u_int32_t RTPSource::curPacketRTPTimestamp | ( | ) | const [inline, inherited] |
Definition at line 77 of file RTPSource.hh.
References RTPSource::fCurPacketRTPTimestamp.
Referenced by MediaSubsession::getNormalPlayTime().
00077 { return fCurPacketRTPTimestamp; }
| void FramedSource::getNextFrame | ( | unsigned char * | to, | |
| unsigned | maxSize, | |||
| afterGettingFunc * | afterGettingFunc, | |||
| void * | afterGettingClientData, | |||
| onCloseFunc * | onCloseFunc, | |||
| void * | onCloseClientData | |||
| ) | [inherited] |
Definition at line 57 of file FramedSource.cpp.
References FramedSource::doGetNextFrame(), Medium::envir(), FramedSource::fAfterGettingClientData, FramedSource::fAfterGettingFunc, FramedSource::fDurationInMicroseconds, FramedSource::fIsCurrentlyAwaitingData, FramedSource::fMaxSize, FramedSource::fNumTruncatedBytes, FramedSource::fOnCloseClientData, FramedSource::fOnCloseFunc, FramedSource::fTo, and True.
Referenced by MPEG2TransportStreamFramer::afterGettingFrame1(), InputESSourceRecord::askForNewData(), MPEG2TransportStreamFromPESSource::awaitNewBuffer(), QuickTimeFileSink::continuePlaying(),