live
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends
RTPSink Class Referenceabstract

#include <RTPSink.hh>

Inheritance diagram for RTPSink:
Inheritance graph
[legend]
Collaboration diagram for RTPSink:
Collaboration graph
[legend]

Public Types

typedef void( afterPlayingFunc) (void *clientData)
 

Public Member Functions

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 const * sdpMediaType () 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)
 
struct timeval const & creationTime () const
 
struct timeval const & initialPresentationTime () const
 
struct 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 ()
 
u_int32_t SSRC () const
 
Boolean startPlaying (MediaSource &source, afterPlayingFunc *afterFunc, void *afterClientData)
 
virtual void stopPlaying ()
 
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
 

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

 RTPSink (UsageEnvironment &env, Groupsock *rtpGS, unsigned char rtpPayloadType, u_int32_t rtpTimestampFrequency, char const *rtpPayloadFormatName, unsigned numChannels)
 
virtual ~RTPSink ()
 
u_int32_t convertToRTPTimestamp (struct timeval tv)
 
unsigned packetCount () const
 
unsigned octetCount () const
 
virtual Boolean sourceIsCompatibleWithUs (MediaSource &source)
 
virtual Boolean continuePlaying ()=0
 
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
 
struct timeval fTotalOctetCountStartTime fInitialPresentationTime fMostRecentPresentationTime
 
u_int32_t fCurrentTimestamp
 
u_int16_t fSeqNo
 
FramedSourcefSource
 

Private Member Functions

virtual Boolean isRTPSink () const
 

Private Attributes

u_int32_t fSSRC
 
u_int32_t fTimestampBase
 
unsigned fTimestampFrequency
 
Boolean fNextTimestampHasBeenPreset
 
Boolean fEnableRTCPReports
 
char const * fRTPPayloadFormatName
 
unsigned fNumChannels
 
struct timeval fCreationTime
 
unsigned fEstimatedBitrate
 
RTPTransmissionStatsDBfTransmissionStatsDB
 

Friends

class RTCPInstance
 
class RTPTransmissionStats
 

Detailed Description

Definition at line 33 of file RTPSink.hh.

Member Typedef Documentation

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

Definition at line 33 of file MediaSink.hh.

Constructor & Destructor Documentation

RTPSink::RTPSink ( UsageEnvironment env,
Groupsock rtpGS,
unsigned char  rtpPayloadType,
u_int32_t  rtpTimestampFrequency,
char const *  rtpPayloadFormatName,
unsigned  numChannels 
)
protected
virtual RTPSink::~RTPSink ( )
protectedvirtual

Member Function Documentation

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

Definition at line 81 of file RTPSink.hh.

References RTPInterface::addStreamSocket(), and fRTPInterface.

81  {
82  fRTPInterface.addStreamSocket(sockNum, streamChannelId);
83  }
void addStreamSocket(int sockNum, unsigned char streamChannelId)
RTPInterface fRTPInterface
Definition: RTPSink.hh:110
virtual char const* RTPSink::auxSDPLine ( )
virtual
static void Medium::close ( UsageEnvironment env,
char const *  mediumName 
)
staticinherited
static void Medium::close ( Medium medium)
staticinherited
virtual Boolean MediaSink::continuePlaying ( )
protectedpure virtualinherited
u_int32_t RTPSink::convertToRTPTimestamp ( struct timeval  tv)
protected
struct timeval const& RTPSink::creationTime ( ) const
inline

Definition at line 72 of file RTPSink.hh.

References fCreationTime.

72 { return fCreationTime; }
struct timeval fCreationTime
Definition: RTPSink.hh:128
u_int16_t RTPSink::currentSeqNo ( ) const
inline

Definition at line 56 of file RTPSink.hh.

References fSeqNo.

56 { return fSeqNo; }
u_int16_t fSeqNo
Definition: RTPSink.hh:115
Boolean& RTPSink::enableRTCPReports ( )
inline

Definition at line 66 of file RTPSink.hh.

References fEnableRTCPReports.

66 { return fEnableRTCPReports; }
Boolean fEnableRTCPReports
Definition: RTPSink.hh:125
UsageEnvironment& Medium::envir ( ) const
inlineinherited
unsigned& RTPSink::estimatedBitrate ( )
inline

Definition at line 87 of file RTPSink.hh.

References fEstimatedBitrate.

87 { return fEstimatedBitrate; } // kbps; usually 0 (i.e., unset)
unsigned fEstimatedBitrate
Definition: RTPSink.hh:129
void RTPSink::getTotalBitrate ( unsigned &  outNumBytes,
double &  outElapsedTime 
)
Groupsock const& RTPSink::groupsockBeingUsed ( ) const
inline

Definition at line 39 of file RTPSink.hh.

References fRTPInterface, and RTPInterface::gs().

39 { return *(fRTPInterface.gs()); }
RTPInterface fRTPInterface
Definition: RTPSink.hh:110
Groupsock * gs() const
Definition: RTPInterface.hh:60
Groupsock& RTPSink::groupsockBeingUsed ( )
inline

Definition at line 40 of file RTPSink.hh.

References fRTPInterface, and RTPInterface::gs().

40 { return *(fRTPInterface.gs()); }
RTPInterface fRTPInterface
Definition: RTPSink.hh:110
Groupsock * gs() const
Definition: RTPInterface.hh:60
struct timeval const& RTPSink::initialPresentationTime ( ) const
inline

Definition at line 73 of file RTPSink.hh.

73 { return fInitialPresentationTime; }
virtual Boolean Medium::isMediaSession ( ) const
virtualinherited

Reimplemented in MediaSession.

virtual Boolean Medium::isRTCPInstance ( ) const
virtualinherited

Reimplemented in RTCPInstance.

virtual Boolean RTPSink::isRTPSink ( ) const
privatevirtual

Reimplemented from MediaSink.

virtual Boolean Medium::isRTSPClient ( ) const
virtualinherited

Reimplemented in RTSPClient.

virtual Boolean Medium::isRTSPServer ( ) const
virtualinherited

Reimplemented in RTSPServer.

virtual Boolean Medium::isServerMediaSession ( ) const
virtualinherited

Reimplemented in ServerMediaSession.

virtual Boolean Medium::isSource ( ) const
virtualinherited

Reimplemented in MediaSource.

static Boolean MediaSink::lookupByName ( UsageEnvironment env,
char const *  sinkName,
MediaSink *&  resultSink 
)
staticinherited
static Boolean RTPSink::lookupByName ( UsageEnvironment env,
char const *  sinkName,
RTPSink *&  resultSink 
)
static
static Boolean Medium::lookupByName ( UsageEnvironment env,
char const *  mediumName,
Medium *&  resultMedium 
)
staticinherited
struct timeval const& RTPSink::mostRecentPresentationTime ( ) const
inline

Definition at line 74 of file RTPSink.hh.

References fMostRecentPresentationTime.

struct timeval fTotalOctetCountStartTime fInitialPresentationTime fMostRecentPresentationTime
Definition: RTPSink.hh:113
char const* Medium::name ( ) const
inlineinherited

Definition at line 61 of file Media.hh.

References Medium::fMediumName.

61 {return fMediumName;}
char fMediumName[mediumNameMaxLen]
Definition: Media.hh:83
TaskToken& Medium::nextTask ( )
inlineprotectedinherited

Definition at line 77 of file Media.hh.

References Medium::fNextTask.

77  {
78  return fNextTask;
79  }
TaskToken fNextTask
Definition: Media.hh:84
Boolean RTPSink::nextTimestampHasBeenPreset ( ) const
inline

Definition at line 65 of file RTPSink.hh.

References fNextTimestampHasBeenPreset.

Boolean fNextTimestampHasBeenPreset
Definition: RTPSink.hh:124
unsigned RTPSink::numChannels ( ) const
inline

Definition at line 49 of file RTPSink.hh.

References fNumChannels.

49 { return fNumChannels; }
unsigned fNumChannels
Definition: RTPSink.hh:127
unsigned RTPSink::octetCount ( ) const
inlineprotected

Definition at line 107 of file RTPSink.hh.

References fOctetCount.

107 {return fOctetCount;}
unsigned fOctetCount
Definition: RTPSink.hh:112
static void MediaSink::onSourceClosure ( void *  clientData)
staticprotectedinherited
void MediaSink::onSourceClosure ( )
protectedinherited
unsigned RTPSink::packetCount ( ) const
inlineprotected

Definition at line 106 of file RTPSink.hh.

References fPacketCount.

106 {return fPacketCount;}
unsigned fPacketCount
Definition: RTPSink.hh:112
u_int32_t RTPSink::presetNextTimestamp ( )
void RTPSink::removeStreamSocket ( int  sockNum,
unsigned char  streamChannelId 
)
inline

Definition at line 84 of file RTPSink.hh.

References fRTPInterface, and RTPInterface::removeStreamSocket().

84  {
85  fRTPInterface.removeStreamSocket(sockNum, streamChannelId);
86  }
void removeStreamSocket(int sockNum, unsigned char streamChannelId)
RTPInterface fRTPInterface
Definition: RTPSink.hh:110
void RTPSink::resetPresentationTimes ( )
virtual char* RTPSink::rtpmapLine ( ) const
virtual
char const* RTPSink::rtpPayloadFormatName ( ) const
inline

Definition at line 47 of file RTPSink.hh.

References fRTPPayloadFormatName.

47 {return fRTPPayloadFormatName;}
char const * fRTPPayloadFormatName
Definition: RTPSink.hh:126
unsigned char RTPSink::rtpPayloadType ( ) const
inline

Definition at line 42 of file RTPSink.hh.

References fRTPPayloadType.

42 { return fRTPPayloadType; }
unsigned char fRTPPayloadType
Definition: RTPSink.hh:111
unsigned RTPSink::rtpTimestampFrequency ( ) const
inline

Definition at line 43 of file RTPSink.hh.

References fTimestampFrequency.

43 { return fTimestampFrequency; }
unsigned fTimestampFrequency
Definition: RTPSink.hh:123
virtual char const* RTPSink::sdpMediaType ( ) const
virtual
void RTPSink::setRTPTimestampFrequency ( unsigned  freq)
inline

Definition at line 44 of file RTPSink.hh.

References fTimestampFrequency.

44  {
45  fTimestampFrequency = freq;
46  }
unsigned fTimestampFrequency
Definition: RTPSink.hh:123
void RTPSink::setStreamSocket ( int  sockNum,
unsigned char  streamChannelId 
)
inline

Definition at line 78 of file RTPSink.hh.

References fRTPInterface, and RTPInterface::setStreamSocket().

78  {
79  fRTPInterface.setStreamSocket(sockNum, streamChannelId);
80  }
void setStreamSocket(int sockNum, unsigned char streamChannelId)
RTPInterface fRTPInterface
Definition: RTPSink.hh:110
FramedSource* MediaSink::source ( ) const
inlineinherited

Definition at line 42 of file MediaSink.hh.

References MediaSink::fSource.

42 {return fSource;}
FramedSource * fSource
Definition: MediaSink.hh:58
virtual Boolean MediaSink::sourceIsCompatibleWithUs ( MediaSource source)
protectedvirtualinherited
u_int32_t RTPSink::SSRC ( ) const
inline

Definition at line 89 of file RTPSink.hh.

References fSSRC.

89 {return fSSRC;}
u_int32_t fSSRC
Definition: RTPSink.hh:122
Boolean MediaSink::startPlaying ( MediaSource source,
afterPlayingFunc afterFunc,
void *  afterClientData 
)
inherited
virtual void MediaSink::stopPlaying ( )
virtualinherited

Reimplemented in MultiFramedRTPSink.

RTPTransmissionStatsDB& RTPSink::transmissionStatsDB ( ) const
inline

Definition at line 61 of file RTPSink.hh.

References fTransmissionStatsDB.

61  {
62  return *fTransmissionStatsDB;
63  }
RTPTransmissionStatsDB * fTransmissionStatsDB
Definition: RTPSink.hh:131

Friends And Related Function Documentation

friend class RTCPInstance
friend

Definition at line 103 of file RTPSink.hh.

friend class RTPTransmissionStats
friend

Definition at line 104 of file RTPSink.hh.

Field Documentation

struct timeval RTPSink::fCreationTime
private

Definition at line 128 of file RTPSink.hh.

Referenced by creationTime().

u_int32_t RTPSink::fCurrentTimestamp
protected

Definition at line 114 of file RTPSink.hh.

Boolean RTPSink::fEnableRTCPReports
private

Definition at line 125 of file RTPSink.hh.

Referenced by enableRTCPReports().

unsigned RTPSink::fEstimatedBitrate
private

Definition at line 129 of file RTPSink.hh.

Referenced by estimatedBitrate().

struct timeval fTotalOctetCountStartTime fInitialPresentationTime RTPSink::fMostRecentPresentationTime
protected

Definition at line 113 of file RTPSink.hh.

Referenced by mostRecentPresentationTime().

Boolean RTPSink::fNextTimestampHasBeenPreset
private

Definition at line 124 of file RTPSink.hh.

Referenced by nextTimestampHasBeenPreset().

unsigned RTPSink::fNumChannels
private

Definition at line 127 of file RTPSink.hh.

Referenced by numChannels().

unsigned RTPSink::fOctetCount
protected

Definition at line 112 of file RTPSink.hh.

Referenced by octetCount().

unsigned RTPSink::fPacketCount
protected

Definition at line 112 of file RTPSink.hh.

Referenced by packetCount().

RTPInterface RTPSink::fRTPInterface
protected
char const* RTPSink::fRTPPayloadFormatName
private

Definition at line 126 of file RTPSink.hh.

Referenced by rtpPayloadFormatName().

unsigned char RTPSink::fRTPPayloadType
protected

Definition at line 111 of file RTPSink.hh.

Referenced by rtpPayloadType().

u_int16_t RTPSink::fSeqNo
protected

Definition at line 115 of file RTPSink.hh.

Referenced by currentSeqNo().

FramedSource* MediaSink::fSource
protectedinherited

Definition at line 58 of file MediaSink.hh.

Referenced by MediaSink::source().

u_int32_t RTPSink::fSSRC
private

Definition at line 122 of file RTPSink.hh.

Referenced by SSRC().

u_int32_t RTPSink::fTimestampBase
private

Definition at line 122 of file RTPSink.hh.

unsigned RTPSink::fTimestampFrequency
private

Definition at line 123 of file RTPSink.hh.

Referenced by rtpTimestampFrequency(), and setRTPTimestampFrequency().

unsigned RTPSink::fTotalOctetCount
protected

Definition at line 112 of file RTPSink.hh.

RTPTransmissionStatsDB* RTPSink::fTransmissionStatsDB
private

Definition at line 131 of file RTPSink.hh.

Referenced by transmissionStatsDB().


The documentation for this class was generated from the following file: