#include <MP3ADU.hh>
Inheritance diagram for ADUFromMP3Source:


Public Types | |
| typedef void( | afterGettingFunc )(void *clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds) |
| typedef void( | onCloseFunc )(void *clientData) |
Public Member Functions | |
| void | resetInput () |
| Boolean | setScaleFactor (int scale) |
| FramedSource * | inputSource () 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 | isRTPSource () 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 ADUFromMP3Source * | createNew (UsageEnvironment &env, FramedSource *inputSource, Boolean includeADUdescriptors=True) |
| 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 | |
| ADUFromMP3Source (UsageEnvironment &env, FramedSource *inputSource, Boolean includeADUdescriptors) | |
| virtual | ~ADUFromMP3Source () |
| virtual void | getAttributes () const |
| virtual void | doStopGettingFrames () |
| TaskToken & | nextTask () |
Static Protected Member Functions | |
| static void | afterGetting (FramedSource *source) |
Protected Attributes | |
| FramedSource * | fInputSource |
| unsigned char * | fTo |
| unsigned | fMaxSize |
| unsigned | fFrameSize |
| unsigned | fNumTruncatedBytes |
| timeval | fPresentationTime |
| unsigned | fDurationInMicroseconds |
Private Member Functions | |
| virtual void | doGetNextFrame () |
| virtual char const * | MIMEtype () const |
| Boolean | doGetNextFrame1 () |
Private Attributes | |
| Boolean | fAreEnqueueingMP3Frame |
| SegmentQueue * | fSegments |
| Boolean | fIncludeADUdescriptors |
| unsigned | fTotalDataSizeBeforePreviousRead |
| int | fScale |
| unsigned | fFrameCounter |
Definition at line 28 of file MP3ADU.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.
| ADUFromMP3Source::ADUFromMP3Source | ( | UsageEnvironment & | env, | |
| FramedSource * | inputSource, | |||
| Boolean | includeADUdescriptors | |||
| ) | [protected] |
Definition at line 111 of file MP3ADU.cpp.
Referenced by createNew().
00114 : FramedFilter(env, inputSource), 00115 fAreEnqueueingMP3Frame(False), 00116 fSegments(new SegmentQueue(True /* because we're MP3->ADU */, 00117 False /*no descriptors in incoming frames*/)), 00118 fIncludeADUdescriptors(includeADUdescriptors), 00119 fTotalDataSizeBeforePreviousRead(0), fScale(1), fFrameCounter(0) { 00120 }
| ADUFromMP3Source::~ADUFromMP3Source | ( | ) | [protected, virtual] |
Definition at line 122 of file MP3ADU.cpp.
References fSegments.
00122 { 00123 delete fSegments; 00124 }
| ADUFromMP3Source * ADUFromMP3Source::createNew | ( | UsageEnvironment & | env, | |
| FramedSource * | inputSource, | |||
| Boolean | includeADUdescriptors = True | |||
| ) | [static] |
Definition at line 131 of file MP3ADU.cpp.
References ADUFromMP3Source(), env, FramedFilter::inputSource(), MediaSource::MIMEtype(), Medium::name(), NULL, and UsageEnvironment::setResultMsg().
Referenced by MP3Transcoder::createNew(), and MP3AudioFileServerMediaSubsession::createNewStreamSource().
00133 { 00134 // The source must be a MPEG audio source: 00135 if (strcmp(inputSource->MIMEtype(), "audio/MPEG") != 0) { 00136 env.setResultMsg(inputSource->name(), " is not an MPEG audio source"); 00137 return NULL; 00138 } 00139 00140 return new ADUFromMP3Source(env, inputSource, includeADUdescriptors); 00141 }
| void ADUFromMP3Source::resetInput | ( | ) |
Definition at line 143 of file MP3ADU.cpp.
References fSegments, and SegmentQueue::reset().
Referenced by MP3AudioFileServerMediaSubsession::seekStreamSource().
| Boolean ADUFromMP3Source::setScaleFactor | ( | int | scale | ) |
| void ADUFromMP3Source::doGetNextFrame | ( | ) | [private, virtual] |
Implements FramedSource.
Definition at line 153 of file MP3ADU.cpp.
References doGetNextFrame1(), SegmentQueue::enqueueNewSegment(), False, fAreEnqueueingMP3Frame, FramedFilter::fInputSource, fSegments, fTotalDataSizeBeforePreviousRead, FramedSource::handleClosure(), SegmentQueue::totalDataSize(), and True.
Referenced by doGetNextFrame1().
00153 { 00154 if (!fAreEnqueueingMP3Frame) { 00155 // Arrange to enqueue a new MP3 frame: 00156 fTotalDataSizeBeforePreviousRead = fSegments->totalDataSize(); 00157 fAreEnqueueingMP3Frame = True; 00158 fSegments->enqueueNewSegment(fInputSource, this); 00159 } else { 00160 // Deliver an ADU from a previously-read MP3 frame: 00161 fAreEnqueueingMP3Frame = False; 00162 00163 if (!doGetNextFrame1()) { 00164 // An internal error occurred; act as if our source went away: 00165 FramedSource::handleClosure(this); 00166 } 00167 } 00168 }
| char const * ADUFromMP3Source::MIMEtype | ( | ) | const [private, virtual] |
| Boolean ADUFromMP3Source::doGetNextFrame1 | ( | ) | [private] |
Definition at line 170 of file MP3ADU.cpp.
References Segment::aduSize, FramedSource::afterGetting(), Segment::backpointer, ADUdescriptor::computeSize(), Segment::dataHere(), Segment::dataStart(), SegmentQueue::dequeue(), doGetNextFrame(), Segment::durationInMicroseconds, Medium::envir(), False, FramedSource::fDurationInMicroseconds, fFrameCounter, FramedSource::fFrameSize, fIncludeADUdescriptors, FramedSource::fMaxSize, FramedSource::fPresentationTime, fScale, fSegments, FramedSource::fTo, fTotalDataSizeBeforePreviousRead, ADUdescriptor::generateDescriptor(), Segment::headerSize, SegmentQueue::headIndex(), SegmentQueue::isEmpty(), SegmentQueue::nextFreeIndex(), SegmentQueue::nextIndex(), NULL, Segment::presentationTime, SegmentQueue::prevIndex(), SegmentQueue::s, Segment::sideInfoSize, and True.
Referenced by doGetNextFrame().
00170 { 00171 // First, check whether we have enough previously-read data to output an 00172 // ADU for the last-read MP3 frame: 00173 unsigned tailIndex; 00174 Segment* tailSeg; 00175 Boolean needMoreData; 00176 00177 if (fSegments->isEmpty()) { 00178 needMoreData = True; 00179 tailSeg = NULL; tailIndex = 0; // unneeded, but stops compiler warnings 00180 } else { 00181 tailIndex = SegmentQueue::prevIndex(fSegments->nextFreeIndex()); 00182 tailSeg = &(fSegments->s[tailIndex]); 00183 00184 needMoreData 00185 = fTotalDataSizeBeforePreviousRead < tailSeg->backpointer // bp points back too far 00186 || tailSeg->backpointer + tailSeg->dataHere() < tailSeg->aduSize; // not enough data 00187 } 00188 00189 if (needMoreData) { 00190 // We don't have enough data to output an ADU from the last-read MP3 00191 // frame, so need to read another one and try again: 00192 doGetNextFrame(); 00193 return True; 00194 } 00195 00196 // Output an ADU from the tail segment: 00197 fFrameSize = tailSeg->headerSize+tailSeg->sideInfoSize+tailSeg->aduSize; 00198 fPresentationTime = tailSeg->presentationTime; 00199 fDurationInMicroseconds = tailSeg->durationInMicroseconds; 00200 unsigned descriptorSize 00201 = fIncludeADUdescriptors ? ADUdescriptor::computeSize(fFrameSize) : 0; 00202 #ifdef DEBUG 00203 fprintf(stderr, "m->a:outputting ADU %d<-%d, nbr:%d, sis:%d, dh:%d, (descriptor size: %d)\n", tailSeg->aduSize, tailSeg->backpointer, fFrameSize, tailSeg->sideInfoSize, tailSeg->dataHere(), descriptorSize); 00204 #endif 00205 if (descriptorSize + fFrameSize > fMaxSize) { 00206 envir() << "ADUFromMP3Source::doGetNextFrame1(): not enough room (" 00207 << descriptorSize + fFrameSize << ">" 00208 << fMaxSize << ")\n"; 00209 fFrameSize = 0; 00210 return False; 00211 } 00212 00213 unsigned char* toPtr = fTo; 00214 // output the ADU descriptor: 00215 if (fIncludeADUdescriptors) { 00216 fFrameSize += ADUdescriptor::generateDescriptor(toPtr, fFrameSize); 00217 } 00218 00219 // output header and side info: 00220 memmove(toPtr, tailSeg->dataStart(), 00221 tailSeg->headerSize + tailSeg->sideInfoSize); 00222 toPtr += tailSeg->headerSize + tailSeg->sideInfoSize; 00223 00224 // go back to the frame that contains the start of our data: 00225 unsigned offset = 0; 00226 unsigned i = tailIndex; 00227 unsigned prevBytes = tailSeg->backpointer; 00228 while (prevBytes > 0) { 00229 i = SegmentQueue::prevIndex(i); 00230 unsigned dataHere = fSegments->s[i].dataHere(); 00231 if (dataHere < prevBytes) { 00232 prevBytes -= dataHere; 00233 } else { 00234 offset = dataHere - prevBytes; 00235 break; 00236 } 00237 } 00238 00239 // dequeue any segments that we no longer need: 00240 while (fSegments->headIndex() != i) { 00241 fSegments->dequeue(); // we're done with it 00242 } 00243 00244 unsigned bytesToUse = tailSeg->aduSize; 00245 while (bytesToUse > 0) { 00246 Segment& seg = fSegments->s[i]; 00247 unsigned char* fromPtr 00248 = &seg.dataStart()[seg.headerSize + seg.sideInfoSize + offset]; 00249 unsigned dataHere = seg.dataHere() - offset; 00250 unsigned bytesUsedHere = dataHere < bytesToUse ? dataHere : bytesToUse; 00251 memmove(toPtr, fromPtr, bytesUsedHere); 00252 bytesToUse -= bytesUsedHere; 00253 toPtr += bytesUsedHere; 00254 offset = 0; 00255 i = SegmentQueue::nextIndex(i); 00256 } 00257 00258 00259 if (fFrameCounter++%fScale == 0) { 00260 // Call our own 'after getting' function. Because we're not a 'leaf' 00261 // source, we can call this directly, without risking infinite recursion. 00262 afterGetting(this); 00263 } else { 00264 // Don't use this frame; get another one: 00265 doGetNextFrame(); 00266 } 00267 00268 return True; 00269 }
| FramedSource* FramedFilter::inputSource | ( | ) | const [inline, inherited] |
Definition at line 30 of file FramedFilter.hh.
References FramedFilter::fInputSource.
Referenced by AC3AudioStreamFramer::AC3AudioStreamFramer(), EndianSwap16::createNew(), HostFromNetworkOrder16::createNew(), NetworkFromHostOrder16::createNew(), PCMFromuLawAudioSource::createNew(), QCELPDeinterleaver::createNew(), MPEG4VideoStreamFramer::createNew(), MPEG4VideoStreamDiscreteFramer::createNew(), MPEG2IFrameIndexFromTransportStream::createNew(), MPEG1or2VideoStreamFramer::createNew(), MPEG1or2VideoStreamDiscreteFramer::createNew(), MPEG1or2AudioStreamFramer::createNew(), MP3Transcoder::createNew(), MP3ADUTranscoder::createNew(), MP3ADUdeinterleaver::createNew(), MP3ADUinterleaver::createNew(), MP3FromADUSource::createNew(), createNew(), H263plusVideoStreamFramer::createNew(), AC3AudioStreamFramer::createNew(), H264VideoRTPSink::doSpecialFrameHandling(), MP3ADUinterleaverBase::getInputSource(), H263plusVideoStreamFramer::H263plusVideoStreamFramer(), MPEG1or2VideoStreamFramer::MPEG1or2VideoStreamFramer(), MPEG4VideoStreamFramer::MPEG4VideoStreamFramer(), MP3AudioFileServerMediaSubsession::seekStreamSource(), ClientTrickPlayState::setSource(), and MP3AudioFileServerMediaSubsession::setStreamSourceScale().
00030 { return fInputSource; }
| void FramedFilter::getAttributes | ( | ) | const [protected, virtual, inherited] |
Reimplemented from MediaSource.
Reimplemented in MP3ADUTranscoder.
Definition at line 45 of file FramedFilter.cpp.
References FramedFilter::fInputSource, MediaSource::getAttributes(), and NULL.
00045 { 00046 if (fInputSource != NULL) fInputSource->getAttributes(); 00047 }
| void FramedFilter::doStopGettingFrames | ( | ) | [protected, virtual, inherited] |
Reimplemented from FramedSource.
Reimplemented in MPEG2TransportStreamFramer, and MPEG2TransportStreamTrickModeFilter.
Definition at line 49 of file FramedFilter.cpp.
References FramedFilter::fInputSource, NULL, and FramedSource::stopGettingFrames().
Referenced by MPEG2TransportStreamTrickModeFilter::doStopGettingFrames(), and MPEG2TransportStreamFramer::doStopGettingFrames().
00049 { 00050 if (fInputSource != NULL) fInputSource->stopGettingFrames(); 00051 }
| 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 }
| 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(), 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 | ( | FramedSource * | source | ) | [static, protected, inherited] |
Definition at line 81 of file FramedSource.cpp.
References FramedSource::fAfterGettingClientData, FramedSource::fAfterGettingFunc, False, FramedSource::fDurationInMicroseconds, FramedSource::fFrameSize, FramedSource::fIsCurrentlyAwaitingData, FramedSource::fNumTruncatedBytes, FramedSource::fPresentationTime, and NULL.
Referenced by ByteStreamMultiFileSource::afterGettingFrame(), EndianSwap16::afterGettingFrame1(), HostFromNetworkOrder16::afterGettingFrame1(), NetworkFromHostOrder16::afterGettingFrame1(), PCMFromuLawAudioSource::afterGettingFrame1(), uLawFromPCMAudioSource::afterGettingFrame1(), MPEG2TransportStreamFramer::afterGettingFrame1(), MPEG1or2DemuxedElementaryStream::afterGettingFrame1(), MP3ADUTranscoder::afterGettingFrame1(), MPEG2TransportStreamTrickModeFilter::attemptDeliveryToClient(), MPEGVideoStreamFramer::continueReadProcessing(), MPEG1or2AudioStreamFramer::continueReadProcessing(), H263plusVideoStreamFramer::continueReadProcessing(), DeviceSource::deliverFrame(), MPEG2IFrameIndexFromTransportStream::deliverIndexRecord(), WAVAudioFileSource::doGetNextFrame(), QCELPDeinterleaver::doGetNextFrame(), MPEG2TransportStreamTrickModeFilter::doGetNextFrame(), MPEG2TransportStreamMultiplexor::doGetNextFrame(), MP3FileSource::doGetNextFrame(), MP3ADUdeinterleaver::doGetNextFrame(), MP3ADUinterleaver::doGetNextFrame(), MP3FromADUSource::doGetNextFrame(), H264FUAFragmenter::doGetNextFrame(), AMRDeinterleaver::doGetNextFrame(), AMRAudioFileSource::doGetNextFrame(), ADTSAudioFileSource::doGetNextFrame(), MultiFramedRTPSource::doGetNextFrame1(), doGetNextFrame1(), ByteStreamFileSource::doReadFromFile(), BasicUDPSource::incomingPacketHandler1(), and AC3AudioStreamFramer::parseNextFrame().
00081 { 00082 source->fIsCurrentlyAwaitingData = False; 00083 // indicates that we can be read again 00084 // Note that this needs to be done here, in case the "fAfterFunc" 00085 // called below tries to read another frame (which it usually will) 00086 00087 if (source->fAfterGettingFunc != NULL) { 00088 (*(source->fAfterGettingFunc))(source->fAfterGettingClientData, 00089 source->fFrameSize, source->fNumTruncatedBytes, 00090 source->fPresentationTime, 00091 source->fDurationInMicroseconds); 00092 } 00093 }
| Boolean MediaSource::isRTPSource | ( | ) | const [virtual, inherited] |
Reimplemented in RTPSource.
Definition at line 43 of file MediaSource.cpp.
References False.
Referenced by RTPSource::lookupByName().
00043 { 00044 return False; // default implementation 00045 }
| Boolean MediaSource::isMPEG1or2VideoStreamFramer | ( | ) | const [virtual, inherited] |
Reimplemented in MPEG1or2VideoStreamFramer.
Definition at line 46 of file MediaSource.cpp.
References False.
Referenced by MPEG1or2VideoRTPSink::sourceIsCompatibleWithUs().
00046 { 00047 return False; // default implementation 00048 }
| Boolean MediaSource::isMPEG4VideoStreamFramer | ( | ) | const [virtual, inherited] |
Reimplemented in MPEG4VideoStreamFramer.
Definition at line 49 of file MediaSource.cpp.
References False.
Referenced by MPEG4ESVideoRTPSink::sourceIsCompatibleWithUs().
00049 { 00050 return False; // default implementation 00051 }
| Boolean MediaSource::isH264VideoStreamFramer | ( | ) | const [virtual, inherited] |
Reimplemented in H264VideoStreamFramer.
Definition at line 52 of file MediaSource.cpp.
References False.
Referenced by H264VideoRTPSink::sourceIsCompatibleWithUs().
00052 { 00053 return False; // default implementation 00054 }
| Boolean MediaSource::isJPEGVideoSource | ( | ) | const [virtual, inherited] |
Reimplemented in JPEGVideoSource.
Definition at line 55 of file MediaSource.cpp.
References False.
Referenced by JPEGVideoRTPSink::sourceIsCompatibleWithUs().
00055 { 00056 return False; // default implementation 00057 }
| Boolean MediaSource::isAMRAudioSource | ( | ) | const [virtual, inherited] |
Reimplemented in AMRAudioSource.
Definition at line 58 of file MediaSource.cpp.
References False.
Referenced by AMRAudioRTPSink::sourceIsCompatibleWithUs(), and AMRAudioFileSink::sourceIsCompatibleWithUs().
00058 { 00059 return False; // default implementation 00060 }
| void Medium::close | ( | UsageEnvironment & | env, | |
| char const * | mediumName | |||
| ) | [static, inherited] |
Definition at line 76 of file Media.cpp.
References env, MediaLookupTable::ourMedia(), and MediaLookupTable::remove().
Referenced by afterPlaying(), Medium::close(), closeMediaSinks(), OnDemandServerMediaSubsession::closeStreamSource(), WAVAudioFileSource::createNew(), QuickTimeFileSink::createNew(), QCELPAudioRTPSource::createNew(), MP3HTTPSource::createNew(), MP3FileSource::createNew(), AVIFileSink::createNew(), AMRAudioRTPSource::createNew(), WAVAudioFileServerMediaSubsession::createNewStreamSource(), MPEG1or2DemuxedServerMediaSubsession::createNewStreamSource(), MediaSubsession::deInitiate(), MediaSubsession::initiate(), MPEG1or2ProgramStreamFileDuration(), MPEG1or2Demux::noteElementaryStreamDeletion(), ByteStreamMultiFileSource::onSourceClosure1(), StreamState::reclaim(), RTSPServer::removeServerMediaSession(), OnDemandServerMediaSubsession::sdpLines(), shutdown(), H264VideoRTPSink::stopPlaying(), subsessionAfterPlaying(), ClientTrickPlayState::updateStateOnScaleChange(), AMRDeinterleaver::~AMRDeinterleaver(), ByteStreamMultiFileSource::~ByteStreamMultiFileSource(), DarwinInjector::~DarwinInjector(), FramedFilter::~FramedFilter(), H264VideoRTPSink::~H264VideoRTPSink(), InputESSourceRecord::~InputESSourceRecord(), MPEG1or2Demux::~MPEG1or2Demux(), MPEG1or2FileServerDemux::~MPEG1or2FileServerDemux(), MPEG2TransportFileServerMediaSubsession::~MPEG2TransportFileServerMediaSubsession(), MPEG2TransportStreamFromPESSource::~MPEG2TransportStreamFromPESSource(), ServerMediaSession::~ServerMediaSession(), and ServerMediaSubsession::~ServerMediaSubsession().
00076 { 00077 MediaLookupTable::ourMedia(env)->remove(name); 00078 }
| void Medium::close | ( | Medium * | medium | ) | [static, inherited] |
Definition at line 80 of file Media.cpp.
References Medium::close(), Medium::envir(), Medium::name(), and NULL.
00080 { 00081 if (medium == NULL) return; 00082 00083 close(medium->envir(), medium->name()); 00084 }
| UsageEnvironment& Medium::envir | ( | ) | const [inline, inherited] |
Definition at line 59 of file Media.hh.
References Medium::fEnviron.
Referenced by QuickTimeFileSink::addArbitraryString(), FileSink::addData(), MPEG2IFrameIndexFromTransportStream::addToTail(), StreamParser::afterGettingBytes(), MultiFramedRTPSink::afterGettingFrame1(), InputESSourceRecord::afterGettingFrame1(), MPEG2TransportStreamFramer::afterGettingFrame1(), MPEG2IFrameIndexFromTransportStream::afterGettingFrame1(), HTTPSink::afterGettingFrame1(), BasicUDPSink::afterGettingFrame1(), MPEG4VideoFileServerMediaSubsession::afterPlayingDummy1(), MPEG4VideoStreamParser::analyzeVOLHeader(), RTSPClient::announceSDPDescription(), announceStream(), MPEG4VideoFileServerMediaSubsession::checkForAuxSDPLine1(), Medium::close(), MPEG2IFrameIndexFromTransportStream::compactParseBuffer(), QuickTimeFileSink::continuePlaying(), HTTPSink::continuePlaying(), H264VideoRTPSink::continuePlaying(), AVIFileSink::continuePlaying(), MPEG4VideoFileServerMediaSubsession::createNewRTPSink(), MPEG2TransportFileServerMediaSubsession::createNewRTPSink(), MPEG1or2VideoFileServerMediaSubsession::createNewRTPSink(), MPEG1or2DemuxedServerMediaSubsession::createNewRTPSink(), H263plusVideoFileServerMediaSubsession::createNewRTPSink(), AMRAudioFileServerMediaSubsession::createNewRTPSink(), ADTSAudioFileServerMediaSubsession::createNewRTPSink(), MPEG4VideoFileServerMediaSubsession::createNewStreamSource(), MPEG2TransportFileServerMediaSubsession::createNewStreamSource(), MPEG1or2VideoFileServerMediaSubsession::createNewStreamSource(), MPEG1or2DemuxedServerMediaSubsession::createNewStreamSource(), H263plusVideoFileServerMediaSubsession::createNewStreamSource(), AMRAudioFileServerMediaSubsession::createNewStreamSource(), ADTSAudioFileServerMediaSubsession::createNewStreamSource(), MPEG2IFrameIndexFromTransportStream::deliverIndexRecord(), SegmentQueue::dequeue(), RTSPClient::describeURL(), WAVAudioFileSource::doGetNextFrame(), MPEG2IFrameIndexFromTransportStream::doGetNextFrame(), MP3FileSource::doGetNextFrame(), H264FUAFragmenter::doGetNextFrame(), ByteStreamMultiFileSource::doGetNextFrame(), ByteStreamFileSource::doGetNextFrame(), BasicUDPSource::doGetNextFrame(), AMRAudioFileSource::doGetNextFrame(), ADTSAudioFileSource::doGetNextFrame(), MultiFramedRTPSource::doGetNextFrame1(), MP3FileSource::doGetNextFrame1(), doGetNextFrame1(), SIPClient::doInviteStateMachine(), ByteStreamFileSource::doReadFromFile(), M