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


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 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 QuickTimeGenericRTPSource * | createNew (UsageEnvironment &env, Groupsock *RTPgs, unsigned char rtpPayloadFormat, unsigned rtpTimestampFrequency, char const *mimeTypeString) |
| 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) |
Data Fields | |
| QuickTimeGenericRTPSource::QTState | qtState |
Protected Member Functions | |
| virtual | ~QuickTimeGenericRTPSource () |
| 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 | |
| QuickTimeGenericRTPSource (UsageEnvironment &env, Groupsock *RTPgs, unsigned char rtpPayloadFormat, unsigned rtpTimestampFrequency, char const *mimeTypeString) | |
| virtual Boolean | processSpecialHeader (BufferedPacket *packet, unsigned &resultSpecialHeaderSize) |
| virtual char const * | MIMEtype () const |
Private Attributes | |
| char const * | fMIMEtypeString |
Data Structures | |
| struct | QTState |
Definition at line 29 of file QuickTimeGenericRTPSource.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.
| QuickTimeGenericRTPSource::~QuickTimeGenericRTPSource | ( | ) | [protected, virtual] |
Definition at line 75 of file QuickTimeGenericRTPSource.cpp.
References fMIMEtypeString, qtState, and QuickTimeGenericRTPSource::QTState::sdAtom.
00075 { 00076 delete[] qtState.sdAtom; 00077 delete[] (char*)fMIMEtypeString; 00078 }
| QuickTimeGenericRTPSource::QuickTimeGenericRTPSource | ( | UsageEnvironment & | env, | |
| Groupsock * | RTPgs, | |||
| unsigned char | rtpPayloadFormat, | |||
| unsigned | rtpTimestampFrequency, | |||
| char const * | mimeTypeString | |||
| ) | [private] |
Definition at line 61 of file QuickTimeGenericRTPSource.cpp.
References QuickTimeGenericRTPSource::QTState::height, NULL, QuickTimeGenericRTPSource::QTState::PCK, qtState, QuickTimeGenericRTPSource::QTState::sdAtom, QuickTimeGenericRTPSource::QTState::sdAtomSize, QuickTimeGenericRTPSource::QTState::timescale, and QuickTimeGenericRTPSource::QTState::width.
Referenced by createNew().
00065 : MultiFramedRTPSource(env, RTPgs, 00066 rtpPayloadFormat, rtpTimestampFrequency, 00067 new QTGenericBufferedPacketFactory), 00068 fMIMEtypeString(strDup(mimeTypeString)) { 00069 qtState.PCK = 0; 00070 qtState.timescale = 0; 00071 qtState.sdAtom = NULL; 00072 qtState.sdAtomSize = qtState.width = qtState.height = 0; 00073 }
| QuickTimeGenericRTPSource * QuickTimeGenericRTPSource::createNew | ( | UsageEnvironment & | env, | |
| Groupsock * | RTPgs, | |||
| unsigned char | rtpPayloadFormat, | |||
| unsigned | rtpTimestampFrequency, | |||
| char const * | mimeTypeString | |||
| ) | [static] |
Definition at line 50 of file QuickTimeGenericRTPSource.cpp.
References env, QuickTimeGenericRTPSource(), and RTPSource::RTPgs().
Referenced by MediaSubsession::initiate().
00054 { 00055 return new QuickTimeGenericRTPSource(env, RTPgs, rtpPayloadFormat, 00056 rtpTimestampFrequency, 00057 mimeTypeString); 00058 }
| Boolean QuickTimeGenericRTPSource::processSpecialHeader | ( | BufferedPacket * | packet, | |
| unsigned & | resultSpecialHeaderSize | |||
| ) | [private, virtual] |
Reimplemented from MultiFramedRTPSource.
Definition at line 81 of file QuickTimeGenericRTPSource.cpp.
References F, False, MultiFramedRTPSource::fCurrentPacketBeginsFrame, MultiFramedRTPSource::fCurrentPacketCompletesFrame, QuickTimeGenericRTPSource::QTState::height, QuickTimeGenericRTPSource::QTState::PCK, qtState, QuickTimeGenericRTPSource::QTState::sdAtom, QuickTimeGenericRTPSource::QTState::sdAtomSize, QuickTimeGenericRTPSource::QTState::timescale, True, and QuickTimeGenericRTPSource::QTState::width.
00082 { 00083 unsigned char* headerStart = packet->data(); 00084 unsigned packetSize = packet->dataSize(); 00085 00086 // The "QuickTime Header" must be at least 4 bytes in size: 00087 // Extract the known fields from the first 4 bytes: 00088 unsigned expectedHeaderSize = 4; 00089 if (packetSize < expectedHeaderSize) return False; 00090 00091 unsigned char VER = (headerStart[0]&0xF0)>>4; 00092 if (VER > 1) return False; // unknown header version 00093 qtState.PCK = (headerStart[0]&0x0C)>>2; 00094 #ifdef DEBUG 00095 Boolean S = (headerStart[0]&0x02) != 0; 00096 #endif 00097 Boolean Q = (headerStart[0]&0x01) != 0; 00098 00099 Boolean L = (headerStart[1]&0x80) != 0; 00100 00101 #ifdef DEBUG 00102 Boolean D = (headerStart[2]&0x80) != 0; 00103 unsigned short payloadId = ((headerStart[2]&0x7F)<<8)|headerStart[3]; 00104 #endif 00105 headerStart += 4; 00106 00107 #ifdef DEBUG 00108 fprintf(stderr, "PCK: %d, S: %d, Q: %d, L: %d, D: %d, payloadId: %d\n", qtState.PCK, S, Q, L, D, payloadId); 00109 #endif 00110 00111 if (Q) { // A "QuickTime Payload Description" follows 00112 expectedHeaderSize += 4; 00113 if (packetSize < expectedHeaderSize) return False; 00114 00115 #ifdef DEBUG 00116 Boolean K = (headerStart[0]&0x80) != 0; 00117 Boolean F = (headerStart[0]&0x40) != 0; 00118 Boolean A = (headerStart[0]&0x20) != 0; 00119 Boolean Z = (headerStart[0]&0x10) != 0; 00120 #endif 00121 unsigned payloadDescriptionLength = (headerStart[2]<<8)|headerStart[3]; 00122 headerStart += 4; 00123 00124 #ifdef DEBUG 00125 fprintf(stderr, "\tK: %d, F: %d, A: %d, Z: %d, payloadDescriptionLength: %d\n", K, F, A, Z, payloadDescriptionLength); 00126 #endif 00127 // Make sure "payloadDescriptionLength" is valid 00128 if (payloadDescriptionLength < 12) return False; 00129 expectedHeaderSize += (payloadDescriptionLength - 4); 00130 unsigned nonPaddedSize = expectedHeaderSize; 00131 expectedHeaderSize += 3; 00132 expectedHeaderSize -= expectedHeaderSize%4; // adds padding 00133 if (packetSize < expectedHeaderSize) return False; 00134 unsigned char padding = expectedHeaderSize - nonPaddedSize; 00135 00136 #ifdef DEBUG 00137 unsigned mediaType = (headerStart[0]<<24)|(headerStart[1]<<16) 00138 |(headerStart[2]<<8)|headerStart[3]; 00139 #endif 00140 qtState.timescale = (headerStart[4]<<24)|(headerStart[5]<<16) 00141 |(headerStart[6]<<8)|headerStart[7]; 00142 headerStart += 8; 00143 00144 payloadDescriptionLength -= 12; 00145 #ifdef DEBUG 00146 fprintf(stderr, "\tmediaType: '%c%c%c%c', timescale: %d, %d bytes of TLVs left\n", mediaType>>24, (mediaType&0xFF0000)>>16, (mediaType&0xFF00)>>8, mediaType&0xFF, qtState.timescale, payloadDescriptionLength); 00147 #endif 00148 00149 while (payloadDescriptionLength > 3) { 00150 unsigned short tlvLength = (headerStart[0]<<8)|headerStart[1]; 00151 unsigned short tlvType = (headerStart[2]<<8)|headerStart[3]; 00152 payloadDescriptionLength -= 4; 00153 if (tlvLength > payloadDescriptionLength) return False; // bad TLV 00154 headerStart += 4; 00155 #ifdef DEBUG 00156 fprintf(stderr, "\t\tTLV '%c%c', length %d, leaving %d remaining bytes\n", tlvType>>8, tlvType&0xFF, tlvLength, payloadDescriptionLength - tlvLength); 00157 for (int i = 0; i < tlvLength; ++i) fprintf(stderr, "%02x:", headerStart[i]); fprintf(stderr, "\n"); 00158 #endif 00159 00160 // Check for 'TLV's that we can use for our 'qtState' 00161 switch (tlvType) { 00162 case ('s'<<8|'d'): { // session description atom 00163 // Sanity check: the first 4 bytes of this must equal "tlvLength": 00164 unsigned atomLength = (headerStart[0]<<24)|(headerStart[1]<<16) 00165 |(headerStart[2]<<8)|(headerStart[3]); 00166 if (atomLength != (unsigned)tlvLength) break; 00167 00168 delete[] qtState.sdAtom; qtState.sdAtom = new char[tlvLength]; 00169 memmove(qtState.sdAtom, headerStart, tlvLength); 00170 qtState.sdAtomSize = tlvLength; 00171 break; 00172 } 00173 case ('t'<<8|'w'): { // track width 00174 qtState.width = (headerStart[0]<<8)|headerStart[1]; 00175 break; 00176 } 00177 case ('t'<<8|'h'): { // track height 00178 qtState.height = (headerStart[0]<<8)|headerStart[1]; 00179 break; 00180 } 00181 } 00182 00183 payloadDescriptionLength -= tlvLength; 00184 headerStart += tlvLength; 00185 } 00186 if (payloadDescriptionLength > 0) return False; // malformed TLV data 00187 headerStart += padding; 00188 } 00189 00190 if (L) { // Sample-Specific info follows 00191 expectedHeaderSize += 4; 00192 if (packetSize < expectedHeaderSize) return False; 00193 00194 unsigned ssInfoLength = (headerStart[2]<<8)|headerStart[3]; 00195 headerStart += 4; 00196 00197 #ifdef DEBUG 00198 fprintf(stderr, "\tssInfoLength: %d\n", ssInfoLength); 00199 #endif 00200 // Make sure "ssInfoLength" is valid 00201 if (ssInfoLength < 4) return False; 00202 expectedHeaderSize += (ssInfoLength - 4); 00203 unsigned nonPaddedSize = expectedHeaderSize; 00204 expectedHeaderSize += 3; 00205 expectedHeaderSize -= expectedHeaderSize%4; // adds padding 00206 if (packetSize < expectedHeaderSize) return False; 00207 unsigned char padding = expectedHeaderSize - nonPaddedSize; 00208 00209 ssInfoLength -= 4; 00210 while (ssInfoLength > 3) { 00211 unsigned short tlvLength = (headerStart[0]<<8)|headerStart[1]; 00212 #ifdef DEBUG 00213 unsigned short tlvType = (headerStart[2]<<8)|headerStart[3]; 00214 #endif 00215 ssInfoLength -= 4; 00216 if (tlvLength > ssInfoLength) return False; // bad TLV 00217 #ifdef DEBUG 00218 fprintf(stderr, "\t\tTLV '%c%c', length %d, leaving %d remaining bytes\n", tlvType>>8, tlvType&0xFF, tlvLength, ssInfoLength - tlvLength); 00219 for (int i = 0; i < tlvLength; ++i) fprintf(stderr, "%02x:", headerStart[4+i]); fprintf(stderr, "\n"); 00220 #endif 00221 ssInfoLength -= tlvLength; 00222 headerStart += 4 + tlvLength; 00223 } 00224 if (ssInfoLength > 0) return False; // malformed TLV data 00225 headerStart += padding; 00226 } 00227 00228 fCurrentPacketBeginsFrame = fCurrentPacketCompletesFrame; 00229 // whether the *previous* packet ended a frame 00230 fCurrentPacketCompletesFrame = packet->rtpMarkerBit(); 00231 00232 resultSpecialHeaderSize = expectedHeaderSize; 00233 #ifdef DEBUG 00234 fprintf(stderr, "Result special header size: %d\n", resultSpecialHeaderSize); 00235 #endif 00236 return True; 00237 }
| char const * QuickTimeGenericRTPSource::MIMEtype | ( | ) | const [private, virtual] |
Reimplemented from MediaSource.
Definition at line 239 of file QuickTimeGenericRTPSource.cpp.
References fMIMEtypeString, MediaSource::MIMEtype(), and NULL.
00239 { 00240 if (fMIMEtypeString == NULL) return MultiFramedRTPSource::MIMEtype(); 00241 00242 return fMIMEtypeString; 00243 }
| Boolean MultiFramedRTPSource::packetIsUsableInJitterCalculation | ( | unsigned char * | packet, | |
| unsigned | packetSize | |||
| ) | [protected, virtual, inherited] |
Reimplemented in MPEG1or2VideoRTPSource.
Definition at line 98 of file MultiFramedRTPSource.cpp.
References True.
Referenced by MultiFramedRTPSource::networkReadHandler().
00099 { 00100 // Default implementation: 00101 return True; 00102 }
| void MultiFramedRTPSource::doStopGettingFrames | ( | ) | [protected, virtual, inherited] |
Reimplemented from FramedSource.
Definition at line 104 of file MultiFramedRTPSource.cpp.
References MultiFramedRTPSource::fReorderingBuffer, RTPSource::fRTPInterface, MultiFramedRTPSource::reset(), ReorderingPacketBuffer::reset(), and RTPInterface::stopNetworkReading().
00104 { 00105 fRTPInterface.stopNetworkReading(); 00106 fReorderingBuffer->reset(); 00107 reset(); 00108 }
| 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(), MultiFramedRTPSource::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(), 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(), MultiFramedRTPSource::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(), MultiFramedRTPSource::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(), DummySink::continuePlaying(), HTTPSink::continuePlaying(), FileSink::continuePlaying(), AVIFileSink::continuePlaying(), BasicUDPSink::continuePlaying1(), EndianSwap16::doGetNextFrame(), HostFromNetworkOrder16::doGetNextFrame(), NetworkFromHostOrder16::doGetNextFrame(), PCMFromuLawAudioSource::doGetNextFrame(), uLawFromPCMAudioSource::doGetNextFrame(), QCELPDeinterleaver::doGetNextFrame(), MPEG4VideoStreamDiscreteFramer::doGetNextFrame(), MPEG2TransportStreamFramer::doGetNextFrame(), MPEG2IFrameIndexFromTransportStream::doGetNextFrame(), MPEG1or2VideoStreamDiscreteFramer::doGetNextFrame(), MP3ADUTranscoder::doGetNextFrame(), MP3ADUdeinterleaver::doGetNextFrame(), MP3ADUinterleaver::doGetNextFrame(), H264FUAFragmenter::doGetNextFrame(), ByteStreamMultiFileSource::doGetNextFrame(), AMRDeinterleaver::doGetNextFrame(), SegmentQueue::enqueueNewSegment(), StreamParser::ensureValidBytes1(), MultiFramedRTPSink::packFrame(), AC3AudioStreamParser::readAndSaveAFrame(), and MPEG2TransportStreamTrickModeFilter::readTransportPacket().
00061 { 00062 // Make sure we're not already being read: 00063 if (fIsCurrentlyAwaitingData) { 00064 envir() << "FramedSource[" << this << "]::getNextFrame(): attempting to read more than once at the same time!\n"; 00065 exit(1); 00066 } 00067 00068 fTo = to; 00069 fMaxSize = maxSize; 00070 fNumTruncatedBytes = 0; // by default; could be changed by doGetNextFrame() 00071 fDurationInMicroseconds = 0; // by default; could be changed by doGetNextFrame() 00072 fAfterGettingFunc = afterGettingFunc; 00073 fAfterGettingClientData = afterGettingClientData; 00074 fOnCloseFunc = onCloseFunc; 00075 fOnCloseClientData = onCloseClientData; 00076 fIsCurrentlyAwaitingData = True; 00077 00078 doGetNextFrame(); 00079 }
| void FramedSource::handleClosure | ( | void * | clientData | ) | [static, inherited] |
Definition at line 95 of file FramedSource.cpp.
References False, FramedSource::fIsCurrentlyAwaitingData, FramedSource::fOnCloseClientData, FramedSource::fOnCloseFunc, and NULL.
Referenced by MPEG2TransportStreamFramer::afterGettingFrame1(), MP3ADUTranscoder::afterGettingFrame1(), InputESSourceRecord::askForNewData(), MPEG2TransportStreamFromPESSource::awaitNewBuffer(), WAVAudioFileSource::doGetNextFrame(), EndianSwap16::doGetNextFrame(), HostFromNetworkOrder16::doGetNextFrame(), NetworkFromHostOrder16::doGetNextFrame(), PCMFromuLawAudioSource::doGetNextFrame(), uLawFromPCMAudioSource::doGetNextFrame(), QCELPDeinterleaver::doGetNextFrame(), MPEG4VideoStreamDiscreteFramer::doGetNextFrame(), MPEG2TransportStreamFramer::doGetNextFrame(), MPEG1or2VideoStreamDiscreteFramer::doGetNextFrame(), MPEG1or2DemuxedElementaryStream::doGetNextFrame(), MP3FileSource::doGetNextFrame(), MP3ADUTranscoder::doGetNextFrame(), MP3ADUdeinterleaver::doGetNextFrame(), MP3ADUinterleaver::doGetNextFrame(), ADUFromMP3Source::doGetNextFrame(), H264FUAFragmenter::doGetNextFrame(), DeviceSource::doGetNextFrame(), ByteStreamMultiFileSource::doGetNextFrame(), ByteStreamFileSource::doGetNextFrame(), AMRDeinterleaver::doGetNextFrame(), AMRAudioFileSource::doGetNextFrame(), ADTSAudioFileSource::doGetNextFrame(), ByteStreamFileSource::doReadFromFile(), SegmentQueue::enqueueNewSegment(), MPEG2IFrameIndexFromTransportStream::handleInputClosure1(), and MPEG2TransportStreamTrickModeFilter::onSourceClosure1().
00095 { 00096 FramedSource* source = (FramedSource*)clientData; 00097 source->fIsCurrentlyAwaitingData = False; // because we got a close instead 00098 if (source->fOnCloseFunc != NULL) { 00099 (*(source->fOnCloseFunc))(source->fOnCloseClientData); 00100 } 00101 }
| void FramedSource::stopGettingFrames | ( | ) | [inherited] |
Definition at line 103 of file FramedSource.cpp.
References FramedSource::doStopGettingFrames(), False, and FramedSource::fIsCurrentlyAwaitingData.
Referenced by MPEG2TransportStreamFromPESSource::doStopGettingFrames(), FramedFilter::doStopGettingFrames(), AMRDeinterleaver::doStopGettingFrames(), and MediaSink::stopPlaying().
00103 { 00104 fIsCurrentlyAwaitingData = False; // indicates that we can be read again 00105 00106 // Perform any specialized action now: 00107 doStopGettingFrames(); 00108 }
| unsigned FramedSource::maxFrameSize | ( | ) | const [virtual, inherited] |
Reimplemented in MPEG1or2DemuxedElementaryStream.
Definition at line 116 of file FramedSource.cpp.
Referenced by StreamParser::ensureValidBytes1().
| Boolean FramedSource::isCurrentlyAwaitingData | ( | ) | const [inline, inherited] |
Definition at line 60 of file FramedSource.hh.
References FramedSource::fIsCurrentlyAwaitingData.
Referenced by afterPlaying(), InputESSourceRecord::askForNewData(), MPEG2TransportStreamFromESSource::awaitNewBuffer(), QuickTimeFileSink::continuePlaying(), AVIFileSink::continuePlaying(), DeviceSource::deliverFrame(), QCELPDeinterleaver::doGetNextFrame(), AMRDeinterleaver::doGetNextFrame(), ByteStreamFileSource::fileReadableHandler(), and BasicUDPSource::incomingPacketHandler1().
00060 {return fIsCurrentlyAwaitingData;}
| void FramedSource::afterGetting | ( |