AudioRTPSink Class Reference

#include <AudioRTPSink.hh>

Inheritance diagram for AudioRTPSink:

Inheritance graph
[legend]
Collaboration diagram for AudioRTPSink:

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
virtual char const * auxSDPLine ()
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 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

 AudioRTPSink (UsageEnvironment &env, Groupsock *rtpgs, unsigned char rtpPayloadType, unsigned rtpTimestampFrequency, char const *rtpPayloadFormatName, unsigned numChannels=1)
virtual ~AudioRTPSink ()
virtual void doSpecialFrameHandling (unsigned fragmentationOffset, unsigned char *frameStart, unsigned numBytesInFrame, struct timeval framePresentationTime, unsigned numRemainingBytes)
virtual Boolean allowFragmentationAfterStart () const
virtual Boolean allowOtherFramesAfterLastFragment () const
virtual Boolean frameCanAppearAfterPacketStart (unsigned char const *frameStart, unsigned numBytesInFrame) 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 char const * sdpMediaType () const

Friends

class RTCPInstance
class RTPTransmissionStats
class MediaLookupTable

Detailed Description

Definition at line 28 of file AudioRTPSink.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

AudioRTPSink::AudioRTPSink ( UsageEnvironment env,
Groupsock rtpgs,
unsigned char  rtpPayloadType,
unsigned  rtpTimestampFrequency,
char const *  rtpPayloadFormatName,
unsigned  numChannels = 1 
) [protected]

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


Member Function Documentation

virtual char const* AudioRTPSink::sdpMediaType (  )  const [private, virtual]

Reimplemented from RTPSink.

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

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   }

virtual void MultiFramedRTPSink::doSpecialFrameHandling ( unsigned  fragmentationOffset,
unsigned char *  frameStart,
unsigned  numBytesInFrame,
struct timeval  framePresentationTime,
unsigned  numRemainingBytes 
) [protected, virtual, inherited]

Reimplemented in AC3AudioRTPSink, AMRAudioRTPSink, DVVideoRTPSink, H263plusVideoRTPSink, H264or5VideoRTPSink, JPEGVideoRTPSink, MP3ADURTPSink, MPEG1or2AudioRTPSink, MPEG1or2VideoRTPSink, MPEG4ESVideoRTPSink, MPEG4GenericRTPSink, MPEG4LATMAudioRTPSink, SimpleRTPSink, T140TextRTPSink, TheoraVideoRTPSink, VorbisAudioRTPSink, VP8VideoRTPSink, and VP9VideoRTPSink.

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

Reimplemented in MPEG1or2VideoRTPSink, and MPEG4ESVideoRTPSink.

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

virtual Boolean MultiFramedRTPSink::frameCanAppearAfterPacketStart ( unsigned char const *  frameStart,
unsigned  numBytesInFrame 
) const [protected, virtual, inherited]

Reimplemented in AC3AudioRTPSink, AMRAudioRTPSink, GSMAudioRTPSink, H263plusVideoRTPSink, H264or5VideoRTPSink, JPEGVideoRTPSink, MPEG1or2VideoRTPSink, MPEG4ESVideoRTPSink, MPEG4GenericRTPSink, MPEG4LATMAudioRTPSink, SimpleRTPSink, T140TextRTPSink, TheoraVideoRTPSink, VorbisAudioRTPSink, VP8VideoRTPSink, and VP9VideoRTPSink.

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

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

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

Reimplemented in VorbisAudioRTPSink.

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

Reimplemented in DVVideoRTPSink.

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

Definition at line 77 of file MultiFramedRTPSink.hh.

References MultiFramedRTPSink::fIsFirstPacket.

00077 { return fIsFirstPacket; }

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

Definition at line 78 of file MultiFramedRTPSink.hh.

References MultiFramedRTPSink::fNumFramesUsedSoFar.

00078 { return fNumFramesUsedSoFar == 0; }

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

Definition at line 79 of file MultiFramedRTPSink.hh.

References MultiFramedRTPSink::fCurFragmentationOffset.

00079 { return fCurFragmentationOffset; }

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

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

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

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

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

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

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

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

Definition at line 91 of file MultiFramedRTPSink.hh.

References MultiFramedRTPSink::fNumFramesUsedSoFar.

00091 { return fNumFramesUsedSoFar; }

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

Definition at line 92 of file MultiFramedRTPSink.hh.

References MultiFramedRTPSink::fOurMaxPacketSize.

00092 { return fOurMaxPacketSize; }

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

Reimplemented from MediaSink.

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

Implements MediaSink.

Reimplemented in H264or5VideoRTPSink, and T140TextRTPSink.

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

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

static Boolean Medium::lookupByName ( UsageEnvironment env,
char const *  mediumName,
Medium *&  resultMedium 
) [static, inherited]

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

Definition at line 39 of file RTPSink.hh.

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

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.

00042 { return fRTPPayloadType; }

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

Definition at line 43 of file RTPSink.hh.

References RTPSink::fTimestampFrequency.

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.

00047 {return fRTPPayloadFormatName;}

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

Definition at line 49 of file RTPSink.hh.

References RTPSink::fNumChannels.

00049 { return fNumChannels; }

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

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

Reimplemented in AMRAudioRTPSink, DVVideoRTPSink, H264VideoRTPSink, H265VideoRTPSink, MPEG4ESVideoRTPSink, MPEG4GenericRTPSink, MPEG4LATMAudioRTPSink, TheoraVideoRTPSink, and VorbisAudioRTPSink.

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

Definition at line 56 of file RTPSink.hh.

References RTPSink::fSeqNo.

00056 { return fSeqNo; }

u_int32_t RTPSink::presetNextTimestamp (  )  [inherited]

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

Definition at line 61 of file RTPSink.hh.

References RTPSink::fTransmissionStatsDB.

00061                                                       {
00062     return *fTransmissionStatsDB;
00063   }

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

Definition at line 65 of file RTPSink.hh.

References RTPSink::fNextTimestampHasBeenPreset.

00065 { return fNextTimestampHasBeenPreset; }

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

Definition at line 66 of file RTPSink.hh.

References RTPSink::fEnableRTCPReports.

00066 { return fEnableRTCPReports; }

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

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

Definition at line 72 of file RTPSink.hh.

References RTPSink::fCreationTime.

00072 { return fCreationTime; }

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

Definition at line 73 of file RTPSink.hh.

00073 { return fInitialPresentationTime; }

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

Definition at line 74 of file RTPSink.hh.

References RTPSink::fMostRecentPresentationTime.

00074 { return fMostRecentPresentationTime; }

void RTPSink::resetPresentationTimes (  )  [inherited]

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

Definition at line 78 of file RTPSink.hh.

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

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.

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().

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

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

Definition at line 87 of file RTPSink.hh.

References RTPSink::fEstimatedBitrate.

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.

00102 {return fSSRC;}

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

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

Definition at line 105 of file RTPSink.hh.

References RTPSink::fPacketCount.

00105 {return fPacketCount;}

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

Definition at line 106 of file RTPSink.hh.

References RTPSink::fOctetCount.

00106 {return fOctetCount;}

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

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

Definition at line 42 of file MediaSink.hh.

References MediaSink::fSource.

00042 {return fSource;}

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

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

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

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

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

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

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

Definition at line 59 of file Media.hh.

References Medium::fEnviron.

Referenced by MediaSubsession::env(), RTSPServer::RTSPClientSession::envir(), RTSPServer::RTSPClientConnection::envir(), and RTPInterface::envir().

00059 {return fEnviron;}

char const* Medium::name (  )  const [inline, inherited]

Definition at line 61 of file Media.hh.

References Medium::fMediumName.

00061 {return fMediumName;}

virtual Boolean Medium::isSource (  )  const [virtual, inherited]

Reimplemented in MediaSource.

virtual Boolean Medium::isRTCPInstance (  )  const [virtual, inherited]

Reimplemented in RTCPInstance.

virtual Boolean Medium::isRTSPClient (  )  const [virtual, inherited]

Reimplemented in RTSPClient.

virtual Boolean Medium::isRTSPServer (  )  const [virtual, inherited]

Reimplemented in RTSPServer.

virtual Boolean Medium::isMediaSession (  )  const [virtual, inherited]

Reimplemented in MediaSession.

virtual Boolean Medium::isServerMediaSession (  )  const [virtual, inherited]

Reimplemented in ServerMediaSession.

virtual Boolean Medium::isDarwinInjector (  )  const [virtual, inherited]

Reimplemented in DarwinInjector.

TaskToken& Medium::nextTask (  )  [inline, protected, inherited]

Definition at line 78 of file Media.hh.

References Medium::fNextTask.

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

RTPInterface RTPSink::fRTPInterface [protected, inherited]

Definition at line 109 of file RTPSink.hh.

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

unsigned char RTPSink::fRTPPayloadType [protected, inherited]

Definition at line 110 of file RTPSink.hh.

Referenced by RTPSink::rtpPayloadType().

unsigned RTPSink::fPacketCount [protected, inherited]

Definition at line 111 of file RTPSink.hh.

Referenced by RTPSink::packetCount().

unsigned RTPSink::fOctetCount [protected, inherited]

Definition at line 111 of file RTPSink.hh.

Referenced by RTPSink::octetCount().

unsigned RTPSink::fTotalOctetCount [protected, inherited]

Definition at line 111 of file RTPSink.hh.

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

Definition at line 112 of file RTPSink.hh.

Referenced by RTPSink::mostRecentPresentationTime().

u_int32_t RTPSink::fCurrentTimestamp [protected, inherited]

Definition at line 113 of file RTPSink.hh.

u_int16_t RTPSink::fSeqNo [protected, inherited]

Definition at line 114 of file RTPSink.hh.

Referenced by RTPSink::currentSeqNo().

FramedSource* MediaSink::fSource [protected, inherited]

Definition at line 58 of file MediaSink.hh.

Referenced by MediaSink::source().


The documentation for this class was generated from the following file:
Generated on Wed Nov 12 10:50:43 2014 for live by  doxygen 1.5.2