MP3AudioFileServerMediaSubsession Class Reference

#include <MP3AudioFileServerMediaSubsession.hh>

Inheritance diagram for MP3AudioFileServerMediaSubsession:

Inheritance graph
[legend]
Collaboration diagram for MP3AudioFileServerMediaSubsession:

Collaboration graph
[legend]

Public Member Functions

void multiplexRTCPWithRTP ()
unsigned trackNumber () const
char const * trackId ()
virtual void getAbsoluteTimeRange (char *&absStartTime, char *&absEndTime) const
void setServerAddressAndPortForSDP (netAddressBits addressBits, portNumBits portBits)
UsageEnvironmentenvir () const
char const * name () const
virtual Boolean isSource () 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 MP3AudioFileServerMediaSubsessioncreateNew (UsageEnvironment &env, char const *fileName, Boolean reuseFirstSource, Boolean generateADUs, Interleaving *interleaving)
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

 MP3AudioFileServerMediaSubsession (UsageEnvironment &env, char const *fileName, Boolean reuseFirstSource, Boolean generateADUs, Interleaving *interleaving)
virtual ~MP3AudioFileServerMediaSubsession ()
FramedSourcecreateNewStreamSourceCommon (FramedSource *baseMP3Source, unsigned mp3NumBytes, unsigned &estBitrate)
void getBaseStreams (FramedSource *frontStream, FramedSource *&sourceMP3Stream, ADUFromMP3Source *&aduStream)
virtual void seekStreamSource (FramedSource *inputSource, double &seekNPT, double streamDuration, u_int64_t &numBytes)
virtual void setStreamSourceScale (FramedSource *inputSource, float scale)
virtual FramedSourcecreateNewStreamSource (unsigned clientSessionId, unsigned &estBitrate)
virtual RTPSinkcreateNewRTPSink (Groupsock *rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource *inputSource)
virtual void testScaleFactor (float &scale)
virtual float duration () const
virtual char const * sdpLines ()
virtual void getStreamParameters (unsigned clientSessionId, netAddressBits clientAddress, Port const &clientRTPPort, Port const &clientRTCPPort, int tcpSocketNum, unsigned char rtpChannelId, unsigned char rtcpChannelId, netAddressBits &destinationAddress, u_int8_t &destinationTTL, Boolean &isMulticast, Port &serverRTPPort, Port &serverRTCPPort, void *&streamToken)
virtual void startStream (unsigned clientSessionId, void *streamToken, TaskFunc *rtcpRRHandler, void *rtcpRRHandlerClientData, unsigned short &rtpSeqNum, unsigned &rtpTimestamp, ServerRequestAlternativeByteHandler *serverRequestAlternativeByteHandler, void *serverRequestAlternativeByteHandlerClientData)
virtual void pauseStream (unsigned clientSessionId, void *streamToken)
virtual void seekStream (unsigned clientSessionId, void *streamToken, double &seekNPT, double streamDuration, u_int64_t &numBytes)
virtual void seekStream (unsigned clientSessionId, void *streamToken, char *&absStart, char *&absEnd)
virtual void nullSeekStream (unsigned clientSessionId, void *streamToken, double streamEndTime, u_int64_t &numBytes)
virtual void setStreamScale (unsigned clientSessionId, void *streamToken, float scale)
virtual float getCurrentNPT (void *streamToken)
virtual FramedSourcegetStreamSource (void *streamToken)
virtual void deleteStream (unsigned clientSessionId, void *&streamToken)
virtual char const * getAuxSDPLine (RTPSink *rtpSink, FramedSource *inputSource)
virtual void seekStreamSource (FramedSource *inputSource, char *&absStart, char *&absEnd)
virtual void setStreamSourceDuration (FramedSource *inputSource, double streamDuration, u_int64_t &numBytes)
virtual void closeStreamSource (FramedSource *inputSource)
char const * rangeSDPLine () const
TaskTokennextTask ()

Protected Attributes

Boolean fGenerateADUs
InterleavingfInterleaving
float fFileDuration
char const * fFileName
u_int64_t fFileSize
char * fSDPLines
HashTablefDestinationsHashTable
ServerMediaSessionfParentSession
netAddressBits fServerAddressForSDP
portNumBits fPortNumForSDP

Friends

class MediaLookupTable

Detailed Description

Definition at line 36 of file MP3AudioFileServerMediaSubsession.hh.


Constructor & Destructor Documentation

MP3AudioFileServerMediaSubsession::MP3AudioFileServerMediaSubsession ( UsageEnvironment env,
char const *  fileName,
Boolean  reuseFirstSource,
Boolean  generateADUs,
Interleaving interleaving 
) [protected]

Definition at line 37 of file MP3AudioFileServerMediaSubsession.cpp.

00041   : FileServerMediaSubsession(env, fileName, reuseFirstSource),
00042     fGenerateADUs(generateADUs), fInterleaving(interleaving), fFileDuration(0.0) {
00043 }

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

Definition at line 46 of file MP3AudioFileServerMediaSubsession.cpp.

00046                                      {
00047   delete fInterleaving;
00048 }


Member Function Documentation

MP3AudioFileServerMediaSubsession * MP3AudioFileServerMediaSubsession::createNew ( UsageEnvironment env,
char const *  fileName,
Boolean  reuseFirstSource,
Boolean  generateADUs,
Interleaving interleaving 
) [static]

Definition at line 30 of file MP3AudioFileServerMediaSubsession.cpp.

References env.

Referenced by createNewSMS().

00031                                                               {
00032   return new MP3AudioFileServerMediaSubsession(env, fileName, reuseFirstSource,
00033                                                generateADUs, interleaving);
00034 }

FramedSource * MP3AudioFileServerMediaSubsession::createNewStreamSourceCommon ( FramedSource baseMP3Source,
unsigned  mp3NumBytes,
unsigned &  estBitrate 
) [protected]

Definition at line 51 of file MP3AudioFileServerMediaSubsession.cpp.

References MP3FromADUSource::createNew(), MP3ADUinterleaver::createNew(), ADUFromMP3Source::createNew(), and NULL.

Referenced by MP3AudioMatroskaFileServerMediaSubsession::createNewStreamSource(), and createNewStreamSource().

00051                                                                                                      {
00052   FramedSource* streamSource;
00053   do {
00054     streamSource = baseMP3Source; // by default
00055     if (streamSource == NULL) break;
00056 
00057     // Use the MP3 file size, plus the duration, to estimate the stream's bitrate:
00058     if (mp3NumBytes > 0 && fFileDuration > 0.0) {
00059       estBitrate = (unsigned)(mp3NumBytes/(125*fFileDuration) + 0.5); // kbps, rounded
00060     } else {
00061       estBitrate = 128; // kbps, estimate
00062     }
00063 
00064     if (fGenerateADUs) {
00065       // Add a filter that converts the source MP3s to ADUs:
00066       streamSource = ADUFromMP3Source::createNew(envir(), streamSource);
00067       if (streamSource == NULL) break;
00068 
00069       if (fInterleaving != NULL) {
00070         // Add another filter that interleaves the ADUs before packetizing:
00071         streamSource = MP3ADUinterleaver::createNew(envir(), *fInterleaving,
00072                                                     streamSource);
00073         if (streamSource == NULL) break;
00074       }
00075     } else if (fFileDuration > 0.0) {
00076       // Because this is a seekable file, insert a pair of filters: one that
00077       // converts the input MP3 stream to ADUs; another that converts these
00078       // ADUs back to MP3.  This allows us to seek within the input stream without
00079       // tripping over the MP3 'bit reservoir':
00080       streamSource = ADUFromMP3Source::createNew(envir(), streamSource);
00081       if (streamSource == NULL) break;
00082 
00083       streamSource = MP3FromADUSource::createNew(envir(), streamSource);
00084       if (streamSource == NULL) break;
00085     }
00086   } while (0);
00087 
00088   return streamSource;
00089 }

void MP3AudioFileServerMediaSubsession::getBaseStreams ( FramedSource frontStream,
FramedSource *&  sourceMP3Stream,
ADUFromMP3Source *&  aduStream 
) [protected]

Definition at line 91 of file MP3AudioFileServerMediaSubsession.cpp.

References fFileDuration, fGenerateADUs, fInterleaving, FramedFilter::inputSource(), and NULL.

Referenced by MP3AudioMatroskaFileServerMediaSubsession::seekStreamSource(), seekStreamSource(), and setStreamSourceScale().

00092                                                                                                                                {
00093   if (fGenerateADUs) {
00094     // There's an ADU stream.
00095     if (fInterleaving != NULL) {
00096       // There's an interleaving filter in front of the ADU stream.  So go back one, to reach the ADU stream:
00097       aduStream = (ADUFromMP3Source*)(((FramedFilter*)frontStream)->inputSource());
00098     } else {
00099       aduStream = (ADUFromMP3Source*)frontStream;
00100     }
00101 
00102     // Then, go back one more, to reach the MP3 source:
00103     sourceMP3Stream = (MP3FileSource*)(aduStream->inputSource());
00104   } else if (fFileDuration > 0.0) {
00105     // There are a pair of filters - MP3->ADU and ADU->MP3 - in front of the
00106     // original MP3 source.  So, go back one, to reach the ADU source:
00107     aduStream = (ADUFromMP3Source*)(((FramedFilter*)frontStream)->inputSource());
00108 
00109     // Then, go back one more, to reach the MP3 source:
00110     sourceMP3Stream = (MP3FileSource*)(aduStream->inputSource());
00111   } else {
00112     // There's no filter in front of the source MP3 stream (and there's no ADU stream):
00113     aduStream = NULL;
00114     sourceMP3Stream = frontStream;
00115   }
00116 }

void MP3AudioFileServerMediaSubsession::seekStreamSource ( FramedSource inputSource,
double &  seekNPT,
double  streamDuration,
u_int64_t &  numBytes 
) [protected, virtual]

Reimplemented from OnDemandServerMediaSubsession.

Reimplemented in MP3AudioMatroskaFileServerMediaSubsession.

Definition at line 120 of file MP3AudioFileServerMediaSubsession.cpp.

References getBaseStreams(), NULL, and ADUFromMP3Source::resetInput().

00120                                                                                                              {
00121   FramedSource* sourceMP3Stream;
00122   ADUFromMP3Source* aduStream;
00123   getBaseStreams(inputSource, sourceMP3Stream, aduStream);
00124 
00125   if (aduStream != NULL) aduStream->resetInput(); // because we're about to seek within its source
00126   ((MP3FileSource*)sourceMP3Stream)->seekWithinFile(seekNPT, streamDuration);
00127 }

void MP3AudioFileServerMediaSubsession::setStreamSourceScale ( FramedSource inputSource,
float  scale 
) [protected, virtual]

Reimplemented from OnDemandServerMediaSubsession.

Definition at line 130 of file MP3AudioFileServerMediaSubsession.cpp.

References getBaseStreams(), NULL, and ADUFromMP3Source::setScaleFactor().

00130                                                              {
00131 
00132   FramedSource* sourceMP3Stream;
00133   ADUFromMP3Source* aduStream;
00134   getBaseStreams(inputSource, sourceMP3Stream, aduStream);
00135 
00136   if (aduStream == NULL) return; // because, in this case, the stream's not scalable
00137 
00138   int iScale = (int)scale;
00139   aduStream->setScaleFactor(iScale);
00140   ((MP3FileSource*)sourceMP3Stream)->setPresentationTimeScale(iScale);
00141 }

FramedSource * MP3AudioFileServerMediaSubsession::createNewStreamSource ( unsigned  clientSessionId,
unsigned &  estBitrate 
) [protected, virtual]

Implements OnDemandServerMediaSubsession.

Reimplemented in MP3AudioMatroskaFileServerMediaSubsession.

Definition at line 144 of file MP3AudioFileServerMediaSubsession.cpp.

References MP3FileSource::createNew(), createNewStreamSourceCommon(), Medium::envir(), fFileDuration, FileServerMediaSubsession::fFileName, MP3FileSource::filePlayTime(), MP3FileSource::fileSize(), and NULL.

00144                                                                           {
00145   MP3FileSource* mp3Source = MP3FileSource::createNew(envir(), fFileName);
00146   if (mp3Source == NULL) return NULL;
00147   fFileDuration = mp3Source->filePlayTime();
00148 
00149   return createNewStreamSourceCommon(mp3Source, mp3Source->fileSize(), estBitrate);
00150 }

RTPSink * MP3AudioFileServerMediaSubsession::createNewRTPSink ( Groupsock rtpGroupsock,
unsigned char  rtpPayloadTypeIfDynamic,
FramedSource inputSource 
) [protected, virtual]

Implements OnDemandServerMediaSubsession.

Definition at line 153 of file MP3AudioFileServerMediaSubsession.cpp.

References MPEG1or2AudioRTPSink::createNew(), MP3ADURTPSink::createNew(), Medium::envir(), and fGenerateADUs.

00155                                                   {
00156   if (fGenerateADUs) {
00157     return MP3ADURTPSink::createNew(envir(), rtpGroupsock,
00158                                     rtpPayloadTypeIfDynamic);
00159   } else {
00160     return MPEG1or2AudioRTPSink::createNew(envir(), rtpGroupsock);
00161   }
00162 }

void MP3AudioFileServerMediaSubsession::testScaleFactor ( float &  scale  )  [protected, virtual]

Reimplemented from ServerMediaSubsession.

Definition at line 164 of file MP3AudioFileServerMediaSubsession.cpp.

References fFileDuration.

00164                                                                     {
00165   if (fFileDuration <= 0.0) {
00166     // The file is non-seekable, so is probably a live input source.
00167     // We don't support scale factors other than 1
00168     scale = 1;
00169   } else {
00170     // We support any integral scale >= 1
00171     int iScale = (int)(scale + 0.5); // round
00172     if (iScale < 1) iScale = 1;
00173     scale = (float)iScale;
00174   }
00175 }

float MP3AudioFileServerMediaSubsession::duration (  )  const [protected, virtual]

Reimplemented from ServerMediaSubsession.

Definition at line 177 of file MP3AudioFileServerMediaSubsession.cpp.

References fFileDuration.

00177                                                         {
00178   return fFileDuration;
00179 }

char const * OnDemandServerMediaSubsession::sdpLines (  )  [protected, virtual, inherited]

Implements ServerMediaSubsession.

Definition at line 58 of file OnDemandServerMediaSubsession.cpp.

References Medium::close(), OnDemandServerMediaSubsession::closeStreamSource(), OnDemandServerMediaSubsession::createNewRTPSink(), OnDemandServerMediaSubsession::createNewStreamSource(), Medium::envir(), RTPSink::estimatedBitrate(), OnDemandServerMediaSubsession::fSDPLines, NULL, OnDemandServerMediaSubsession::setSDPLinesFromRTPSink(), and ServerMediaSubsession::trackNumber().

Referenced by OnDemandServerMediaSubsession::setSDPLinesFromRTPSink().

00058                                         {
00059   if (fSDPLines == NULL) {
00060     // We need to construct a set of SDP lines that describe this
00061     // subsession (as a unicast stream).  To do so, we first create
00062     // dummy (unused) source and "RTPSink" objects,
00063     // whose parameters we use for the SDP lines:
00064     unsigned estBitrate;
00065     FramedSource* inputSource = createNewStreamSource(0, estBitrate);
00066     if (inputSource == NULL) return NULL; // file not found
00067 
00068     struct in_addr dummyAddr;
00069     dummyAddr.s_addr = 0;
00070     Groupsock dummyGroupsock(envir(), dummyAddr, 0, 0);
00071     unsigned char rtpPayloadType = 96 + trackNumber()-1; // if dynamic
00072     RTPSink* dummyRTPSink
00073       = createNewRTPSink(&dummyGroupsock, rtpPayloadType, inputSource);
00074     if (dummyRTPSink != NULL && dummyRTPSink->estimatedBitrate() > 0) estBitrate = dummyRTPSink->estimatedBitrate();
00075 
00076     setSDPLinesFromRTPSink(dummyRTPSink, inputSource, estBitrate);
00077     Medium::close(dummyRTPSink);
00078     closeStreamSource(inputSource);
00079   }
00080 
00081   return fSDPLines;
00082 }

void OnDemandServerMediaSubsession::getStreamParameters ( unsigned  clientSessionId,
netAddressBits  clientAddress,
Port const &  clientRTPPort,
Port const &  clientRTCPPort,
int  tcpSocketNum,
unsigned char  rtpChannelId,
unsigned char  rtcpChannelId,
netAddressBits destinationAddress,
u_int8_t &  destinationTTL,
Boolean isMulticast,
Port serverRTPPort,
Port serverRTCPPort,
void *&  streamToken 
) [protected, virtual, inherited]

Implements ServerMediaSubsession.

Definition at line 85 of file OnDemandServerMediaSubsession.cpp.

References HashTable::Add(), BasicUDPSink::createNew(), OnDemandServerMediaSubsession::createNewRTPSink(), OnDemandServerMediaSubsession::createNewStreamSource(), Medium::envir(), RTPSink::estimatedBitrate(), False, OnDemandServerMediaSubsession::fDestinationsHashTable, OnDemandServerMediaSubsession::fInitialPortNum, OnDemandServerMediaSubsession::fLastStreamToken, OnDemandServerMediaSubsession::fMultiplexRTCPWithRTP, OnDemandServerMediaSubsession::fReuseFirstSource, increaseSendBufferTo(), NULL, Port::num(), Groupsock::removeAllDestinations(), Socket::socketNum(), OnDemandServerMediaSubsession::StreamState, and ServerMediaSubsession::trackNumber().

00097                                           {
00098   if (destinationAddress == 0) destinationAddress = clientAddress;
00099   struct in_addr destinationAddr; destinationAddr.s_addr = destinationAddress;
00100   isMulticast = False;
00101 
00102   if (fLastStreamToken != NULL && fReuseFirstSource) {
00103     // Special case: Rather than creating a new 'StreamState',
00104     // we reuse the one that we've already created:
00105     serverRTPPort = ((StreamState*)fLastStreamToken)->serverRTPPort();
00106     serverRTCPPort = ((StreamState*)fLastStreamToken)->serverRTCPPort();
00107     ++((StreamState*)fLastStreamToken)->referenceCount();
00108     streamToken = fLastStreamToken;
00109   } else {
00110     // Normal case: Create a new media source:
00111     unsigned streamBitrate;
00112     FramedSource* mediaSource
00113       = createNewStreamSource(clientSessionId, streamBitrate);
00114 
00115     // Create 'groupsock' and 'sink' objects for the destination,
00116     // using previously unused server port numbers:
00117     RTPSink* rtpSink = NULL;
00118     BasicUDPSink* udpSink = NULL;
00119     Groupsock* rtpGroupsock = NULL;
00120     Groupsock* rtcpGroupsock = NULL;
00121 
00122     if (clientRTPPort.num() != 0 || tcpSocketNum >= 0) { // Normal case: Create destinations
00123       portNumBits serverPortNum;
00124       if (clientRTCPPort.num() == 0) {
00125         // We're streaming raw UDP (not RTP). Create a single groupsock:
00126         NoReuse dummy(envir()); // ensures that we skip over ports that are already in use
00127         for (serverPortNum = fInitialPortNum; ; ++serverPortNum) {
00128           struct in_addr dummyAddr; dummyAddr.s_addr = 0;
00129           
00130           serverRTPPort = serverPortNum;
00131           rtpGroupsock = new Groupsock(envir(), dummyAddr, serverRTPPort, 255);
00132           if (rtpGroupsock->socketNum() >= 0) break; // success
00133         }
00134 
00135         udpSink = BasicUDPSink::createNew(envir(), rtpGroupsock);
00136       } else {
00137         // Normal case: We're streaming RTP (over UDP or TCP).  Create a pair of
00138         // groupsocks (RTP and RTCP), with adjacent port numbers (RTP port number even).
00139         // (If we're multiplexing RTCP and RTP over the same port number, it can be odd or even.)
00140         NoReuse dummy(envir()); // ensures that we skip over ports that are already in use
00141         for (portNumBits serverPortNum = fInitialPortNum; ; ++serverPortNum) {
00142           struct in_addr dummyAddr; dummyAddr.s_addr = 0;
00143 
00144           serverRTPPort = serverPortNum;
00145           rtpGroupsock = new Groupsock(envir(), dummyAddr, serverRTPPort, 255);
00146           if (rtpGroupsock->socketNum() < 0) {
00147             delete rtpGroupsock;
00148             continue; // try again
00149           }
00150 
00151           if (fMultiplexRTCPWithRTP) {
00152             // Use the RTP 'groupsock' object for RTCP as well:
00153             serverRTCPPort = serverRTPPort;
00154             rtcpGroupsock = rtpGroupsock;
00155           } else {
00156             // Create a separate 'groupsock' object (with the next (odd) port number) for RTCP:
00157             serverRTCPPort = ++serverPortNum;
00158             rtcpGroupsock = new Groupsock(envir(), dummyAddr, serverRTCPPort, 255);
00159             if (rtcpGroupsock->socketNum() < 0) {
00160               delete rtpGroupsock;
00161               delete rtcpGroupsock;
00162               continue; // try again
00163             }
00164           }
00165 
00166           break; // success
00167         }
00168 
00169         unsigned char rtpPayloadType = 96 + trackNumber()-1; // if dynamic
00170         rtpSink = createNewRTPSink(rtpGroupsock, rtpPayloadType, mediaSource);
00171         if (rtpSink != NULL && rtpSink->estimatedBitrate() > 0) streamBitrate = rtpSink->estimatedBitrate();
00172       }
00173 
00174       // Turn off the destinations for each groupsock.  They'll get set later
00175       // (unless TCP is used instead):
00176       if (rtpGroupsock != NULL) rtpGroupsock->removeAllDestinations();
00177       if (rtcpGroupsock != NULL) rtcpGroupsock->removeAllDestinations();
00178 
00179       if (rtpGroupsock != NULL) {
00180         // Try to use a big send buffer for RTP -  at least 0.1 second of
00181         // specified bandwidth and at least 50 KB
00182         unsigned rtpBufSize = streamBitrate * 25 / 2; // 1 kbps * 0.1 s = 12.5 bytes
00183         if (rtpBufSize < 50 * 1024) rtpBufSize = 50 * 1024;
00184         increaseSendBufferTo(envir(), rtpGroupsock->socketNum(), rtpBufSize);
00185       }
00186     }
00187 
00188     // Set up the state of the stream.  The stream will get started later:
00189     streamToken = fLastStreamToken
00190       = new StreamState(*this, serverRTPPort, serverRTCPPort, rtpSink, udpSink,
00191                         streamBitrate, mediaSource,
00192                         rtpGroupsock, rtcpGroupsock);
00193   }
00194 
00195   // Record these destinations as being for this client session id:
00196   Destinations* destinations;
00197   if (tcpSocketNum < 0) { // UDP
00198     destinations = new Destinations(destinationAddr, clientRTPPort, clientRTCPPort);
00199   } else { // TCP
00200     destinations = new Destinations(tcpSocketNum, rtpChannelId, rtcpChannelId);
00201   }
00202   fDestinationsHashTable->Add((char const*)clientSessionId, destinations);
00203 }

void OnDemandServerMediaSubsession::startStream ( unsigned  clientSessionId,
void *  streamToken,
TaskFunc rtcpRRHandler,
void *  rtcpRRHandlerClientData,
unsigned short &  rtpSeqNum,
unsigned &  rtpTimestamp,
ServerRequestAlternativeByteHandler serverRequestAlternativeByteHandler,
void *  serverRequestAlternativeByteHandlerClientData 
) [protected, virtual, inherited]

Implements ServerMediaSubsession.

Reimplemented in MPEG2TransportFileServerMediaSubsession.

Definition at line 205 of file OnDemandServerMediaSubsession.cpp.

References RTPSink::currentSeqNo(), OnDemandServerMediaSubsession::fDestinationsHashTable, HashTable::Lookup(), NULL, RTPSink::presetNextTimestamp(), StreamState::rtpSink(), and StreamState::startPlaying().

Referenced by MPEG2TransportFileServerMediaSubsession::startStream().

00212                                                                                                      {
00213   StreamState* streamState = (StreamState*)streamToken;
00214   Destinations* destinations
00215     = (Destinations*)(fDestinationsHashTable->Lookup((char const*)clientSessionId));
00216   if (streamState != NULL) {
00217     streamState->startPlaying(destinations,
00218                               rtcpRRHandler, rtcpRRHandlerClientData,
00219                               serverRequestAlternativeByteHandler, serverRequestAlternativeByteHandlerClientData);
00220     RTPSink* rtpSink = streamState->rtpSink(); // alias
00221     if (rtpSink != NULL) {
00222       rtpSeqNum = rtpSink->currentSeqNo();
00223       rtpTimestamp = rtpSink->presetNextTimestamp();
00224     }
00225   }
00226 }

void OnDemandServerMediaSubsession::pauseStream ( unsigned  clientSessionId,
void *  streamToken 
) [protected, virtual, inherited]

Reimplemented from ServerMediaSubsession.

Reimplemented in MPEG2TransportFileServerMediaSubsession.

Definition at line 228 of file OnDemandServerMediaSubsession.cpp.

References OnDemandServerMediaSubsession::fReuseFirstSource, NULL, and StreamState::pause().

Referenced by MPEG2TransportFileServerMediaSubsession::pauseStream(), and MPEG2TransportFileServerMediaSubsession::startStream().

00229                                                                    {
00230   // Pausing isn't allowed if multiple clients are receiving data from
00231   // the same source:
00232   if (fReuseFirstSource) return;
00233 
00234   StreamState* streamState = (StreamState*)streamToken;
00235   if (streamState != NULL) streamState->pause();
00236 }

void OnDemandServerMediaSubsession::seekStream ( unsigned  clientSessionId,
void *  streamToken,
double &  seekNPT,
double  streamDuration,
u_int64_t &  numBytes 
) [protected, virtual, inherited]

Reimplemented from ServerMediaSubsession.

Reimplemented in MPEG2TransportFileServerMediaSubsession.

Definition at line 238 of file OnDemandServerMediaSubsession.cpp.

References OnDemandServerMediaSubsession::fReuseFirstSource, StreamState::mediaSource(), NULL, RTPSink::resetPresentationTimes(), StreamState::rtpSink(), OnDemandServerMediaSubsession::seekStreamSource(), and StreamState::startNPT().

Referenced by MPEG2TransportFileServerMediaSubsession::seekStream().

00239                                                                                                                                {
00240   numBytes = 0; // by default: unknown
00241 
00242   // Seeking isn't allowed if multiple clients are receiving data from the same source:
00243   if (fReuseFirstSource) return;
00244 
00245   StreamState* streamState = (StreamState*)streamToken;
00246   if (streamState != NULL && streamState->mediaSource() != NULL) {
00247     seekStreamSource(streamState->mediaSource(), seekNPT, streamDuration, numBytes);
00248 
00249     streamState->startNPT() = (float)seekNPT;
00250     RTPSink* rtpSink = streamState->rtpSink(); // alias
00251     if (rtpSink != NULL) rtpSink->resetPresentationTimes();
00252   }
00253 }

void OnDemandServerMediaSubsession::seekStream ( unsigned  clientSessionId,
void *  streamToken,
char *&  absStart,
char *&  absEnd 
) [protected, virtual, inherited]

Reimplemented from ServerMediaSubsession.

Definition at line 255 of file OnDemandServerMediaSubsession.cpp.

References OnDemandServerMediaSubsession::fReuseFirstSource, StreamState::mediaSource(), NULL, and OnDemandServerMediaSubsession::seekStreamSource().

00256                                                                                                   {
00257   // Seeking isn't allowed if multiple clients are receiving data from the same source:
00258   if (fReuseFirstSource) return;
00259 
00260   StreamState* streamState = (StreamState*)streamToken;
00261   if (streamState != NULL && streamState->mediaSource() != NULL) {
00262     seekStreamSource(streamState->mediaSource(), absStart, absEnd);
00263   }
00264 }

void OnDemandServerMediaSubsession::nullSeekStream ( unsigned  clientSessionId,
void *  streamToken,
double  streamEndTime,
u_int64_t &  numBytes 
) [protected, virtual, inherited]

Reimplemented from ServerMediaSubsession.

Definition at line 266 of file OnDemandServerMediaSubsession.cpp.

References ServerMediaSubsession::duration(), OnDemandServerMediaSubsession::getCurrentNPT(), StreamState::mediaSource(), NULL, RTPSink::resetPresentationTimes(), StreamState::rtpSink(), OnDemandServerMediaSubsession::setStreamSourceDuration(), and StreamState::startNPT().

00267                                                                                               {
00268   numBytes = 0; // by default: unknown
00269 
00270   StreamState* streamState = (StreamState*)streamToken;
00271   if (streamState != NULL && streamState->mediaSource() != NULL) {
00272     // Because we're not seeking here, get the current NPT, and remember it as the new 'start' NPT:
00273     streamState->startNPT() = getCurrentNPT(streamToken);
00274 
00275     double duration = streamEndTime - streamState->startNPT();
00276     if (duration < 0.0) duration = 0.0;
00277     setStreamSourceDuration(streamState->mediaSource(), duration, numBytes);
00278 
00279     RTPSink* rtpSink = streamState->rtpSink(); // alias
00280     if (rtpSink != NULL) rtpSink->resetPresentationTimes();
00281   }
00282 }

void OnDemandServerMediaSubsession::setStreamScale ( unsigned  clientSessionId,
void *  streamToken,
float  scale 
) [protected, virtual, inherited]

Reimplemented from ServerMediaSubsession.

Reimplemented in MPEG2TransportFileServerMediaSubsession.

Definition at line 284 of file OnDemandServerMediaSubsession.cpp.

References OnDemandServerMediaSubsession::fReuseFirstSource, StreamState::mediaSource(), NULL, and OnDemandServerMediaSubsession::setStreamSourceScale().

Referenced by MPEG2TransportFileServerMediaSubsession::setStreamScale().

00285                                                                                    {
00286   // Changing the scale factor isn't allowed if multiple clients are receiving data
00287   // from the same source:
00288   if (fReuseFirstSource) return;
00289 
00290   StreamState* streamState = (StreamState*)streamToken;
00291   if (streamState != NULL && streamState->mediaSource() != NULL) {
00292     setStreamSourceScale(streamState->mediaSource(), scale);
00293   }
00294 }

float OnDemandServerMediaSubsession::getCurrentNPT ( void *  streamToken  )  [protected, virtual, inherited]

Reimplemented from ServerMediaSubsession.

Definition at line 296 of file OnDemandServerMediaSubsession.cpp.

References RTPSink::initialPresentationTime(), RTPSink::mostRecentPresentationTime(), NULL, StreamState::rtpSink(), and StreamState::startNPT().

Referenced by OnDemandServerMediaSubsession::nullSeekStream().

00296                                                                     {
00297   do {
00298     if (streamToken == NULL) break;
00299 
00300     StreamState* streamState = (StreamState*)streamToken;
00301     RTPSink* rtpSink = streamState->rtpSink();
00302     if (rtpSink == NULL) break;
00303 
00304     return streamState->startNPT()
00305       + (rtpSink->mostRecentPresentationTime().tv_sec - rtpSink->initialPresentationTime().tv_sec)
00306       + (rtpSink->mostRecentPresentationTime().tv_sec - rtpSink->initialPresentationTime().tv_sec)/1000000.0f;
00307   } while (0);
00308 
00309   return 0.0;
00310 }

FramedSource * OnDemandServerMediaSubsession::getStreamSource ( void *  streamToken  )  [protected, virtual, inherited]

Reimplemented from ServerMediaSubsession.

Definition at line 312 of file OnDemandServerMediaSubsession.cpp.

References StreamState::mediaSource(), and NULL.

00312                                                                               {
00313   if (streamToken == NULL) return NULL;
00314 
00315   StreamState* streamState = (StreamState*)streamToken;
00316   return streamState->mediaSource();
00317 }

void OnDemandServerMediaSubsession::deleteStream ( unsigned  clientSessionId,
void *&  streamToken 
) [protected, virtual, inherited]

Reimplemented from ServerMediaSubsession.

Reimplemented in MPEG2TransportFileServerMediaSubsession.

Definition at line 319 of file OnDemandServerMediaSubsession.cpp.

References StreamState::endPlaying(), OnDemandServerMediaSubsession::fDestinationsHashTable, HashTable::Lookup(), NULL, StreamState::referenceCount(), and HashTable::Remove().

Referenced by MPEG2TransportFileServerMediaSubsession::deleteStream().

00320                                                                      {
00321   StreamState* streamState = (StreamState*)streamToken;
00322 
00323   // Look up (and remove) the destinations for this client session:
00324   Destinations* destinations
00325     = (Destinations*)(fDestinationsHashTable->Lookup((char const*)clientSessionId));
00326   if (destinations != NULL) {
00327     fDestinationsHashTable->Remove((char const*)clientSessionId);
00328 
00329     // Stop streaming to these destinations:
00330     if (streamState != NULL) streamState->endPlaying(destinations);
00331   }
00332 
00333   // Delete the "StreamState" structure if it's no longer being used:
00334   if (streamState != NULL) {
00335     if (streamState->referenceCount() > 0) --streamState->referenceCount();
00336     if (streamState->referenceCount() == 0) {
00337       delete streamState;
00338       streamToken = NULL;
00339     }
00340   }
00341 
00342   // Finally, delete the destinations themselves:
00343   delete destinations;
00344 }

char const * OnDemandServerMediaSubsession::getAuxSDPLine ( RTPSink rtpSink,
FramedSource inputSource 
) [protected, virtual, inherited]

Reimplemented in DVVideoFileServerMediaSubsession, H264VideoFileServerMediaSubsession, H265VideoFileServerMediaSubsession, and MPEG4VideoFileServerMediaSubsession.

Definition at line 347 of file OnDemandServerMediaSubsession.cpp.

References RTPSink::auxSDPLine(), and NULL.

Referenced by OnDemandServerMediaSubsession::setSDPLinesFromRTPSink().

00347                                                                {
00348   // Default implementation:
00349   return rtpSink == NULL ? NULL : rtpSink->auxSDPLine();
00350 }

void OnDemandServerMediaSubsession::seekStreamSource ( FramedSource inputSource,
char *&  absStart,
char *&  absEnd 
) [protected, virtual, inherited]

Definition at line 358 of file OnDemandServerMediaSubsession.cpp.

References NULL.

00359                                                                                      {
00360   // Default implementation: do nothing (but delete[] and assign "absStart" and "absEnd" to NULL, to show that we don't handle this)
00361   delete[] absStart; absStart = NULL;
00362   delete[] absEnd; absEnd = NULL;
00363 }

void OnDemandServerMediaSubsession::setStreamSourceDuration ( FramedSource inputSource,
double  streamDuration,
u_int64_t &  numBytes 
) [protected, virtual, inherited]

Reimplemented in DVVideoFileServerMediaSubsession, and WAVAudioFileServerMediaSubsession.

Definition at line 371 of file OnDemandServerMediaSubsession.cpp.

Referenced by OnDemandServerMediaSubsession::nullSeekStream().

00371                                                                                                        {
00372   // Default implementation: Do nothing
00373   numBytes = 0;
00374 }

void OnDemandServerMediaSubsession::closeStreamSource ( FramedSource inputSource  )  [protected, virtual, inherited]

Reimplemented in ProxyServerMediaSubsession.

Definition at line 376 of file OnDemandServerMediaSubsession.cpp.

References Medium::close().

Referenced by StreamState::reclaim(), and OnDemandServerMediaSubsession::sdpLines().

00376                                                                                {
00377   Medium::close(inputSource);
00378 }

void OnDemandServerMediaSubsession::multiplexRTCPWithRTP (  )  [inline, inherited]

Definition at line 102 of file OnDemandServerMediaSubsession.hh.

References OnDemandServerMediaSubsession::fMultiplexRTCPWithRTP, and True.

unsigned ServerMediaSubsession::trackNumber (  )  const [inline, inherited]

Definition at line 126 of file ServerMediaSession.hh.

References ServerMediaSubsession::fTrackNumber.

Referenced by OnDemandServerMediaSubsession::getStreamParameters(), and OnDemandServerMediaSubsession::sdpLines().

00126 { return fTrackNumber; }

char const * ServerMediaSubsession::trackId (  )  [inherited]

Definition at line 352 of file ServerMediaSession.cpp.

References ServerMediaSubsession::fTrackId, ServerMediaSubsession::fTrackNumber, NULL, and strDup().

Referenced by PassiveServerMediaSubsession::sdpLines(), and OnDemandServerMediaSubsession::setSDPLinesFromRTPSink().

00352                                            {
00353   if (fTrackNumber == 0) return NULL; // not yet in a ServerMediaSession
00354 
00355   if (fTrackId == NULL) {
00356     char buf[100];
00357     sprintf(buf, "track%d", fTrackNumber);
00358     fTrackId = strDup(buf);
00359   }
00360   return fTrackId;
00361 }

void ServerMediaSubsession::getAbsoluteTimeRange ( char *&  absStartTime,
char *&  absEndTime 
) const [virtual, inherited]

Definition at line 410 of file ServerMediaSession.cpp.

References NULL.

Referenced by ServerMediaSubsession::rangeSDPLine().

00410                                                                                              {
00411   // default implementation: We don't support seeking by 'absolute' time, so indicate this by setting both parameters to NULL:
00412   absStartTime = absEndTime = NULL;
00413 }

void ServerMediaSubsession::setServerAddressAndPortForSDP ( netAddressBits  addressBits,
portNumBits  portBits 
) [inherited]

Definition at line 415 of file ServerMediaSession.cpp.

References ServerMediaSubsession::fPortNumForSDP, and ServerMediaSubsession::fServerAddressForSDP.

00416                                                                                 {
00417   fServerAddressForSDP = addressBits;
00418   fPortNumForSDP = portBits;
00419 }

char const * ServerMediaSubsession::rangeSDPLine (  )  const [protected, inherited]

Definition at line 422 of file ServerMediaSession.cpp.

References ServerMediaSubsession::duration(), ServerMediaSession::duration(), ServerMediaSubsession::fParentSession, ServerMediaSubsession::getAbsoluteTimeRange(), NULL, and strDup().

Referenced by PassiveServerMediaSubsession::sdpLines(), and OnDemandServerMediaSubsession::setSDPLinesFromRTPSink().

00422                                           {
00423   // First, check for the special case where we support seeking by 'absolute' time:
00424   char* absStart = NULL; char* absEnd = NULL;
00425   getAbsoluteTimeRange(absStart, absEnd);
00426   if (absStart != NULL) {
00427     char buf[100];
00428 
00429     if (absEnd != NULL) {
00430       sprintf(buf, "a=range:clock=%s-%s\r\n", absStart, absEnd);
00431     } else {
00432       sprintf(buf, "a=range:clock=%s-\r\n", absStart);
00433     }
00434     return strDup(buf);
00435   }
00436 
00437   if (fParentSession == NULL) return NULL;
00438 
00439   // If all of our parent's subsessions have the same duration
00440   // (as indicated by "fParentSession->duration() >= 0"), there's no "a=range:" line:
00441   if (fParentSession->duration() >= 0.0) return strDup("");
00442 
00443   // Use our own duration for a "a=range:" line:
00444   float ourDuration = duration();
00445   if (ourDuration == 0.0) {
00446     return strDup("a=range:npt=0-\r\n");
00447   } else {
00448     char buf[100];
00449     sprintf(buf, "a=range:npt=0-%.3f\r\n", ourDuration);
00450     return strDup(buf);
00451   }
00452 }

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(), RTCPInstance::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(), continueAfterClientCreation0(), 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(), MPEG1or2ProgramStreamFileDuration(), MPEG1or2Demux::noteElementaryStreamDeletion(), ByteStreamMultiFileSource::onSourceClosure1(), StreamState::reclaim(), registerResponseHandler(), RTSPServer::removeServerMediaSession(), ProxyServerMediaSession::resetDESCRIBEState(), OnDemandServerMediaSubsession::sdpLines(), shutdownStream(), subsessionAfterPlaying(), ClientTrickPlayState::updateStateOnScaleChange(), AMRDeinterleaver::~AMRDeinterleaver(), ByteStreamMultiFileSource::~ByteStreamMultiFileSource(), DarwinInjector::~DarwinInjector(), FramedFilter::~FramedFilter(), H264or5VideoRTPSink::~H264or5VideoRTPSink(), InputESSourceRecord::~InputESSourceRecord(), MatroskaFileParser::~MatroskaFileParser(), MatroskaFileServerDemux::~MatroskaFileServerDemux(), MPEG1or2Demux::~MPEG1or2Demux(), MPEG1or2FileServerDemux::~MPEG1or2FileServerDemux(), MPEG2TransportFileServerMediaSubsession::~MPEG2TransportFileServerMediaSubsession(), MPEG2TransportStreamFromPESSource::~MPEG2TransportStreamFromPESSource(), OggFileParser::~OggFileParser(), OggFileServerDemux::~OggFileServerDemux(), 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(), RTCPInstance::addStreamSocket(), MPEG2IFrameIndexFromTransportStream::addToTail(), StreamParser::afterGettingBytes1(), DummySink::afterGettingFrame(), TCPStreamSink::afterGettingFrame(), T140IdleFilter::afterGettingFrame(), FileSink::afterGettingFrame(), MultiFramedRTPSink::afterGettingFrame1(), InputESSourceRecord::afterGettingFrame1(), MPEG2TransportStreamFramer::afterGettingFrame1(), MPEG2IFrameIndexFromTransportStream::afterGettingFrame1(), H264or5VideoStreamDiscreteFramer::afterGettingFrame1(), BasicUDPSink::afterGettingFrame1(), MPEG4VideoFileServerMediaSubsession::afterPlayingDummy1(), H265VideoFileServerMediaSubsession::afterPlayingDummy1(), H264VideoFileServerMediaSubsession::afterPlayingDummy1(), MPEG4VideoStreamParser::analyzeVOLHeader(), announceStream(), RTSPServer::RTSPClientConnection::changeClientInputSocket(), MPEG4VideoFileServerMediaSubsession::checkForAuxSDPLine1(), H265VideoFileServerMediaSubsession::checkForAuxSDPLine1(), H264VideoFileServerMediaSubsession::checkForAuxSDPLine1(), Medium::close(), ProxyServerMediaSubsession::closeStreamSource(), MPEG2IFrameIndexFromTransportStream::compactParseBuffer(), RTSPClient::connectionHandler1(), RTSPClient::connectToServer(), ProxyServerMediaSession::continueAfterDESCRIBE(), ProxyRTSPClient::continueAfterLivenessCommand(), ProxyRTSPClient::continueAfterSETUP(), T140TextRTPSink::continuePlaying(), QuickTimeFileSink::continuePlaying(), H264or5VideoRTPSink::continuePlaying(), AVIFileSink::continuePlaying(), ProxyServerMediaSubsession::createNewRTPSink(), MPEG4VideoFileServerMediaSubsession::createNewRTPSink(), MPEG2TransportUDPServerMediaSubsession::createNewRTPSink(), MPEG2TransportFileServerMediaSubsession::createNewRTPSink(), MPEG1or2VideoFileServerMediaSubsession::createNewRTPSink(), MPEG1or2DemuxedServerMediaSubsession::createNewRTPSink(), createNewRTPSink(), H265VideoFileServerMediaSubsession::createNewRTPSink(), H264VideoFileServerMediaSubsession::createNewRTPSink(), H263plusVideoFileServerMediaSubsession::createNewRTPSink(), DVVideoFileServerMediaSubsession::createNewRTPSink(), AMRAudioFileServerMediaSubsession::createNewRTPSink(), ADTSAudioFileServerMediaSubsession::createNewRTPSink(), AC3AudioFileServerMediaSubsession::createNewRTPSink(), HandlerServerForREGISTERCommand::createNewRTSPClient(), ProxyServerMediaSubsession::createNewStreamSource(), MPEG4VideoFileServerMediaSubsession::createNewStreamSource(), MPEG2TransportUDPServerMediaSubsession::createNewStreamSource(), MPEG2TransportFileServerMediaSubsession::createNewStreamSource(), MPEG1or2VideoFileServerMediaSubsession::createNewStreamSource(), MPEG1or2DemuxedServerMediaSubsession::createNewStreamSource(), createNewStreamSource(), H265VideoFileServerMediaSubsession::createNewStreamSource(), H264VideoFileServerMediaSubsession::createNewStreamSource(), H263plusVideoFileServerMediaSubsession::createNewStreamSource(), DVVideoFileServerMediaSubsession::createNewStreamSource(), AMRAudioFileServerMediaSubsession::createNewStreamSource(), ADTSAudioFileServerMediaSubsession::createNewStreamSource(), AC3AudioFileServerMediaSubsession::createNewStreamSource(), OggFile::createRTPSinkForTrackNumber(), MatroskaFile::createRTPSinkForTrackNumber(), MatroskaFile::createSourceForStreaming(), AMRDeinterleavingBuffer::deliverIncomingFrame(), MPEG2IFrameIndexFromTransportStream::deliverIndexRecord(), SegmentQueue::dequeue(), DeviceSource::DeviceSource(), WAVAudioFileSource::doGetNextFrame(), T140IdleFilter::doGetNextFrame(), MPEG2TransportStreamMultiplexor::doGetNextFrame(), MPEG2IFrameIndexFromTransportStream::doGetNextFrame(), MP3FileSource::doGetNextFrame(), H264or5Fragmenter::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(), H265VideoFileServerMediaSubsession::getAuxSDPLine(), H264VideoFileServerMediaSubsession::getAuxSDPLine(), getMPEG1or2TimeCode(), FramedSource::getNextFrame(), getOptions(), DVVideoStreamFramer::getProfile(), SIPClient::getResponse(), SIPClient::getResponseCode(), getSDPDescription(), OnDemandServerMediaSubsession::getStreamParameters(), RTSPClient::handleAlternativeRequestByte1(), RTSPServer::RTSPClientConnection::handleCmd_REGISTER(), RTSPClient::handleGET_PARAMETERResponse(), RTSPServerSupportingHTTPStreaming::RTSPClientConnectionSupportingHTTPStreaming::handleHTTPCmd_StreamingGET(), RTSPClient::handleIncomingRequest(), RTSPClient::handlePLAYResponse(), RTSPClient::handleRequestError(), RTSPClient::handleResponseBytes(), RTSPClient::handleSETUPResponse(), RTSPServerWithREGISTERProxying::implementCmd_REGISTER(), RTSPServer::incomingConnectionHandler(), RTSPClient::incomingDataHandler1(), RTCPInstance::incomingReportHandler1(), MP3FileSource::initializeStream(), MediaSession::initializeWithSDP(), MediaSession::initiateByMediaType(), SIPClient::invite1(), DynamicRTSPServer::lookupServerMediaSession(), MatroskaDemux::MatroskaDemux(), MatroskaFile::MatroskaFile(), MPEG4GenericRTPSource::MPEG4GenericRTPSource(), MultiFramedRTPSource::networkReadHandler1(), OggDemux::newDemuxedTrack(), OggDemux::newDemuxedTrackByTrackNumber(), MatroskaDemux::newDemuxedTrackByTrackNumber(), MPEG1or2FileServerDemux::newElementaryStream(), MPEG1or2Demux::newElementaryStream(), MPEG4GenericBufferedPacket::nextEnclosedFrameSize(), AMRBufferedPacket::nextEnclosedFrameSize(), OggDemux::OggDemux(), OggFile::OggFile(), T140IdleFilter::onSourceClosure(), MediaSink::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(), RTCPInstance::reschedule(), RTSPClient::resendCommand(), ProxyRTSPClient::reset(), RTSPClient::resetTCPSockets(), RTSPClient::responseHandlerForHTTP_GET1(), RTSPClient::RTSPClient(), RTSPServer::rtspURLPrefix(), RTCPInstance::schedule(), ProxyRTSPClient::scheduleDESCRIBECommand(), ProxyRTSPClient::scheduleLivenessCommand(), OnDemandServerMediaSubsession::sdpLines(), SIPClient::sendACK(), SIPClient::sendBYE(), RTSPClient::sendDummyUDPPackets(), SIPClient::sendINVITE(), MultiFramedRTPSink::sendPacketIfNecessary(), SIPClient::sendRequest(), RTSPClient::sendRequest(), DarwinInjector::setDestination(), RTSPClient::setRequestFields(), 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(), RTSPClient::~RTSPClient(), RTSPServer::~RTSPServer(), StreamClientState::~StreamClientState(), T140IdleFilter::~T140IdleFilter(), TCPStreamSink::~TCPStreamSink(), 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::isRTCPInstance (  )  const [virtual, inherited]

Reimplemented in RTCPInstance.

Definition at line 70 of file Media.cpp.

References False.

Referenced by RTCPInstance::lookupByName().

00070                                      {
00071   return False; // default implementation
00072 }

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(), H265VideoFileServerMediaSubsession::afterPlayingDummy1(), H264VideoFileServerMediaSubsession::afterPlayingDummy1(), MPEG4VideoFileServerMediaSubsession::checkForAuxSDPLine1(), H265VideoFileServerMediaSubsession::checkForAuxSDPLine1(), H264VideoFileServerMediaSubsession::checkForAuxSDPLine1(), MP3FileSource::doGetNextFrame(), AMRAudioFileSource::doGetNextFrame(), ADTSAudioFileSource::doGetNextFrame(), MultiFramedRTPSource::doGetNextFrame1(), WAVAudioFileSource::doReadFromFile(), ByteStreamFileSource::doReadFromFile(), WAVAudioFileSource::doStopGettingFrames(), MultiFramedRTPSource::doStopGettingFrames(), FramedSource::doStopGettingFrames(), ByteStreamFileSource::doStopGettingFrames(), MediaSink::onSourceClosure(), RTCPInstance::reschedule(), RTCPInstance::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

Boolean MP3AudioFileServerMediaSubsession::fGenerateADUs [protected]

Definition at line 68 of file MP3AudioFileServerMediaSubsession.hh.

Referenced by createNewRTPSink(), and getBaseStreams().

Interleaving* MP3AudioFileServerMediaSubsession::fInterleaving [protected]

Definition at line 69 of file MP3AudioFileServerMediaSubsession.hh.

Referenced by getBaseStreams().

float MP3AudioFileServerMediaSubsession::fFileDuration [protected]

Definition at line 70 of file MP3AudioFileServerMediaSubsession.hh.

Referenced by createNewStreamSource(), duration(), getBaseStreams(), and testScaleFactor().

char const* FileServerMediaSubsession::fFileName [protected, inherited]

Definition at line 36 of file FileServerMediaSubsession.hh.

Referenced by MPEG4VideoFileServerMediaSubsession::createNewStreamSource(), MPEG2TransportFileServerMediaSubsession::createNewStreamSource(), MPEG1or2VideoFileServerMediaSubsession::createNewStreamSource(), createNewStreamSource(), H265VideoFileServerMediaSubsession::createNewStreamSource(), H264VideoFileServerMediaSubsession::createNewStreamSource(), H263plusVideoFileServerMediaSubsession::createNewStreamSource(), DVVideoFileServerMediaSubsession::createNewStreamSource(), AMRAudioFileServerMediaSubsession::createNewStreamSource(), ADTSAudioFileServerMediaSubsession::createNewStreamSource(), AC3AudioFileServerMediaSubsession::createNewStreamSource(), and FileServerMediaSubsession::~FileServerMediaSubsession().

u_int64_t FileServerMediaSubsession::fFileSize [protected, inherited]

Definition at line 37 of file FileServerMediaSubsession.hh.

Referenced by MPEG4VideoFileServerMediaSubsession::createNewStreamSource(), MPEG2TransportFileServerMediaSubsession::createNewStreamSource(), MPEG1or2VideoFileServerMediaSubsession::createNewStreamSource(), H265VideoFileServerMediaSubsession::createNewStreamSource(), H264VideoFileServerMediaSubsession::createNewStreamSource(), H263plusVideoFileServerMediaSubsession::createNewStreamSource(), DVVideoFileServerMediaSubsession::createNewStreamSource(), DVVideoFileServerMediaSubsession::seekStreamSource(), and DVVideoFileServerMediaSubsession::setStreamSourceDuration().

char* OnDemandServerMediaSubsession::fSDPLines [protected, inherited]

Definition at line 111 of file OnDemandServerMediaSubsession.hh.

Referenced by OnDemandServerMediaSubsession::sdpLines(), OnDemandServerMediaSubsession::setSDPLinesFromRTPSink(), and OnDemandServerMediaSubsession::~OnDemandServerMediaSubsession().

HashTable* OnDemandServerMediaSubsession::fDestinationsHashTable [protected, inherited]

Definition at line 112 of file OnDemandServerMediaSubsession.hh.

Referenced by OnDemandServerMediaSubsession::deleteStream(), OnDemandServerMediaSubsession::getStreamParameters(), OnDemandServerMediaSubsession::startStream(), and OnDemandServerMediaSubsession::~OnDemandServerMediaSubsession().

ServerMediaSession* ServerMediaSubsession::fParentSession [protected, inherited]

Definition at line 188 of file ServerMediaSession.hh.

Referenced by ProxyServerMediaSubsession::closeStreamSource(), ProxyRTSPClient::continueAfterSETUP(), ProxyServerMediaSubsession::createNewStreamSource(), ServerMediaSubsession::rangeSDPLine(), ProxyServerMediaSubsession::subsessionByeHandler(), and ProxyServerMediaSubsession::verbosityLevel().

netAddressBits ServerMediaSubsession::fServerAddressForSDP [protected, inherited]

Definition at line 189 of file ServerMediaSession.hh.

Referenced by OnDemandServerMediaSubsession::setSDPLinesFromRTPSink(), and ServerMediaSubsession::setServerAddressAndPortForSDP().

portNumBits ServerMediaSubsession::fPortNumForSDP [protected, inherited]

Definition at line 190 of file ServerMediaSession.hh.

Referenced by OnDemandServerMediaSubsession::setSDPLinesFromRTPSink(), and ServerMediaSubsession::setServerAddressAndPortForSDP().


The documentation for this class was generated from the following files:
Generated on Wed Apr 23 16:16:35 2014 for live by  doxygen 1.5.2