MPEG1or2DemuxedServerMediaSubsession Class Reference

#include <MPEG1or2DemuxedServerMediaSubsession.hh>

Inheritance diagram for MPEG1or2DemuxedServerMediaSubsession:

Inheritance graph
[legend]
Collaboration diagram for MPEG1or2DemuxedServerMediaSubsession:

Collaboration graph
[legend]

Public Member Functions

void multiplexRTCPWithRTP ()
unsigned trackNumber () const
char const * trackId ()
virtual void testScaleFactor (float &scale)
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 MPEG1or2DemuxedServerMediaSubsessioncreateNew (MPEG1or2FileServerDemux &demux, u_int8_t streamIdTag, Boolean reuseFirstSource, Boolean iFramesOnly=False, double vshPeriod=5.0)
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

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 setStreamSourceScale (FramedSource *inputSource, float scale)
virtual void setStreamSourceDuration (FramedSource *inputSource, double streamDuration, u_int64_t &numBytes)
virtual void closeStreamSource (FramedSource *inputSource)
char const * rangeSDPLine () const
TaskTokennextTask ()

Protected Attributes

char * fSDPLines
HashTablefDestinationsHashTable
ServerMediaSessionfParentSession
netAddressBits fServerAddressForSDP
portNumBits fPortNumForSDP

Private Member Functions

 MPEG1or2DemuxedServerMediaSubsession (MPEG1or2FileServerDemux &demux, u_int8_t streamIdTag, Boolean reuseFirstSource, Boolean iFramesOnly, double vshPeriod)
virtual ~MPEG1or2DemuxedServerMediaSubsession ()
virtual void seekStreamSource (FramedSource *inputSource, double &seekNPT, double streamDuration, u_int64_t &numBytes)
virtual FramedSourcecreateNewStreamSource (unsigned clientSessionId, unsigned &estBitrate)
virtual RTPSinkcreateNewRTPSink (Groupsock *rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource *inputSource)
virtual float duration () const

Private Attributes

MPEG1or2FileServerDemuxfOurDemux
u_int8_t fStreamIdTag
Boolean fIFramesOnly
double fVSHPeriod

Friends

class MediaLookupTable

Detailed Description

Definition at line 32 of file MPEG1or2DemuxedServerMediaSubsession.hh.


Constructor & Destructor Documentation

MPEG1or2DemuxedServerMediaSubsession::MPEG1or2DemuxedServerMediaSubsession ( MPEG1or2FileServerDemux demux,
u_int8_t  streamIdTag,
Boolean  reuseFirstSource,
Boolean  iFramesOnly,
double  vshPeriod 
) [private]

Definition at line 40 of file MPEG1or2DemuxedServerMediaSubsession.cpp.

00043   : OnDemandServerMediaSubsession(demux.envir(), reuseFirstSource),
00044     fOurDemux(demux), fStreamIdTag(streamIdTag),
00045     fIFramesOnly(iFramesOnly), fVSHPeriod(vshPeriod) {
00046 }

MPEG1or2DemuxedServerMediaSubsession::~MPEG1or2DemuxedServerMediaSubsession (  )  [private, virtual]

Definition at line 48 of file MPEG1or2DemuxedServerMediaSubsession.cpp.

00048                                                                             {
00049 }


Member Function Documentation

MPEG1or2DemuxedServerMediaSubsession * MPEG1or2DemuxedServerMediaSubsession::createNew ( MPEG1or2FileServerDemux demux,
u_int8_t  streamIdTag,
Boolean  reuseFirstSource,
Boolean  iFramesOnly = False,
double  vshPeriod = 5.0 
) [static]

Definition at line 32 of file MPEG1or2DemuxedServerMediaSubsession.cpp.

Referenced by MPEG1or2FileServerDemux::newAC3AudioServerMediaSubsession(), MPEG1or2FileServerDemux::newAudioServerMediaSubsession(), and MPEG1or2FileServerDemux::newVideoServerMediaSubsession().

00033                                                                              {
00034   return new MPEG1or2DemuxedServerMediaSubsession(demux, streamIdTag,
00035                                                   reuseFirstSource,
00036                                                   iFramesOnly, vshPeriod);
00037 }

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

Reimplemented from OnDemandServerMediaSubsession.

Definition at line 97 of file MPEG1or2DemuxedServerMediaSubsession.cpp.

References duration(), MPEG1or2FileServerDemux::fileSize(), MPEG1or2Demux::flushInput(), MPEGVideoStreamFramer::flushInput(), MPEG1or2AudioStreamFramer::flushInput(), fOurDemux, fStreamIdTag, MPEG1or2Demux::inputSource(), ByteStreamFileSource::seekToByteAbsolute(), size, and MPEG1or2DemuxedElementaryStream::sourceDemux().

00097                                                                                                                  {
00098   float const dur = duration();
00099   unsigned const size = fOurDemux.fileSize();
00100   unsigned absBytePosition = dur == 0.0 ? 0 : (unsigned)((seekNPT/dur)*size);
00101 
00102   // "inputSource" is a 'framer'
00103   // Flush its data, to account for the seek that we're about to do:
00104   if ((fStreamIdTag&0xF0) == 0xC0 /*MPEG audio*/) {
00105     MPEG1or2AudioStreamFramer* framer = (MPEG1or2AudioStreamFramer*)inputSource;
00106     framer->flushInput();
00107   } else if ((fStreamIdTag&0xF0) == 0xE0 /*video*/) {
00108     MPEG1or2VideoStreamFramer* framer = (MPEG1or2VideoStreamFramer*)inputSource;
00109     framer->flushInput();
00110   }
00111 
00112   // "inputSource" is a filter; its input source is the original elem stream source:
00113   MPEG1or2DemuxedElementaryStream* elemStreamSource
00114     = (MPEG1or2DemuxedElementaryStream*)(((FramedFilter*)inputSource)->inputSource());
00115 
00116   // Next, get the original source demux:
00117   MPEG1or2Demux& sourceDemux = elemStreamSource->sourceDemux();
00118 
00119   // and flush its input buffers:
00120   sourceDemux.flushInput();
00121 
00122   // Then, get the original input file stream from the source demux:
00123   ByteStreamFileSource* inputFileSource
00124     = (ByteStreamFileSource*)(sourceDemux.inputSource());
00125   // Note: We can make that cast, because we know that the demux was originally
00126   // created from a "ByteStreamFileSource".
00127 
00128   // Do the appropriate seek within the input file stream:
00129   inputFileSource->seekToByteAbsolute(absBytePosition);
00130 }

FramedSource * MPEG1or2DemuxedServerMediaSubsession::createNewStreamSource ( unsigned  clientSessionId,
unsigned &  estBitrate 
) [private, virtual]

Implements OnDemandServerMediaSubsession.

Definition at line 52 of file MPEG1or2DemuxedServerMediaSubsession.cpp.

References Medium::close(), AC3AudioStreamFramer::createNew(), MPEG1or2VideoStreamFramer::createNew(), MPEG1or2AudioStreamFramer::createNew(), Medium::envir(), fIFramesOnly, fOurDemux, fStreamIdTag, fVSHPeriod, MPEG1or2FileServerDemux::newElementaryStream(), and NULL.

00052                                                                       {
00053   FramedSource* es = NULL;
00054   do {
00055     es = fOurDemux.newElementaryStream(clientSessionId, fStreamIdTag);
00056     if (es == NULL) break;
00057 
00058     if ((fStreamIdTag&0xF0) == 0xC0 /*MPEG audio*/) {
00059       estBitrate = 128; // kbps, estimate
00060       return MPEG1or2AudioStreamFramer::createNew(envir(), es);
00061     } else if ((fStreamIdTag&0xF0) == 0xE0 /*video*/) {
00062       estBitrate = 500; // kbps, estimate
00063       return MPEG1or2VideoStreamFramer::createNew(envir(), es,
00064                                                   fIFramesOnly, fVSHPeriod);
00065     } else if (fStreamIdTag == 0xBD /*AC-3 audio*/) {
00066       estBitrate = 192; // kbps, estimate
00067       return AC3AudioStreamFramer::createNew(envir(), es, 0x80);
00068     } else { // unknown stream type
00069       break;
00070     }
00071   } while (0);
00072 
00073   // An error occurred:
00074   Medium::close(es);
00075   return NULL;
00076 }

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

Implements OnDemandServerMediaSubsession.

Definition at line 79 of file MPEG1or2DemuxedServerMediaSubsession.cpp.

References audioSource, AC3AudioRTPSink::createNew(), MPEG1or2VideoRTPSink::createNew(), MPEG1or2AudioRTPSink::createNew(), Medium::envir(), fStreamIdTag, and NULL.

00080                                               {
00081   if ((fStreamIdTag&0xF0) == 0xC0 /*MPEG audio*/) {
00082     return MPEG1or2AudioRTPSink::createNew(envir(), rtpGroupsock);
00083   } else if ((fStreamIdTag&0xF0) == 0xE0 /*video*/) {
00084     return MPEG1or2VideoRTPSink::createNew(envir(), rtpGroupsock);
00085   } else if (fStreamIdTag == 0xBD /*AC-3 audio*/) {
00086     // Get the sampling frequency from the audio source; use it for the RTP frequency:
00087     AC3AudioStreamFramer* audioSource
00088       = (AC3AudioStreamFramer*)inputSource;
00089     return AC3AudioRTPSink::createNew(envir(), rtpGroupsock, rtpPayloadTypeIfDynamic,
00090                                       audioSource->samplingRate());
00091   } else {
00092     return NULL;
00093   }
00094 }

float MPEG1or2DemuxedServerMediaSubsession::duration (  )  const [private, virtual]

Reimplemented from ServerMediaSubsession.

Definition at line 132 of file MPEG1or2DemuxedServerMediaSubsession.cpp.

References MPEG1or2FileServerDemux::fileDuration(), and fOurDemux.

Referenced by seekStreamSource().

00132                                                            {
00133   return fOurDemux.fileDuration();
00134 }

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::setStreamSourceScale ( FramedSource inputSource,
float  scale 
) [protected, virtual, inherited]

Reimplemented in MP3AudioFileServerMediaSubsession, and WAVAudioFileServerMediaSubsession.

Definition at line 366 of file OnDemandServerMediaSubsession.cpp.

Referenced by OnDemandServerMediaSubsession::setStreamScale().

00366                                                                      {
00367   // Default implementation: Do nothing
00368 }

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::testScaleFactor ( float &  scale  )  [virtual, inherited]

Reimplemented in MP3AudioFileServerMediaSubsession, MPEG2TransportFileServerMediaSubsession, and WAVAudioFileServerMediaSubsession.

Definition at line 400 of file ServerMediaSession.cpp.

00400                                                         {
00401   // default implementation: Support scale = 1 only
00402   scale = 1;
00403 }

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(), 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(), createNewRTPSink(), MP3AudioFileServerMediaSubsession::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(), createNewStreamSource(), MP3AudioFileServerMediaSubsession::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

MPEG1or2FileServerDemux& MPEG1or2DemuxedServerMediaSubsession::fOurDemux [private]

Definition at line 57 of file MPEG1or2DemuxedServerMediaSubsession.hh.

Referenced by createNewStreamSource(), duration(), and seekStreamSource().

u_int8_t MPEG1or2DemuxedServerMediaSubsession::fStreamIdTag [private]

Definition at line 58 of file MPEG1or2DemuxedServerMediaSubsession.hh.

Referenced by createNewRTPSink(), createNewStreamSource(), and seekStreamSource().

Boolean MPEG1or2DemuxedServerMediaSubsession::fIFramesOnly [private]

Definition at line 59 of file MPEG1or2DemuxedServerMediaSubsession.hh.

Referenced by createNewStreamSource().

double MPEG1or2DemuxedServerMediaSubsession::fVSHPeriod [private]

Definition at line 60 of file MPEG1or2DemuxedServerMediaSubsession.hh.

Referenced by createNewStreamSource().

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 Tue Mar 25 14:40:00 2014 for live by  doxygen 1.5.2