MPEG4LATMAudioRTPSink Class Reference

#include <MPEG4LATMAudioRTPSink.hh>

Inheritance diagram for MPEG4LATMAudioRTPSink:

Inheritance graph
[legend]
Collaboration diagram for MPEG4LATMAudioRTPSink:

Collaboration graph
[legend]

Public Types

typedef void( onSendErrorFunc )(void *clientData)
typedef void( afterPlayingFunc )(void *clientData)

Public Member Functions

void setPacketSizes (unsigned preferredPacketSize, unsigned maxPacketSize)
void setOnSendErrorFunc (onSendErrorFunc *onSendErrorFunc, void *onSendErrorFuncData)
virtual void stopPlaying ()
Groupsock const & groupsockBeingUsed () const
GroupsockgroupsockBeingUsed ()
unsigned char rtpPayloadType () const
unsigned rtpTimestampFrequency () const
void setRTPTimestampFrequency (unsigned freq)
char const * rtpPayloadFormatName () const
unsigned numChannels () const
virtual char * rtpmapLine () const
u_int16_t currentSeqNo () const
u_int32_t presetNextTimestamp ()
RTPTransmissionStatsDBtransmissionStatsDB () const
Boolean nextTimestampHasBeenPreset () const
BooleanenableRTCPReports ()
void getTotalBitrate (unsigned &outNumBytes, double &outElapsedTime)
timeval const & creationTime () const
timeval const & initialPresentationTime () const
timeval const & mostRecentPresentationTime () const
void resetPresentationTimes ()
void setStreamSocket (int sockNum, unsigned char streamChannelId)
void addStreamSocket (int sockNum, unsigned char streamChannelId)
void removeStreamSocket (int sockNum, unsigned char streamChannelId)
unsigned & estimatedBitrate ()
Boolean startPlaying (MediaSource &source, afterPlayingFunc *afterFunc, void *afterClientData)
FramedSourcesource () const
UsageEnvironmentenvir () const
char const * name () const
virtual Boolean isSource () 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 MPEG4LATMAudioRTPSinkcreateNew (UsageEnvironment &env, Groupsock *RTPgs, unsigned char rtpPayloadFormat, u_int32_t rtpTimestampFrequency, char const *streamMuxConfigString, unsigned numChannels, Boolean allowMultipleFramesPerPacket=False)
static Boolean lookupByName (UsageEnvironment &env, char const *sinkName, RTPSink *&resultSink)
static Boolean lookupByName (UsageEnvironment &env, char const *sinkName, MediaSink *&resultSink)
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

 MPEG4LATMAudioRTPSink (UsageEnvironment &env, Groupsock *RTPgs, unsigned char rtpPayloadFormat, u_int32_t rtpTimestampFrequency, char const *streamMuxConfigString, unsigned numChannels, Boolean allowMultipleFramesPerPacket)
virtual ~MPEG4LATMAudioRTPSink ()
virtual Boolean allowFragmentationAfterStart () const
virtual Boolean allowOtherFramesAfterLastFragment () const
virtual unsigned specialHeaderSize () const
virtual unsigned frameSpecificHeaderSize () const
virtual unsigned computeOverflowForNewFrame (unsigned newFrameSize) const
Boolean isFirstPacket () const
Boolean isFirstFrameInPacket () const
unsigned curFragmentationOffset () const
void setMarkerBit ()
void setTimestamp (struct timeval framePresentationTime)
void setSpecialHeaderWord (unsigned word, unsigned wordPosition=0)
void setSpecialHeaderBytes (unsigned char const *bytes, unsigned numBytes, unsigned bytePosition=0)
void setFrameSpecificHeaderWord (unsigned word, unsigned wordPosition=0)
void setFrameSpecificHeaderBytes (unsigned char const *bytes, unsigned numBytes, unsigned bytePosition=0)
void setFramePadding (unsigned numPaddingBytes)
unsigned numFramesUsedSoFar () const
unsigned ourMaxPacketSize () const
virtual Boolean continuePlaying ()
u_int32_t SSRC () const
u_int32_t convertToRTPTimestamp (struct timeval tv)
unsigned packetCount () const
unsigned octetCount () const
virtual Boolean sourceIsCompatibleWithUs (MediaSource &source)
void onSourceClosure ()
TaskTokennextTask ()

Static Protected Member Functions

static void onSourceClosure (void *clientData)

Protected Attributes

RTPInterface fRTPInterface
unsigned char fRTPPayloadType
unsigned fPacketCount
unsigned fOctetCount
unsigned fTotalOctetCount
timeval fTotalOctetCountStartTime
fInitialPresentationTime 
fMostRecentPresentationTime
u_int32_t fCurrentTimestamp
u_int16_t fSeqNo
FramedSourcefSource

Private Member Functions

virtual void doSpecialFrameHandling (unsigned fragmentationOffset, unsigned char *frameStart, unsigned numBytesInFrame, struct timeval framePresentationTime, unsigned numRemainingBytes)
virtual Boolean frameCanAppearAfterPacketStart (unsigned char const *frameStart, unsigned numBytesInFrame) const
virtual char const * auxSDPLine ()

Private Attributes

char const * fStreamMuxConfigString
char * fFmtpSDPLine
Boolean fAllowMultipleFramesPerPacket

Friends

class RTCPInstance
class RTPTransmissionStats
class MediaLookupTable

Detailed Description

Definition at line 30 of file MPEG4LATMAudioRTPSink.hh.


Member Typedef Documentation

typedef void( MultiFramedRTPSink::onSendErrorFunc)(void *clientData) [inherited]

Definition at line 33 of file MultiFramedRTPSink.hh.

typedef void( MediaSink::afterPlayingFunc)(void *clientData) [inherited]

Definition at line 33 of file MediaSink.hh.


Constructor & Destructor Documentation

MPEG4LATMAudioRTPSink::MPEG4LATMAudioRTPSink ( UsageEnvironment env,
Groupsock RTPgs,
unsigned char  rtpPayloadFormat,
u_int32_t  rtpTimestampFrequency,
char const *  streamMuxConfigString,
unsigned  numChannels,
Boolean  allowMultipleFramesPerPacket 
) [protected]

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

Definition at line 49 of file MPEG4LATMAudioRTPSink.cpp.

References fFmtpSDPLine, and fStreamMuxConfigString.

00049                                               {
00050   delete[] fFmtpSDPLine;
00051   delete[] (char*)fStreamMuxConfigString;
00052 }


Member Function Documentation

static MPEG4LATMAudioRTPSink* MPEG4LATMAudioRTPSink::createNew ( UsageEnvironment env,
Groupsock RTPgs,
unsigned char  rtpPayloadFormat,
u_int32_t  rtpTimestampFrequency,
char const *  streamMuxConfigString,
unsigned  numChannels,
Boolean  allowMultipleFramesPerPacket = False 
) [static]

Referenced by ProxyServerMediaSubsession::createNewRTPSink().

void MPEG4LATMAudioRTPSink::doSpecialFrameHandling ( unsigned  fragmentationOffset,
unsigned char *  frameStart,
unsigned  numBytesInFrame,
struct timeval  framePresentationTime,
unsigned  numRemainingBytes 
) [private, virtual]

Reimplemented from MultiFramedRTPSink.

Definition at line 74 of file MPEG4LATMAudioRTPSink.cpp.

References MultiFramedRTPSink::doSpecialFrameHandling(), and MultiFramedRTPSink::setMarkerBit().

00078                                                      {
00079   if (numRemainingBytes == 0) {
00080     // This packet contains the last (or only) fragment of the frame.
00081     // Set the RTP 'M' ('marker') bit:
00082     setMarkerBit();
00083   }
00084 
00085   // Important: Also call our base class's doSpecialFrameHandling(),
00086   // to set the packet's timestamp:
00087   MultiFramedRTPSink::doSpecialFrameHandling(fragmentationOffset,
00088                                              frameStart, numBytesInFrame,
00089                                              framePresentationTime,
00090                                              numRemainingBytes);
00091 }

Boolean MPEG4LATMAudioRTPSink::frameCanAppearAfterPacketStart ( unsigned char const *  frameStart,
unsigned  numBytesInFrame 
) const [private, virtual]

Reimplemented from MultiFramedRTPSink.

Definition at line 68 of file MPEG4LATMAudioRTPSink.cpp.

References fAllowMultipleFramesPerPacket.

00069                                                                      {
00070   return fAllowMultipleFramesPerPacket;
00071 }

char const * MPEG4LATMAudioRTPSink::auxSDPLine (  )  [private, virtual]

Reimplemented from RTPSink.

Definition at line 93 of file MPEG4LATMAudioRTPSink.cpp.

References fFmtpSDPLine.

00093                                               {
00094   return fFmtpSDPLine;
00095 }

void MultiFramedRTPSink::setPacketSizes ( unsigned  preferredPacketSize,
unsigned  maxPacketSize 
) [inherited]

Definition at line 27 of file MultiFramedRTPSink.cpp.

References MultiFramedRTPSink::fOurMaxPacketSize, and MultiFramedRTPSink::fOutBuf.

Referenced by MultiFramedRTPSink::MultiFramedRTPSink().

00028                                                                 {
00029   if (preferredPacketSize > maxPacketSize || preferredPacketSize == 0) return;
00030       // sanity check
00031 
00032   delete fOutBuf;
00033   fOutBuf = new OutPacketBuffer(preferredPacketSize, maxPacketSize);
00034   fOurMaxPacketSize = maxPacketSize; // save value, in case subclasses need it
00035 }

void MultiFramedRTPSink::setOnSendErrorFunc ( onSendErrorFunc onSendErrorFunc,
void *  onSendErrorFuncData 
) [inline, inherited]

Definition at line 34 of file MultiFramedRTPSink.hh.

References MultiFramedRTPSink::fOnSendErrorData, and MultiFramedRTPSink::fOnSendErrorFunc.

00034                                                                                        {
00035     // Can be used to set a callback function to be called if there's an error sending RTP packets on our socket.
00036     fOnSendErrorFunc = onSendErrorFunc;
00037     fOnSendErrorData = onSendErrorFuncData;
00038   }

Boolean MultiFramedRTPSink::allowFragmentationAfterStart (  )  const [protected, virtual, inherited]

Reimplemented in MPEG1or2VideoRTPSink, and MPEG4ESVideoRTPSink.

Definition at line 69 of file MultiFramedRTPSink.cpp.

References False.

Referenced by MultiFramedRTPSink::afterGettingFrame1().

00069                                                                {
00070   return False; // by default
00071 }

Boolean MultiFramedRTPSink::allowOtherFramesAfterLastFragment (  )  const [protected, virtual, inherited]

Definition at line 73 of file MultiFramedRTPSink.cpp.

References False.

Referenced by MultiFramedRTPSink::afterGettingFrame1().

00073                                                                     {
00074   return False; // by default
00075 }

unsigned MultiFramedRTPSink::specialHeaderSize (  )  const [protected, virtual, inherited]

Reimplemented in AC3AudioRTPSink, AMRAudioRTPSink, H263plusVideoRTPSink, JPEGVideoRTPSink, MP3ADURTPSink, MPEG1or2AudioRTPSink, MPEG1or2VideoRTPSink, MPEG4GenericRTPSink, TheoraVideoRTPSink, VorbisAudioRTPSink, and VP8VideoRTPSink.

Definition at line 83 of file MultiFramedRTPSink.cpp.

Referenced by MultiFramedRTPSink::buildAndSendPacket(), and MultiFramedRTPSink::isTooBigForAPacket().

00083                                                      {
00084   // default implementation: Assume no special header:
00085   return 0;
00086 }

unsigned MultiFramedRTPSink::frameSpecificHeaderSize (  )  const [protected, virtual, inherited]

Reimplemented in VorbisAudioRTPSink.

Definition at line 88 of file MultiFramedRTPSink.cpp.

Referenced by MultiFramedRTPSink::isTooBigForAPacket(), MultiFramedRTPSink::packFrame(), and MultiFramedRTPSink::sendPacketIfNecessary().

00088                                                            {
00089   // default implementation: Assume no frame-specific header:
00090   return 0;
00091 }

unsigned MultiFramedRTPSink::computeOverflowForNewFrame ( unsigned  newFrameSize  )  const [protected, virtual, inherited]

Reimplemented in DVVideoRTPSink.

Definition at line 93 of file MultiFramedRTPSink.cpp.

References MultiFramedRTPSink::fOutBuf, and OutPacketBuffer::numOverflowBytes().

Referenced by MultiFramedRTPSink::afterGettingFrame1(), and DVVideoRTPSink::computeOverflowForNewFrame().

00093                                                                                    {
00094   // default implementation: Just call numOverflowBytes()
00095   return fOutBuf->numOverflowBytes(newFrameSize);
00096 }

Boolean MultiFramedRTPSink::isFirstPacket (  )  const [inline, protected, inherited]

Definition at line 77 of file MultiFramedRTPSink.hh.

References MultiFramedRTPSink::fIsFirstPacket.

Referenced by MPEG1or2AudioRTPSink::doSpecialFrameHandling(), and AMRAudioRTPSink::doSpecialFrameHandling().

00077 { return fIsFirstPacket; }

Boolean MultiFramedRTPSink::isFirstFrameInPacket (  )  const [inline, protected, inherited]

Definition at line 78 of file MultiFramedRTPSink.hh.

References MultiFramedRTPSink::fNumFramesUsedSoFar.

Referenced by MultiFramedRTPSink::doSpecialFrameHandling(), MPEG1or2VideoRTPSink::doSpecialFrameHandling(), MPEG1or2AudioRTPSink::doSpecialFrameHandling(), and AMRAudioRTPSink::doSpecialFrameHandling().

00078 { return fNumFramesUsedSoFar == 0; }

unsigned MultiFramedRTPSink::curFragmentationOffset (  )  const [inline, protected, inherited]

Definition at line 79 of file MultiFramedRTPSink.hh.

References MultiFramedRTPSink::fCurFragmentationOffset.

Referenced by MultiFramedRTPSink::afterGettingFrame1(), MP3ADURTPSink::specialHeaderSize(), JPEGVideoRTPSink::specialHeaderSize(), and H263plusVideoRTPSink::specialHeaderSize().

00079 { return fCurFragmentationOffset; }

void MultiFramedRTPSink::setMarkerBit (  )  [protected, inherited]

Definition at line 98 of file MultiFramedRTPSink.cpp.

References OutPacketBuffer::extractWord(), MultiFramedRTPSink::fOutBuf, and OutPacketBuffer::insertWord().

Referenced by VP8VideoRTPSink::doSpecialFrameHandling(), TheoraVideoRTPSink::doSpecialFrameHandling(), T140TextRTPSink::doSpecialFrameHandling(), SimpleRTPSink::doSpecialFrameHandling(), doSpecialFrameHandling(), MPEG4GenericRTPSink::doSpecialFrameHandling(), MPEG4ESVideoRTPSink::doSpecialFrameHandling(), MPEG1or2VideoRTPSink::doSpecialFrameHandling(), MPEG1or2AudioRTPSink::doSpecialFrameHandling(), JPEGVideoRTPSink::doSpecialFrameHandling(), H264or5VideoRTPSink::doSpecialFrameHandling(), H263plusVideoRTPSink::doSpecialFrameHandling(), DVVideoRTPSink::doSpecialFrameHandling(), AMRAudioRTPSink::doSpecialFrameHandling(), and AC3AudioRTPSink::doSpecialFrameHandling().

00098                                       {
00099   unsigned rtpHdr = fOutBuf->extractWord(0);
00100   rtpHdr |= 0x00800000;
00101   fOutBuf->insertWord(rtpHdr, 0);
00102 }

void MultiFramedRTPSink::setTimestamp ( struct timeval  framePresentationTime  )  [protected, inherited]

Definition at line 104 of file MultiFramedRTPSink.cpp.

References RTPSink::convertToRTPTimestamp(), RTPSink::fCurrentTimestamp, MultiFramedRTPSink::fOutBuf, MultiFramedRTPSink::fTimestampPosition, and OutPacketBuffer::insertWord().

Referenced by VP8VideoRTPSink::doSpecialFrameHandling(), T140TextRTPSink::doSpecialFrameHandling(), MultiFramedRTPSink::doSpecialFrameHandling(), MPEG4ESVideoRTPSink::doSpecialFrameHandling(), MPEG1or2VideoRTPSink::doSpecialFrameHandling(), JPEGVideoRTPSink::doSpecialFrameHandling(), H264or5VideoRTPSink::doSpecialFrameHandling(), H263plusVideoRTPSink::doSpecialFrameHandling(), and DVVideoRTPSink::doSpecialFrameHandling().

00104                                                                           {
00105   // First, convert the presentation time to a 32-bit RTP timestamp:
00106   fCurrentTimestamp = convertToRTPTimestamp(framePresentationTime);
00107 
00108   // Then, insert it into the RTP packet:
00109   fOutBuf->insertWord(fCurrentTimestamp, fTimestampPosition);
00110 }

void MultiFramedRTPSink::setSpecialHeaderWord ( unsigned  word,
unsigned  wordPosition = 0 
) [protected, inherited]

Definition at line 112 of file MultiFramedRTPSink.cpp.

References MultiFramedRTPSink::fOutBuf, MultiFramedRTPSink::fSpecialHeaderPosition, and OutPacketBuffer::insertWord().

Referenced by MPEG1or2VideoRTPSink::doSpecialFrameHandling(), and MPEG1or2AudioRTPSink::doSpecialFrameHandling().

00113                                                                      {
00114   fOutBuf->insertWord(word, fSpecialHeaderPosition + 4*wordPosition);
00115 }

void MultiFramedRTPSink::setSpecialHeaderBytes ( unsigned char const *  bytes,
unsigned  numBytes,
unsigned  bytePosition = 0 
) [protected, inherited]

Definition at line 117 of file MultiFramedRTPSink.cpp.

References MultiFramedRTPSink::fOutBuf, MultiFramedRTPSink::fSpecialHeaderPosition, and OutPacketBuffer::insert().

Referenced by VP8VideoRTPSink::doSpecialFrameHandling(), VorbisAudioRTPSink::doSpecialFrameHandling(), TheoraVideoRTPSink::doSpecialFrameHandling(), MPEG4GenericRTPSink::doSpecialFrameHandling(), MP3ADURTPSink::doSpecialFrameHandling(), JPEGVideoRTPSink::doSpecialFrameHandling(), H263plusVideoRTPSink::doSpecialFrameHandling(), AMRAudioRTPSink::doSpecialFrameHandling(), and AC3AudioRTPSink::doSpecialFrameHandling().

00119                                                                       {
00120   fOutBuf->insert(bytes, numBytes, fSpecialHeaderPosition + bytePosition);
00121 }

void MultiFramedRTPSink::setFrameSpecificHeaderWord ( unsigned  word,
unsigned  wordPosition = 0 
) [protected, inherited]

Definition at line 123 of file MultiFramedRTPSink.cpp.

References MultiFramedRTPSink::fCurFrameSpecificHeaderPosition, MultiFramedRTPSink::fOutBuf, and OutPacketBuffer::insertWord().

00124                                                                            {
00125   fOutBuf->insertWord(word, fCurFrameSpecificHeaderPosition + 4*wordPosition);
00126 }

void MultiFramedRTPSink::setFrameSpecificHeaderBytes ( unsigned char const *  bytes,
unsigned  numBytes,
unsigned  bytePosition = 0 
) [protected, inherited]

Definition at line 128 of file MultiFramedRTPSink.cpp.

References MultiFramedRTPSink::fCurFrameSpecificHeaderPosition, MultiFramedRTPSink::fOutBuf, and OutPacketBuffer::insert().

Referenced by VorbisAudioRTPSink::doSpecialFrameHandling().

00130                                                                             {
00131   fOutBuf->insert(bytes, numBytes, fCurFrameSpecificHeaderPosition + bytePosition);
00132 }

void MultiFramedRTPSink::setFramePadding ( unsigned  numPaddingBytes  )  [protected, inherited]

Definition at line 134 of file MultiFramedRTPSink.cpp.

References OutPacketBuffer::enqueue(), OutPacketBuffer::extractWord(), MultiFramedRTPSink::fOutBuf, and OutPacketBuffer::insertWord().

00134                                                                  {
00135   if (numPaddingBytes > 0) {
00136     // Add the padding bytes (with the last one being the padding size):
00137     unsigned char paddingBuffer[255]; //max padding
00138     memset(paddingBuffer, 0, numPaddingBytes);
00139     paddingBuffer[numPaddingBytes-1] = numPaddingBytes;
00140     fOutBuf->enqueue(paddingBuffer, numPaddingBytes);
00141 
00142     // Set the RTP padding bit:
00143     unsigned rtpHdr = fOutBuf->extractWord(0);
00144     rtpHdr |= 0x20000000;
00145     fOutBuf->insertWord(rtpHdr, 0);
00146   }
00147 }

unsigned MultiFramedRTPSink::numFramesUsedSoFar (  )  const [inline, protected, inherited]

Definition at line 91 of file MultiFramedRTPSink.hh.

References MultiFramedRTPSink::fNumFramesUsedSoFar.

Referenced by VorbisAudioRTPSink::doSpecialFrameHandling(), TheoraVideoRTPSink::doSpecialFrameHandling(), AMRAudioRTPSink::doSpecialFrameHandling(), VorbisAudioRTPSink::frameCanAppearAfterPacketStart(), and GSMAudioRTPSink::frameCanAppearAfterPacketStart().

00091 { return fNumFramesUsedSoFar; }

unsigned MultiFramedRTPSink::ourMaxPacketSize (  )  const [inline, protected, inherited]

Definition at line 92 of file MultiFramedRTPSink.hh.

References MultiFramedRTPSink::fOurMaxPacketSize.

Referenced by H264or5VideoRTPSink::continuePlaying().

00092 { return fOurMaxPacketSize; }

void MultiFramedRTPSink::stopPlaying (  )  [virtual, inherited]

Reimplemented from MediaSink.

Definition at line 156 of file MultiFramedRTPSink.cpp.

References MultiFramedRTPSink::fOutBuf, OutPacketBuffer::resetOffset(), OutPacketBuffer::resetOverflowData(), OutPacketBuffer::resetPacketStart(), and MediaSink::stopPlaying().

Referenced by H264or5VideoRTPSink::~H264or5VideoRTPSink(), and T140TextRTPSink::~T140TextRTPSink().

00156                                      {
00157   fOutBuf->resetPacketStart();
00158   fOutBuf->resetOffset();
00159   fOutBuf->resetOverflowData();
00160 
00161   // Then call the default "stopPlaying()" function:
00162   MediaSink::stopPlaying();
00163 }

Boolean MultiFramedRTPSink::continuePlaying (  )  [protected, virtual, inherited]

Implements MediaSink.

Reimplemented in H264or5VideoRTPSink, and T140TextRTPSink.

Definition at line 149 of file MultiFramedRTPSink.cpp.

References MultiFramedRTPSink::buildAndSendPacket(), and True.

Referenced by T140TextRTPSink::continuePlaying(), and H264or5VideoRTPSink::continuePlaying().

00149                                             {
00150   // Send the first packet.
00151   // (This will also schedule any future sends.)
00152   buildAndSendPacket(True);
00153   return True;
00154 }

Boolean RTPSink::lookupByName ( UsageEnvironment env,
char const *  sinkName,
RTPSink *&  resultSink 
) [static, inherited]

Definition at line 26 of file RTPSink.cpp.

References env, False, RTPSink::isRTPSink(), MediaSink::lookupByName(), NULL, sink, and True.

00027                                                       {
00028   resultSink = NULL; // unless we succeed
00029 
00030   MediaSink* sink;
00031   if (!MediaSink::lookupByName(env, sinkName, sink)) return False;
00032 
00033   if (!sink->isRTPSink()) {
00034     env.setResultMsg(sinkName, " is not a RTP sink");
00035     return False;
00036   }
00037 
00038   resultSink = (RTPSink*)sink;
00039   return True;
00040 }

Boolean MediaSink::lookupByName ( UsageEnvironment env,
char const *  sinkName,
MediaSink *&  resultSink 
) [static, inherited]

Definition at line 39 of file MediaSink.cpp.

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

Referenced by RTPSink::lookupByName().

00040                                                         {
00041   resultSink = NULL; // unless we succeed
00042 
00043   Medium* medium;
00044   if (!Medium::lookupByName(env, sinkName, medium)) return False;
00045 
00046   if (!medium->isSink()) {
00047     env.setResultMsg(sinkName, " is not a media sink");
00048     return False;
00049   }
00050 
00051   resultSink = (MediaSink*)medium;
00052   return True;
00053 }

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 }

Groupsock const& RTPSink::groupsockBeingUsed (  )  const [inline, inherited]

Definition at line 39 of file RTPSink.hh.

References RTPSink::fRTPInterface, and RTPInterface::gs().

Referenced by PassiveServerMediaSubsession::getStreamParameters(), PassiveServerMediaSubsession::rtcpIsMuxed(), PassiveServerMediaSubsession::sdpLines(), and PassiveServerMediaSubsession::startStream().

00039 { return *(fRTPInterface.gs()); }

Groupsock& RTPSink::groupsockBeingUsed (  )  [inline, inherited]

Definition at line 40 of file RTPSink.hh.

References RTPSink::fRTPInterface, and RTPInterface::gs().

00040 { return *(fRTPInterface.gs()); }

unsigned char RTPSink::rtpPayloadType (  )  const [inline, inherited]

Definition at line 42 of file RTPSink.hh.

References RTPSink::fRTPPayloadType.

Referenced by MPEG4ESVideoRTPSink::auxSDPLine(), H265VideoRTPSink::auxSDPLine(), H264VideoRTPSink::auxSDPLine(), AMRAudioRTPSink::auxSDPLine(), DVVideoRTPSink::auxSDPLineFromFramer(), RTPSink::rtpmapLine(), PassiveServerMediaSubsession::sdpLines(), OnDemandServerMediaSubsession::setSDPLinesFromRTPSink(), and SubstreamDescriptor::SubstreamDescriptor().

00042 { return fRTPPayloadType; }

unsigned RTPSink::rtpTimestampFrequency (  )  const [inline, inherited]

Definition at line 43 of file RTPSink.hh.

References RTPSink::fTimestampFrequency.

Referenced by RTPSink::rtpmapLine(), and SubstreamDescriptor::SubstreamDescriptor().

00043 { return fTimestampFrequency; }

void RTPSink::setRTPTimestampFrequency ( unsigned  freq  )  [inline, inherited]

Definition at line 44 of file RTPSink.hh.

References RTPSink::fTimestampFrequency.

00044                                                {
00045     fTimestampFrequency = freq;
00046   }

char const* RTPSink::rtpPayloadFormatName (  )  const [inline, inherited]

Definition at line 47 of file RTPSink.hh.

References RTPSink::fRTPPayloadFormatName.

Referenced by RTPSink::rtpmapLine(), and SubstreamDescriptor::SubstreamDescriptor().

00047 {return fRTPPayloadFormatName;}

unsigned RTPSink::numChannels (  )  const [inline, inherited]

Definition at line 49 of file RTPSink.hh.

References RTPSink::fNumChannels.

Referenced by RTPSink::rtpmapLine(), AMRAudioRTPSink::sourceIsCompatibleWithUs(), and SubstreamDescriptor::SubstreamDescriptor().

00049 { return fNumChannels; }

char * RTPSink::rtpmapLine (  )  const [virtual, inherited]

Definition at line 130 of file RTPSink.cpp.

References RTPSink::numChannels(), RTPSink::rtpPayloadFormatName(), RTPSink::rtpPayloadType(), RTPSink::rtpTimestampFrequency(), and strDup().

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

00130                                 {
00131   if (rtpPayloadType() >= 96) { // the payload format type is dynamic
00132     char* encodingParamsPart;
00133     if (numChannels() != 1) {
00134       encodingParamsPart = new char[1 + 20 /* max int len */];
00135       sprintf(encodingParamsPart, "/%d", numChannels());
00136     } else {
00137       encodingParamsPart = strDup("");
00138     }
00139     char const* const rtpmapFmt = "a=rtpmap:%d %s/%d%s\r\n";
00140     unsigned rtpmapFmtSize = strlen(rtpmapFmt)
00141       + 3 /* max char len */ + strlen(rtpPayloadFormatName())
00142       + 20 /* max int len */ + strlen(encodingParamsPart);
00143     char* rtpmapLine = new char[rtpmapFmtSize];
00144     sprintf(rtpmapLine, rtpmapFmt,
00145             rtpPayloadType(), rtpPayloadFormatName(),
00146             rtpTimestampFrequency(), encodingParamsPart);
00147     delete[] encodingParamsPart;
00148 
00149     return rtpmapLine;
00150   } else {
00151     // The payload format is staic, so there's no "a=rtpmap:" line:
00152     return strDup("");
00153   }
00154 }

u_int16_t RTPSink::currentSeqNo (  )  const [inline, inherited]

Definition at line 56 of file RTPSink.hh.

References RTPSink::fSeqNo.

Referenced by PassiveServerMediaSubsession::startStream(), and OnDemandServerMediaSubsession::startStream().

00056 { return fSeqNo; }

u_int32_t RTPSink::presetNextTimestamp (  )  [inherited]

Definition at line 97 of file RTPSink.cpp.

References RTPSink::convertToRTPTimestamp(), RTPSink::fNextTimestampHasBeenPreset, RTPSink::fTimestampBase, NULL, and True.

Referenced by PassiveServerMediaSubsession::startStream(), and OnDemandServerMediaSubsession::startStream().

00097                                        {
00098   struct timeval timeNow;
00099   gettimeofday(&timeNow, NULL);
00100 
00101   u_int32_t tsNow = convertToRTPTimestamp(timeNow);
00102   fTimestampBase = tsNow;
00103   fNextTimestampHasBeenPreset = True;
00104 
00105   return tsNow;
00106 }

RTPTransmissionStatsDB& RTPSink::transmissionStatsDB (  )  const [inline, inherited]

Definition at line 61 of file RTPSink.hh.

References RTPSink::fTransmissionStatsDB.

Referenced by RTCPInstance::processIncomingReport(), and RTCPInstance::removeSSRC().

00061                                                       {
00062     return *fTransmissionStatsDB;
00063   }

Boolean RTPSink::nextTimestampHasBeenPreset (  )  const [inline, inherited]

Definition at line 65 of file RTPSink.hh.

References RTPSink::fNextTimestampHasBeenPreset.

Referenced by RTCPInstance::addReport().

00065 { return fNextTimestampHasBeenPreset; }

Boolean& RTPSink::enableRTCPReports (  )  [inline, inherited]

Definition at line 66 of file RTPSink.hh.

References RTPSink::fEnableRTCPReports.

Referenced by RTCPInstance::addReport(), ProxyServerMediaSubsession::createNewRTPSink(), and PresentationTimeSessionNormalizer::normalizePresentationTime().

00066 { return fEnableRTCPReports; }

void RTPSink::getTotalBitrate ( unsigned &  outNumBytes,
double &  outElapsedTime 
) [inherited]

Definition at line 108 of file RTPSink.cpp.

References RTPSink::fTotalOctetCount, and NULL.

00108                                                                            {
00109   struct timeval timeNow;
00110   gettimeofday(&timeNow, NULL);
00111 
00112   outNumBytes = fTotalOctetCount;
00113   outElapsedTime = (double)(timeNow.tv_sec-fTotalOctetCountStartTime.tv_sec)
00114     + (timeNow.tv_usec-fTotalOctetCountStartTime.tv_usec)/1000000.0;
00115 
00116   fTotalOctetCount = 0;
00117   fTotalOctetCountStartTime = timeNow;
00118 }

struct timeval const& RTPSink::creationTime (  )  const [inline, read, inherited]

Definition at line 72 of file RTPSink.hh.

References RTPSink::fCreationTime.

Referenced by PassiveServerMediaSubsession::getCurrentNPT().

00072 { return fCreationTime; }

struct timeval const& RTPSink::initialPresentationTime (  )  const [inline, read, inherited]

Definition at line 73 of file RTPSink.hh.

Referenced by OnDemandServerMediaSubsession::getCurrentNPT().

00073 { return fInitialPresentationTime; }

struct timeval const& RTPSink::mostRecentPresentationTime (  )  const [inline, read, inherited]

Definition at line 74 of file RTPSink.hh.

References RTPSink::fMostRecentPresentationTime.

Referenced by OnDemandServerMediaSubsession::getCurrentNPT().

00074 { return fMostRecentPresentationTime; }

void RTPSink::resetPresentationTimes (  )  [inherited]

Definition at line 120 of file RTPSink.cpp.

References RTPSink::fMostRecentPresentationTime.

Referenced by OnDemandServerMediaSubsession::nullSeekStream(), and OnDemandServerMediaSubsession::seekStream().

00120                                      {
00121   fInitialPresentationTime.tv_sec = fMostRecentPresentationTime.tv_sec = 0;
00122   fInitialPresentationTime.tv_usec = fMostRecentPresentationTime.tv_usec = 0;
00123 }

void RTPSink::setStreamSocket ( int  sockNum,
unsigned char  streamChannelId 
) [inline, inherited]

Definition at line 78 of file RTPSink.hh.

References RTPSink::fRTPInterface, and RTPInterface::setStreamSocket().

Referenced by DarwinInjector::setDestination().

00078                                                                    {
00079     fRTPInterface.setStreamSocket(sockNum, streamChannelId);
00080   }

void RTPSink::addStreamSocket ( int  sockNum,
unsigned char  streamChannelId 
) [inline, inherited]

Definition at line 81 of file RTPSink.hh.

References RTPInterface::addStreamSocket(), and RTPSink::fRTPInterface.

Referenced by StreamState::startPlaying().

00081                                                                    {
00082     fRTPInterface.addStreamSocket(sockNum, streamChannelId);
00083   }

void RTPSink::removeStreamSocket ( int  sockNum,
unsigned char  streamChannelId 
) [inline, inherited]

Definition at line 84 of file RTPSink.hh.

References RTPSink::fRTPInterface, and RTPInterface::removeStreamSocket().

Referenced by StreamState::endPlaying().

00084                                                                       {
00085     fRTPInterface.removeStreamSocket(sockNum, streamChannelId);
00086   }

unsigned& RTPSink::estimatedBitrate (  )  [inline, inherited]

Definition at line 87 of file RTPSink.hh.

References RTPSink::fEstimatedBitrate.

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

00087 { return fEstimatedBitrate; } // kbps; usually 0 (i.e., unset)

u_int32_t RTPSink::SSRC (  )  const [inline, protected, inherited]

Definition at line 102 of file RTPSink.hh.

References RTPSink::fSSRC.

Referenced by RTCPInstance::addBYE(), RTCPInstance::addSDES(), RTCPInstance::addSR(), MultiFramedRTPSink::buildAndSendPacket(), and RTCPInstance::processIncomingReport().

00102 {return fSSRC;}

u_int32_t RTPSink::convertToRTPTimestamp ( struct timeval  tv  )  [protected, inherited]

Definition at line 74 of file RTPSink.cpp.

References False, RTPSink::fNextTimestampHasBeenPreset, RTPSink::fTimestampBase, and RTPSink::fTimestampFrequency.

Referenced by RTCPInstance::addSR(), RTPSink::presetNextTimestamp(), and MultiFramedRTPSink::setTimestamp().

00074                                                           {
00075   // Begin by converting from "struct timeval" units to RTP timestamp units:
00076   u_int32_t timestampIncrement = (fTimestampFrequency*tv.tv_sec);
00077   timestampIncrement += (u_int32_t)(fTimestampFrequency*(tv.tv_usec/1000000.0) + 0.5); // note: rounding
00078 
00079   // Then add this to our 'timestamp base':
00080   if (fNextTimestampHasBeenPreset) {
00081     // Make the returned timestamp the same as the current "fTimestampBase",
00082     // so that timestamps begin with the value that was previously preset:
00083     fTimestampBase -= timestampIncrement;
00084     fNextTimestampHasBeenPreset = False;
00085   }
00086 
00087   u_int32_t const rtpTimestamp = fTimestampBase + timestampIncrement;
00088 #ifdef DEBUG_TIMESTAMPS
00089   fprintf(stderr, "fTimestampBase: 0x%08x, tv: %lu.%06ld\n\t=> RTP timestamp: 0x%08x\n",
00090           fTimestampBase, tv.tv_sec, tv.tv_usec, rtpTimestamp);
00091   fflush(stderr);
00092 #endif
00093 
00094   return rtpTimestamp;
00095 }

unsigned RTPSink::packetCount (  )  const [inline, protected, inherited]

Definition at line 105 of file RTPSink.hh.

References RTPSink::fPacketCount.

Referenced by RTCPInstance::addSR(), RTPTransmissionStats::noteIncomingRR(), and RTPTransmissionStats::RTPTransmissionStats().

00105 {return fPacketCount;}

unsigned RTPSink::octetCount (  )  const [inline, protected, inherited]

Definition at line 106 of file RTPSink.hh.

References RTPSink::fOctetCount.

Referenced by RTCPInstance::addSR(), RTPTransmissionStats::noteIncomingRR(), and RTPTransmissionStats::RTPTransmissionStats().

00106 {return fOctetCount;}

Boolean MediaSink::startPlaying ( MediaSource source,
afterPlayingFunc afterFunc,
void *  afterClientData 
) [inherited]

Definition at line 60 of file MediaSink.cpp.

References MediaSink::continuePlaying(), Medium::envir(), MediaSink::fAfterClientData, MediaSink::fAfterFunc, False, MediaSink::fSource, NULL, UsageEnvironment::setResultMsg(), MediaSink::source(), and MediaSink::sourceIsCompatibleWithUs().

Referenced by createOutputFiles(), MPEG4VideoFileServerMediaSubsession::getAuxSDPLine(), H265VideoFileServerMediaSubsession::getAuxSDPLine(), H264VideoFileServerMediaSubsession::getAuxSDPLine(), getMPEG1or2TimeCode(), main(), play(), StreamState::startPlaying(), startReplicaFileSink(), and startReplicaUDPSink().

00062                                                        {
00063   // Make sure we're not already being played:
00064   if (fSource != NULL) {
00065     envir().setResultMsg("This sink is already being played");
00066     return False;
00067   }
00068 
00069   // Make sure our source is compatible:
00070   if (!sourceIsCompatibleWithUs(source)) {
00071     envir().setResultMsg("MediaSink::startPlaying(): source is not compatible!");
00072     return False;
00073   }
00074   fSource = (FramedSource*)&source;
00075 
00076   fAfterFunc = afterFunc;
00077   fAfterClientData = afterClientData;
00078   return continuePlaying();
00079 }

FramedSource* MediaSink::source (  )  const [inline, inherited]

Definition at line 42 of file MediaSink.hh.

References MediaSink::fSource.

Referenced by AMRAudioFileSink::afterGettingFrame(), JPEGVideoRTPSink::doSpecialFrameHandling(), MPEG4ESVideoRTPSink::sourceIsCompatibleWithUs(), MPEG1or2VideoRTPSink::sourceIsCompatibleWithUs(), MediaSink::sourceIsCompatibleWithUs(), JPEGVideoRTPSink::sourceIsCompatibleWithUs(), H265VideoRTPSink::sourceIsCompatibleWithUs(), H264VideoRTPSink::sourceIsCompatibleWithUs(), DVVideoRTPSink::sourceIsCompatibleWithUs(), AMRAudioRTPSink::sourceIsCompatibleWithUs(), AMRAudioFileSink::sourceIsCompatibleWithUs(), JPEGVideoRTPSink::specialHeaderSize(), and MediaSink::startPlaying().

00042 {return fSource;}

Boolean MediaSink::sourceIsCompatibleWithUs ( MediaSource source  )  [protected, virtual, inherited]

Reimplemented in AMRAudioFileSink, AMRAudioRTPSink, DVVideoRTPSink, H264VideoRTPSink, H265VideoRTPSink, JPEGVideoRTPSink, MPEG1or2VideoRTPSink, and MPEG4ESVideoRTPSink.

Definition at line 55 of file MediaSink.cpp.

References FramedSource::isFramedSource(), and MediaSink::source().

Referenced by MediaSink::startPlaying().

00055                                                                {
00056   // We currently support only framed sources.
00057   return source.isFramedSource();
00058 }

void MediaSink::onSourceClosure ( void *  clientData  )  [static, protected, inherited]

Definition at line 92 of file MediaSink.cpp.

References MediaSink::onSourceClosure(), and sink.

Referenced by MediaSink::onSourceClosure().

00092                                                 {
00093   MediaSink* sink = (MediaSink*)clientData;
00094   sink->onSourceClosure();
00095 }

void MediaSink::onSourceClosure (  )  [protected, inherited]

Definition at line 97 of file MediaSink.cpp.

References Medium::envir(), MediaSink::fAfterClientData, MediaSink::fAfterFunc, MediaSink::fSource, Medium::nextTask(), NULL, UsageEnvironment::taskScheduler(), and TaskScheduler::unscheduleDelayedTask().

Referenced by FileSink::afterGettingFrame(), MFSD_DummySink::afterGettingFrame1(), DummySink::continuePlaying(), MFSD_DummySink::continuePlaying(), FileSink::continuePlaying(), BasicUDPSink::continuePlaying1(), OggFileSink::ourOnSourceClosure(), TCPStreamSink::processBuffer(), and MultiFramedRTPSink::sendPacketIfNecessary().

00097                                 {
00098   // Cancel any pending tasks:
00099   envir().taskScheduler().unscheduleDelayedTask(nextTask());
00100 
00101   fSource = NULL; // indicates that we can be played again
00102   if (fAfterFunc != NULL) {
00103     (*fAfterFunc)(fAfterClientData);
00104   }
00105 }

void Medium::close ( UsageEnvironment env,
char const *  mediumName 
) [static, inherited]

Definition at line 52 of file Media.cpp.

References env, MediaLookupTable::ourMedia(), and MediaLookupTable::remove().

Referenced by afterPlaying(), Medium::close(), closeMediaSinks(), OnDemandServerMediaSubsession::closeStreamSource(), continueAfterClientCreation0(), continueAfterTEARDOWN(), WAVAudioFileSource::createNew(), QuickTimeFileSink::createNew(), QCELPAudioRTPSource::createNew(), MP3FileSource::createNew(), AVIFileSink::createNew(), AMRAudioRTPSource::createNew(), WAVAudioFileServerMediaSubsession::createNewStreamSource(), MPEG1or2DemuxedServerMediaSubsession::createNewStreamSource(), MediaSubsession::deInitiate(), ServerMediaSession::deleteAllSubsessions(), RTSPServerSupportingHTTPStreaming::RTSPClientConnectionSupportingHTTPStreaming::handleHTTPCmd_StreamingGET(), MPEG1or2ProgramStreamFileDuration(), MPEG1or2Demux::noteElementaryStreamDeletion(), ByteStreamMultiFileSource::onSourceClosure1(), StreamState::reclaim(), registerResponseHandler(), RTSPServer::removeServerMediaSession(), ProxyServerMediaSession::resetDESCRIBEState(), OnDemandServerMediaSubsession::sdpLines(), shutdownStream(), subsessionAfterPlaying(), ClientTrickPlayState::updateStateOnScaleChange(), AMRDeinterleaver::~AMRDeinterleaver(), ByteStreamMultiFileSource::~ByteStreamMultiFileSource(), DarwinInjector::~DarwinInjector(), FramedFilter::~FramedFilter(), H264or5VideoRTPSink::~H264or5VideoRTPSink(), InputESSourceRecord::~InputESSourceRecord(), MatroskaFileParser::~MatroskaFileParser(), MatroskaFileServerDemux::~MatroskaFileServerDemux(), MPEG1or2Demux::~MPEG1or2Demux(), MPEG1or2FileServerDemux::~MPEG1or2FileServerDemux(), MPEG2TransportFileServerMediaSubsession::~MPEG2TransportFileServerMediaSubsession(), MPEG2TransportStreamFromPESSource::~MPEG2TransportStreamFromPESSource(), OggFileParser::~OggFileParser(), OggFileServerDemux::~OggFileServerDemux(), ProxyServerMediaSession::~ProxyServerMediaSession(), RTSPServerSupportingHTTPStreaming::RTSPClientConnectionSupportingHTTPStreaming::~RTSPClientConnectionSupportingHTTPStreaming(), ServerMediaSubsession::~ServerMediaSubsession(), StreamClientState::~StreamClientState(), StreamReplicator::~StreamReplicator(), and T140TextRTPSink::~T140TextRTPSink().

00052                                                           {
00053   MediaLookupTable::ourMedia(env)->remove(name);
00054 }

void Medium::close ( Medium medium  )  [static, inherited]

Definition at line 56 of file Media.cpp.

References Medium::close(), Medium::envir(), Medium::name(), and NULL.

00056                                  {
00057   if (medium == NULL) return;
00058 
00059   close(medium->envir(), medium->name());
00060 }

UsageEnvironment& Medium::envir (  )  const [inline, inherited]

Definition at line 59 of file Media.hh.

References Medium::fEnviron.

Referenced by QuickTimeFileSink::addArbitraryString(), FileSink::addData(), RTCPInstance::addStreamSocket(), MPEG2IFrameIndexFromTransportStream::addToTail(), StreamParser::afterGettingBytes1(), DummySink::afterGettingFrame(), TCPStreamSink::afterGettingFrame(), T140IdleFilter::afterGettingFrame(), FileSink::afterGettingFrame(), MultiFramedRTPSink::afterGettingFrame1(), InputESSourceRecord::afterGettingFrame1(), MPEG2TransportStreamFramer::afterGettingFrame1(), MPEG2IFrameIndexFromTransportStream::afterGettingFrame1(), H264or5VideoStreamDiscreteFramer::afterGettingFrame1(), BasicUDPSink::afterGettingFrame1(), MPEG4VideoFileServerMediaSubsession::afterPlayingDummy1(), H265VideoFileServerMediaSubsession::afterPlayingDummy1(), H264VideoFileServerMediaSubsession::afterPlayingDummy1(), MPEG4VideoStreamParser::analyzeVOLHeader(), announceStream(), RTSPServer::RTSPClientConnection::changeClientInputSocket(), MPEG4VideoFileServerMediaSubsession::checkForAuxSDPLine1(), H265VideoFileServerMediaSubsession::checkForAuxSDPLine1(), H264VideoFileServerMediaSubsession::checkForAuxSDPLine1(), Medium::close(), ProxyServerMediaSubsession::closeStreamSource(), MPEG2IFrameIndexFromTransportStream::compactParseBuffer(), RTSPClient::connectionHandler1(), RTSPClient::connectToServer(), ProxyServerMediaSession::continueAfterDESCRIBE(), ProxyRTSPClient::continueAfterLivenessCommand(), ProxyRTSPClient::continueAfterSETUP(), T140TextRTPSink::continuePlaying(), QuickTimeFileSink::continuePlaying(), H264or5VideoRTPSink::continuePlaying(), AVIFileSink::continuePlaying(), ProxyServerMediaSubsession::createNewRTPSink(), MPEG4VideoFileServerMediaSubsession::createNewRTPSink(), MPEG2TransportUDPServerMediaSubsession::createNewRTPSink(), MPEG2TransportFileServerMediaSubsession::createNewRTPSink(), MPEG1or2VideoFileServerMediaSubsession::createNewRTPSink(), MPEG1or2DemuxedServerMediaSubsession::createNewRTPSink(), 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(), 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::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 RTCPInstance [friend, inherited]

Definition at line 100 of file RTPSink.hh.

friend class RTPTransmissionStats [friend, inherited]

Definition at line 101 of file RTPSink.hh.

friend class MediaLookupTable [friend, inherited]

Definition at line 74 of file Media.hh.


Field Documentation

char const* MPEG4LATMAudioRTPSink::fStreamMuxConfigString [private]

Definition at line 64 of file MPEG4LATMAudioRTPSink.hh.

Referenced by ~MPEG4LATMAudioRTPSink().

char* MPEG4LATMAudioRTPSink::fFmtpSDPLine [private]

Definition at line 65 of file MPEG4LATMAudioRTPSink.hh.

Referenced by auxSDPLine(), and ~MPEG4LATMAudioRTPSink().

Boolean MPEG4LATMAudioRTPSink::fAllowMultipleFramesPerPacket [private]

Definition at line 66 of file MPEG4LATMAudioRTPSink.hh.

Referenced by frameCanAppearAfterPacketStart().

RTPInterface RTPSink::fRTPInterface [protected, inherited]

Definition at line 109 of file RTPSink.hh.

Referenced by RTPSink::addStreamSocket(), RTPSink::groupsockBeingUsed(), RTPSink::removeStreamSocket(), MultiFramedRTPSink::sendPacketIfNecessary(), and RTPSink::setStreamSocket().

unsigned char RTPSink::fRTPPayloadType [protected, inherited]

Definition at line 110 of file RTPSink.hh.

Referenced by MultiFramedRTPSink::buildAndSendPacket(), and RTPSink::rtpPayloadType().

unsigned RTPSink::fPacketCount [protected, inherited]

Definition at line 111 of file RTPSink.hh.

Referenced by RTPSink::packetCount(), and MultiFramedRTPSink::sendPacketIfNecessary().

unsigned RTPSink::fOctetCount [protected, inherited]

Definition at line 111 of file RTPSink.hh.

Referenced by RTPSink::octetCount(), and MultiFramedRTPSink::sendPacketIfNecessary().

unsigned RTPSink::fTotalOctetCount [protected, inherited]

Definition at line 111 of file RTPSink.hh.

Referenced by RTPSink::getTotalBitrate(), and MultiFramedRTPSink::sendPacketIfNecessary().

struct timeval fTotalOctetCountStartTime fInitialPresentationTime RTPSink::fMostRecentPresentationTime [read, protected, inherited]

Definition at line 112 of file RTPSink.hh.

Referenced by MultiFramedRTPSink::afterGettingFrame1(), RTPSink::mostRecentPresentationTime(), and RTPSink::resetPresentationTimes().

u_int32_t RTPSink::fCurrentTimestamp [protected, inherited]

Definition at line 113 of file RTPSink.hh.

Referenced by MultiFramedRTPSink::setTimestamp().

u_int16_t RTPSink::fSeqNo [protected, inherited]

Definition at line 114 of file RTPSink.hh.

Referenced by MultiFramedRTPSink::buildAndSendPacket(), RTPSink::currentSeqNo(), and MultiFramedRTPSink::sendPacketIfNecessary().

FramedSource* MediaSink::fSource [protected, inherited]

Definition at line 58 of file MediaSink.hh.

Referenced by FileSink::afterGettingFrame(), AMRAudioFileSink::afterGettingFrame(), MPEG4ESVideoRTPSink::auxSDPLine(), DVVideoRTPSink::auxSDPLine(), DummySink::continuePlaying(), TCPStreamSink::continuePlaying(), T140TextRTPSink::continuePlaying(), OggFileSink::continuePlaying(), MFSD_DummySink::continuePlaying(), H264or5VideoRTPSink::continuePlaying(), FileSink::continuePlaying(), BasicUDPSink::continuePlaying1(), MPEG4ESVideoRTPSink::doSpecialFrameHandling(), MPEG1or2VideoRTPSink::doSpecialFrameHandling(), JPEGVideoRTPSink::doSpecialFrameHandling(), AMRAudioRTPSink::doSpecialFrameHandling(), MediaSink::onSourceClosure(), MultiFramedRTPSink::packFrame(), TCPStreamSink::processBuffer(), MediaSink::source(), JPEGVideoRTPSink::specialHeaderSize(), MediaSink::startPlaying(), MediaSink::stopPlaying(), H264or5VideoRTPSink::~H264or5VideoRTPSink(), and T140TextRTPSink::~T140TextRTPSink().


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