ServerMediaSession Class Reference

#include <ServerMediaSession.hh>

Inheritance diagram for ServerMediaSession:

Inheritance graph
[legend]
Collaboration diagram for ServerMediaSession:

Collaboration graph
[legend]

Public Member Functions

char * generateSDPDescription ()
char const * streamName () const
Boolean addSubsession (ServerMediaSubsession *subsession)
unsigned numSubsessions () const
void testScaleFactor (float &scale)
float duration () const
unsigned referenceCount () const
void incrementReferenceCount ()
void decrementReferenceCount ()
BooleandeleteWhenUnreferenced ()
void deleteAllSubsessions ()
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 isDarwinInjector () const

Static Public Member Functions

static ServerMediaSessioncreateNew (UsageEnvironment &env, char const *streamName=NULL, char const *info=NULL, char const *description=NULL, Boolean isSSM=False, char const *miscSDPLines=NULL)
static Boolean lookupByName (UsageEnvironment &env, char const *mediumName, ServerMediaSession *&resultSession)
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

 ServerMediaSession (UsageEnvironment &env, char const *streamName, char const *info, char const *description, Boolean isSSM, char const *miscSDPLines)
virtual ~ServerMediaSession ()
TaskTokennextTask ()

Private Member Functions

virtual Boolean isServerMediaSession () const

Private Attributes

Boolean fIsSSM
ServerMediaSubsessionfSubsessionsHead
ServerMediaSubsessionfSubsessionsTail
unsigned fSubsessionCounter
char * fStreamName
char * fInfoSDPString
char * fDescriptionSDPString
char * fMiscSDPLines
timeval fCreationTime
unsigned fReferenceCount
Boolean fDeleteWhenUnreferenced

Friends

class ServerMediaSubsessionIterator
class MediaLookupTable

Detailed Description

Definition at line 42 of file ServerMediaSession.hh.


Constructor & Destructor Documentation

ServerMediaSession::ServerMediaSession ( UsageEnvironment env,
char const *  streamName,
char const *  info,
char const *  description,
Boolean  isSSM,
char const *  miscSDPLines 
) [protected]

Definition at line 61 of file ServerMediaSession.cpp.

References fCreationTime, fDescriptionSDPString, fInfoSDPString, fMiscSDPLines, fStreamName, libNameStr, libVersionStr, NULL, and strDup().

00066   : Medium(env), fIsSSM(isSSM), fSubsessionsHead(NULL),
00067     fSubsessionsTail(NULL), fSubsessionCounter(0),
00068     fReferenceCount(0), fDeleteWhenUnreferenced(False) {
00069   fStreamName = strDup(streamName == NULL ? "" : streamName);
00070 
00071   char* libNamePlusVersionStr = NULL; // by default
00072   if (info == NULL || description == NULL) {
00073     libNamePlusVersionStr = new char[strlen(libNameStr) + strlen(libVersionStr) + 1];
00074     sprintf(libNamePlusVersionStr, "%s%s", libNameStr, libVersionStr);
00075   }
00076   fInfoSDPString = strDup(info == NULL ? libNamePlusVersionStr : info);
00077   fDescriptionSDPString = strDup(description == NULL ? libNamePlusVersionStr : description);
00078   delete[] libNamePlusVersionStr;
00079 
00080   fMiscSDPLines = strDup(miscSDPLines == NULL ? "" : miscSDPLines);
00081 
00082   gettimeofday(&fCreationTime, NULL);
00083 }

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

Definition at line 85 of file ServerMediaSession.cpp.

References deleteAllSubsessions(), fDescriptionSDPString, fInfoSDPString, fMiscSDPLines, and fStreamName.

00085                                         {
00086   deleteAllSubsessions();
00087   delete[] fStreamName;
00088   delete[] fInfoSDPString;
00089   delete[] fDescriptionSDPString;
00090   delete[] fMiscSDPLines;
00091 }


Member Function Documentation

ServerMediaSession * ServerMediaSession::createNew ( UsageEnvironment env,
char const *  streamName = NULL,
char const *  info = NULL,
char const *  description = NULL,
Boolean  isSSM = False,
char const *  miscSDPLines = NULL 
) [static]

Definition at line 34 of file ServerMediaSession.cpp.

References env.

Referenced by main().

00036                                                                               {
00037   return new ServerMediaSession(env, streamName, info, description,
00038                                 isSSM, miscSDPLines);
00039 }

Boolean ServerMediaSession::lookupByName ( UsageEnvironment env,
char const *  mediumName,
ServerMediaSession *&  resultSession 
) [static]

Definition at line 42 of file ServerMediaSession.cpp.

References env, False, Medium::isServerMediaSession(), Medium::lookupByName(), NULL, and True.

00043                                                    {
00044   resultSession = NULL; // unless we succeed
00045 
00046   Medium* medium;
00047   if (!Medium::lookupByName(env, mediumName, medium)) return False;
00048 
00049   if (!medium->isServerMediaSession()) {
00050     env.setResultMsg(mediumName, " is not a 'ServerMediaSession' object");
00051     return False;
00052   }
00053 
00054   resultSession = (ServerMediaSession*)medium;
00055   return True;
00056 }

char * ServerMediaSession::generateSDPDescription (  ) 

Definition at line 207 of file ServerMediaSession.cpp.

References duration(), Medium::envir(), fCreationTime, fDescriptionSDPString, fInfoSDPString, fIsSSM, fMiscSDPLines, MediaSubsession::fNext, fSubsessionsHead, libNameStr, libVersionStr, NULL, ourIPAddress(), strDup(), subsession, and AddressString::val().

00207                                                  {
00208   AddressString ipAddressStr(ourIPAddress(envir()));
00209   unsigned ipAddressStrSize = strlen(ipAddressStr.val());
00210 
00211   // For a SSM sessions, we need a "a=source-filter: incl ..." line also:
00212   char* sourceFilterLine;
00213   if (fIsSSM) {
00214     char const* const sourceFilterFmt =
00215       "a=source-filter: incl IN IP4 * %s\r\n"
00216       "a=rtcp-unicast: reflection\r\n";
00217     unsigned const sourceFilterFmtSize = strlen(sourceFilterFmt) + ipAddressStrSize + 1;
00218 
00219     sourceFilterLine = new char[sourceFilterFmtSize];
00220     sprintf(sourceFilterLine, sourceFilterFmt, ipAddressStr.val());
00221   } else {
00222     sourceFilterLine = strDup("");
00223   }
00224 
00225   char* rangeLine = NULL; // for now
00226   char* sdp = NULL; // for now
00227 
00228   do {
00229     // Count the lengths of each subsession's media-level SDP lines.
00230     // (We do this first, because the call to "subsession->sdpLines()"
00231     // causes correct subsession 'duration()'s to be calculated later.)
00232     unsigned sdpLength = 0;
00233     ServerMediaSubsession* subsession;
00234     for (subsession = fSubsessionsHead; subsession != NULL;
00235          subsession = subsession->fNext) {
00236       char const* sdpLines = subsession->sdpLines();
00237       if (sdpLines == NULL) continue; // the media's not available
00238       sdpLength += strlen(sdpLines);
00239     }
00240     if (sdpLength == 0) break; // the session has no usable subsessions
00241 
00242     // Unless subsessions have differing durations, we also have a "a=range:" line:
00243     float dur = duration();
00244     if (dur == 0.0) {
00245       rangeLine = strDup("a=range:npt=0-\r\n");
00246     } else if (dur > 0.0) {
00247       char buf[100];
00248       sprintf(buf, "a=range:npt=0-%.3f\r\n", dur);
00249       rangeLine = strDup(buf);
00250     } else { // subsessions have differing durations, so "a=range:" lines go there
00251       rangeLine = strDup("");
00252     }
00253 
00254     char const* const sdpPrefixFmt =
00255       "v=0\r\n"
00256       "o=- %ld%06ld %d IN IP4 %s\r\n"
00257       "s=%s\r\n"
00258       "i=%s\r\n"
00259       "t=0 0\r\n"
00260       "a=tool:%s%s\r\n"
00261       "a=type:broadcast\r\n"
00262       "a=control:*\r\n"
00263       "%s"
00264       "%s"
00265       "a=x-qt-text-nam:%s\r\n"
00266       "a=x-qt-text-inf:%s\r\n"
00267       "%s";
00268     sdpLength += strlen(sdpPrefixFmt)
00269       + 20 + 6 + 20 + ipAddressStrSize
00270       + strlen(fDescriptionSDPString)
00271       + strlen(fInfoSDPString)
00272       + strlen(libNameStr) + strlen(libVersionStr)
00273       + strlen(sourceFilterLine)
00274       + strlen(rangeLine)
00275       + strlen(fDescriptionSDPString)
00276       + strlen(fInfoSDPString)
00277       + strlen(fMiscSDPLines);
00278     sdpLength += 1000; // in case the length of the "subsession->sdpLines()" calls below change
00279     sdp = new char[sdpLength];
00280     if (sdp == NULL) break;
00281 
00282     // Generate the SDP prefix (session-level lines):
00283     snprintf(sdp, sdpLength, sdpPrefixFmt,
00284              fCreationTime.tv_sec, fCreationTime.tv_usec, // o= <session id>
00285              1, // o= <version> // (needs to change if params are modified)
00286              ipAddressStr.val(), // o= <address>
00287              fDescriptionSDPString, // s= <description>
00288              fInfoSDPString, // i= <info>
00289              libNameStr, libVersionStr, // a=tool:
00290              sourceFilterLine, // a=source-filter: incl (if a SSM session)
00291              rangeLine, // a=range: line
00292              fDescriptionSDPString, // a=x-qt-text-nam: line
00293              fInfoSDPString, // a=x-qt-text-inf: line
00294              fMiscSDPLines); // miscellaneous session SDP lines (if any)
00295 
00296     // Then, add the (media-level) lines for each subsession:
00297     char* mediaSDP = sdp;
00298     for (subsession = fSubsessionsHead; subsession != NULL;
00299          subsession = subsession->fNext) {
00300       unsigned mediaSDPLength = strlen(mediaSDP);
00301       mediaSDP += mediaSDPLength;
00302       sdpLength -= mediaSDPLength;
00303       if (sdpLength <= 1) break; // the SDP has somehow become too long
00304 
00305       char const* sdpLines = subsession->sdpLines();
00306       if (sdpLines != NULL) snprintf(mediaSDP, sdpLength, "%s", sdpLines);
00307     }
00308   } while (0);
00309 
00310   delete[] rangeLine; delete[] sourceFilterLine;
00311   return sdp;
00312 }

char const* ServerMediaSession::streamName (  )  const [inline]

Definition at line 58 of file ServerMediaSession.hh.

References fStreamName.

Referenced by RTSPServer::addServerMediaSession(), RTSPServer::RTSPClientSession::livenessTimeoutTask(), RTSPServer::RTSPClientSession::noteClientLiveness(), RTSPServer::removeServerMediaSession(), and RTSPServer::rtspURL().

00058 { return fStreamName; }

Boolean ServerMediaSession::addSubsession ( ServerMediaSubsession subsession  ) 

Definition at line 94 of file ServerMediaSession.cpp.

References False, ServerMediaSubsession::fNext, fSubsessionCounter, fSubsessionsHead, fSubsessionsTail, NULL, subsession, and True.

Referenced by ProxyServerMediaSession::continueAfterDESCRIBE(), createNewSMS(), main(), onMatroskaFileCreation(), and onOggFileCreation().

00094                                                                    {
00095   if (subsession->fParentSession != NULL) return False; // it's already used
00096 
00097   if (fSubsessionsTail == NULL) {
00098     fSubsessionsHead = subsession;
00099   } else {
00100     fSubsessionsTail->fNext = subsession;
00101   }
00102   fSubsessionsTail = subsession;
00103 
00104   subsession->fParentSession = this;
00105   subsession->fTrackNumber = ++fSubsessionCounter;
00106   return True;
00107 }

unsigned ServerMediaSession::numSubsessions (  )  const [inline]

Definition at line 61 of file ServerMediaSession.hh.

References fSubsessionCounter.

Referenced by ProxyRTSPClient::continueAfterSETUP(), onMatroskaFileCreation(), and onOggFileCreation().

00061 { return fSubsessionCounter; }

void ServerMediaSession::testScaleFactor ( float &  scale  ) 

Definition at line 109 of file ServerMediaSession.cpp.

References MediaSubsession::fNext, fSubsessionsHead, NULL, and subsession.

00109                                                      {
00110   // First, try setting all subsessions to the desired scale.
00111   // If the subsessions' actual scales differ from each other, choose the
00112   // value that's closest to 1, and then try re-setting all subsessions to that
00113   // value.  If the subsessions' actual scales still differ, re-set them all to 1.
00114   float minSSScale = 1.0;
00115   float maxSSScale = 1.0;
00116   float bestSSScale = 1.0;
00117   float bestDistanceTo1 = 0.0;
00118   ServerMediaSubsession* subsession;
00119   for (subsession = fSubsessionsHead; subsession != NULL;
00120        subsession = subsession->fNext) {
00121     float ssscale = scale;
00122     subsession->testScaleFactor(ssscale);
00123     if (subsession == fSubsessionsHead) { // this is the first subsession
00124       minSSScale = maxSSScale = bestSSScale = ssscale;
00125       bestDistanceTo1 = (float)fabs(ssscale - 1.0f);
00126     } else {
00127       if (ssscale < minSSScale) {
00128         minSSScale = ssscale;
00129       } else if (ssscale > maxSSScale) {
00130         maxSSScale = ssscale;
00131       }
00132 
00133       float distanceTo1 = (float)fabs(ssscale - 1.0f);
00134       if (distanceTo1 < bestDistanceTo1) {
00135         bestSSScale = ssscale;
00136         bestDistanceTo1 = distanceTo1;
00137       }
00138     }
00139   }
00140   if (minSSScale == maxSSScale) {
00141     // All subsessions are at the same scale: minSSScale == bestSSScale == maxSSScale
00142     scale = minSSScale;
00143     return;
00144   }
00145 
00146   // The scales for each subsession differ.  Try to set each one to the value
00147   // that's closest to 1:
00148   for (subsession = fSubsessionsHead; subsession != NULL;
00149        subsession = subsession->fNext) {
00150     float ssscale = bestSSScale;
00151     subsession->testScaleFactor(ssscale);
00152     if (ssscale != bestSSScale) break; // no luck
00153   }
00154   if (subsession == NULL) {
00155     // All subsessions are at the same scale: bestSSScale
00156     scale = bestSSScale;
00157     return;
00158   }
00159 
00160   // Still no luck.  Set each subsession's scale to 1:
00161   for (subsession = fSubsessionsHead; subsession != NULL;
00162        subsession = subsession->fNext) {
00163     float ssscale = 1;
00164     subsession->testScaleFactor(ssscale);
00165   }
00166   scale = 1;
00167 }

float ServerMediaSession::duration (  )  const

Definition at line 169 of file ServerMediaSession.cpp.

References MediaSubsession::fNext, fSubsessionsHead, NULL, and subsession.

Referenced by generateSDPDescription(), and ServerMediaSubsession::rangeSDPLine().

00169                                          {
00170   float minSubsessionDuration = 0.0;
00171   float maxSubsessionDuration = 0.0;
00172   for (ServerMediaSubsession* subsession = fSubsessionsHead; subsession != NULL;
00173        subsession = subsession->fNext) {
00174     // Hack: If any subsession supports seeking by 'absolute' time, then return a negative value, to indicate that only subsessions
00175     // will have a "a=range:" attribute:
00176     char* absStartTime = NULL; char* absEndTime = NULL;
00177     subsession->getAbsoluteTimeRange(absStartTime, absEndTime);
00178     if (absStartTime != NULL) return -1.0f;
00179 
00180     float ssduration = subsession->duration();
00181     if (subsession == fSubsessionsHead) { // this is the first subsession
00182       minSubsessionDuration = maxSubsessionDuration = ssduration;
00183     } else if (ssduration < minSubsessionDuration) {
00184         minSubsessionDuration = ssduration;
00185     } else if (ssduration > maxSubsessionDuration) {
00186         maxSubsessionDuration = ssduration;
00187     }
00188   }
00189 
00190   if (maxSubsessionDuration != minSubsessionDuration) {
00191     return -maxSubsessionDuration; // because subsession durations differ
00192   } else {
00193     return maxSubsessionDuration; // all subsession durations are the same
00194   }
00195 }

unsigned ServerMediaSession::referenceCount (  )  const [inline]

Definition at line 69 of file ServerMediaSession.hh.

References fReferenceCount.

Referenced by RTSPServer::removeServerMediaSession(), and RTSPServer::RTSPClientSession::~RTSPClientSession().

00069 { return fReferenceCount; }

void ServerMediaSession::incrementReferenceCount (  )  [inline]

Definition at line 70 of file ServerMediaSession.hh.

References fReferenceCount.

Referenced by RTSPServer::RTSPClientSession::handleCmd_SETUP().

00070 { ++fReferenceCount; }

void ServerMediaSession::decrementReferenceCount (  )  [inline]

Definition at line 71 of file ServerMediaSession.hh.

References fReferenceCount.

Referenced by RTSPServer::RTSPClientSession::~RTSPClientSession().

00071 { if (fReferenceCount > 0) --fReferenceCount; }

Boolean& ServerMediaSession::deleteWhenUnreferenced (  )  [inline]

Definition at line 72 of file ServerMediaSession.hh.

References fDeleteWhenUnreferenced.

Referenced by RTSPServer::removeServerMediaSession(), and RTSPServer::RTSPClientSession::~RTSPClientSession().

00072 { return fDeleteWhenUnreferenced; }

void ServerMediaSession::deleteAllSubsessions (  ) 

Definition at line 197 of file ServerMediaSession.cpp.

References Medium::close(), fSubsessionCounter, fSubsessionsHead, fSubsessionsTail, and NULL.

Referenced by ProxyServerMediaSession::resetDESCRIBEState(), and ~ServerMediaSession().

Boolean ServerMediaSession::isServerMediaSession (  )  const [private, virtual]

Reimplemented from Medium.

Definition at line 203 of file ServerMediaSession.cpp.

References True.

00203                                                        {
00204   return True;
00205 }

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 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(), 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(), 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(), MPEG1or2DemuxedServerMediaSubsession::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(), 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::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 ServerMediaSubsessionIterator [friend]

Definition at line 95 of file ServerMediaSession.hh.

friend class MediaLookupTable [friend, inherited]

Definition at line 74 of file Media.hh.


Field Documentation

Boolean ServerMediaSession::fIsSSM [private]

Definition at line 92 of file ServerMediaSession.hh.

Referenced by generateSDPDescription().

ServerMediaSubsession* ServerMediaSession::fSubsessionsHead [private]

Definition at line 96 of file ServerMediaSession.hh.

Referenced by addSubsession(), deleteAllSubsessions(), duration(), generateSDPDescription(), ServerMediaSubsessionIterator::reset(), and testScaleFactor().

ServerMediaSubsession* ServerMediaSession::fSubsessionsTail [private]

Definition at line 97 of file ServerMediaSession.hh.

Referenced by addSubsession(), and deleteAllSubsessions().

unsigned ServerMediaSession::fSubsessionCounter [private]

Definition at line 98 of file ServerMediaSession.hh.

Referenced by addSubsession(), deleteAllSubsessions(), and numSubsessions().

char* ServerMediaSession::fStreamName [private]

Definition at line 100 of file ServerMediaSession.hh.

Referenced by ServerMediaSession(), streamName(), and ~ServerMediaSession().

char* ServerMediaSession::fInfoSDPString [private]

Definition at line 101 of file ServerMediaSession.hh.

Referenced by generateSDPDescription(), ServerMediaSession(), and ~ServerMediaSession().

char* ServerMediaSession::fDescriptionSDPString [private]

Definition at line 102 of file ServerMediaSession.hh.

Referenced by generateSDPDescription(), ServerMediaSession(), and ~ServerMediaSession().

char* ServerMediaSession::fMiscSDPLines [private]

Definition at line 103 of file ServerMediaSession.hh.

Referenced by generateSDPDescription(), ServerMediaSession(), and ~ServerMediaSession().

struct timeval ServerMediaSession::fCreationTime [read, private]

Definition at line 104 of file ServerMediaSession.hh.

Referenced by generateSDPDescription(), and ServerMediaSession().

unsigned ServerMediaSession::fReferenceCount [private]

Definition at line 105 of file ServerMediaSession.hh.

Referenced by decrementReferenceCount(), incrementReferenceCount(), and referenceCount().

Boolean ServerMediaSession::fDeleteWhenUnreferenced [private]

Definition at line 106 of file ServerMediaSession.hh.

Referenced by deleteWhenUnreferenced().


The documentation for this class was generated from the following files:
Generated on Tue Mar 25 14:40:51 2014 for live by  doxygen 1.5.2