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

◆ afterPlayingFunc

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

Definition at line 33 of file MediaSink.hh.

Constructor & Destructor Documentation

◆ RTPSink()

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

◆ ~RTPSink()

virtual RTPSink::~RTPSink ( )
protectedvirtual

Member Function Documentation

◆ addStreamSocket()

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

◆ auxSDPLine()

virtual char const* RTPSink::auxSDPLine ( )
virtual

◆ close() [1/2]

static void Medium::close ( UsageEnvironment env,
char const *  mediumName 
)
staticinherited

◆ close() [2/2]

static void Medium::close ( Medium medium)
staticinherited

◆ continuePlaying()

virtual Boolean MediaSink::continuePlaying ( )
protectedpure virtualinherited

◆ convertToRTPTimestamp()

u_int32_t RTPSink::convertToRTPTimestamp ( struct timeval  tv)
protected

◆ creationTime()

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

◆ currentSeqNo()

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

◆ enableRTCPReports()

Boolean& RTPSink::enableRTCPReports ( )
inline

Definition at line 66 of file RTPSink.hh.

References fEnableRTCPReports.

66 { return fEnableRTCPReports; }
Boolean fEnableRTCPReports
Definition: RTPSink.hh:125

◆ envir()

UsageEnvironment& Medium::envir ( ) const
inlineinherited

◆ estimatedBitrate()

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

◆ getTotalBitrate()

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

◆ groupsockBeingUsed() [1/2]

Groupsock const& RTPSink::groupsockBeingUsed ( ) const
inline

Definition at line 39 of file RTPSink.hh.

References fRTPInterface, and RTPInterface::gs().

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

◆ groupsockBeingUsed() [2/2]

Groupsock& RTPSink::groupsockBeingUsed ( )
inline

Definition at line 40 of file RTPSink.hh.

References fRTPInterface, and RTPInterface::gs().

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

◆ initialPresentationTime()

struct timeval const& RTPSink::initialPresentationTime ( ) const
inline

Definition at line 73 of file RTPSink.hh.

73 { return fInitialPresentationTime; }

◆ isMediaSession()

virtual Boolean Medium::isMediaSession ( ) const
virtualinherited

Reimplemented in MediaSession.

◆ isRTCPInstance()

virtual Boolean Medium::isRTCPInstance ( ) const
virtualinherited

Reimplemented in RTCPInstance.

◆ isRTPSink()

virtual Boolean RTPSink::isRTPSink ( ) const
privatevirtual

Reimplemented from MediaSink.

◆ isRTSPClient()

virtual Boolean Medium::isRTSPClient ( ) const
virtualinherited

Reimplemented in RTSPClient.

◆ isRTSPServer()

virtual Boolean Medium::isRTSPServer ( ) const
virtualinherited

Reimplemented in RTSPServer.

◆ isServerMediaSession()

virtual Boolean Medium::isServerMediaSession ( ) const
virtualinherited

Reimplemented in ServerMediaSession.

◆ isSource()

virtual Boolean Medium::isSource ( ) const
virtualinherited

Reimplemented in MediaSource.

◆ lookupByName() [1/3]

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

◆ lookupByName() [2/3]

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

◆ lookupByName() [3/3]

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

◆ mostRecentPresentationTime()

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

◆ name()

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

◆ nextTask()

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

◆ nextTimestampHasBeenPreset()

Boolean RTPSink::nextTimestampHasBeenPreset ( ) const
inline

Definition at line 65 of file RTPSink.hh.

References fNextTimestampHasBeenPreset.

Boolean fNextTimestampHasBeenPreset
Definition: RTPSink.hh:124

◆ numChannels()

unsigned RTPSink::numChannels ( ) const
inline

Definition at line 49 of file RTPSink.hh.

References fNumChannels.

49 { return fNumChannels; }
unsigned fNumChannels
Definition: RTPSink.hh:127

◆ octetCount()

unsigned RTPSink::octetCount ( ) const
inlineprotected

Definition at line 107 of file RTPSink.hh.

References fOctetCount.

107 {return fOctetCount;}
unsigned fOctetCount
Definition: RTPSink.hh:112

◆ onSourceClosure() [1/2]

static void MediaSink::onSourceClosure ( void *  clientData)
staticprotectedinherited

◆ onSourceClosure() [2/2]

void MediaSink::onSourceClosure ( )
protectedinherited

◆ packetCount()

unsigned RTPSink::packetCount ( ) const
inlineprotected

Definition at line 106 of file RTPSink.hh.

References fPacketCount.

106 {return fPacketCount;}
unsigned fPacketCount
Definition: RTPSink.hh:112

◆ presetNextTimestamp()

u_int32_t RTPSink::presetNextTimestamp ( )

◆ removeStreamSocket()

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

◆ resetPresentationTimes()

void RTPSink::resetPresentationTimes ( )

◆ rtpmapLine()

virtual char* RTPSink::rtpmapLine ( ) const
virtual

◆ rtpPayloadFormatName()

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

◆ rtpPayloadType()

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

◆ rtpTimestampFrequency()

unsigned RTPSink::rtpTimestampFrequency ( ) const
inline

Definition at line 43 of file RTPSink.hh.

References fTimestampFrequency.

43 { return fTimestampFrequency; }
unsigned fTimestampFrequency
Definition: RTPSink.hh:123

◆ sdpMediaType()

virtual char const* RTPSink::sdpMediaType ( ) const
virtual

◆ setRTPTimestampFrequency()

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

◆ setStreamSocket()

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

◆ source()

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

◆ sourceIsCompatibleWithUs()

virtual Boolean MediaSink::sourceIsCompatibleWithUs ( MediaSource source)
protectedvirtualinherited

◆ SSRC()

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

◆ startPlaying()

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

◆ stopPlaying()

virtual void MediaSink::stopPlaying ( )
virtualinherited

Reimplemented in MultiFramedRTPSink.

◆ transmissionStatsDB()

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

◆ RTCPInstance

friend class RTCPInstance
friend

Definition at line 103 of file RTPSink.hh.

◆ RTPTransmissionStats

friend class RTPTransmissionStats
friend

Definition at line 104 of file RTPSink.hh.

Field Documentation

◆ fCreationTime

struct timeval RTPSink::fCreationTime
private

Definition at line 128 of file RTPSink.hh.

Referenced by creationTime().

◆ fCurrentTimestamp

u_int32_t RTPSink::fCurrentTimestamp
protected

Definition at line 114 of file RTPSink.hh.

◆ fEnableRTCPReports

Boolean RTPSink::fEnableRTCPReports
private

Definition at line 125 of file RTPSink.hh.

Referenced by enableRTCPReports().

◆ fEstimatedBitrate

unsigned RTPSink::fEstimatedBitrate
private

Definition at line 129 of file RTPSink.hh.

Referenced by estimatedBitrate().

◆ fMostRecentPresentationTime

struct timeval fTotalOctetCountStartTime fInitialPresentationTime RTPSink::fMostRecentPresentationTime
protected

Definition at line 113 of file RTPSink.hh.

Referenced by mostRecentPresentationTime().

◆ fNextTimestampHasBeenPreset

Boolean RTPSink::fNextTimestampHasBeenPreset
private

Definition at line 124 of file RTPSink.hh.

Referenced by nextTimestampHasBeenPreset().

◆ fNumChannels

unsigned RTPSink::fNumChannels
private

Definition at line 127 of file RTPSink.hh.

Referenced by numChannels().

◆ fOctetCount

unsigned RTPSink::fOctetCount
protected

Definition at line 112 of file RTPSink.hh.

Referenced by octetCount().

◆ fPacketCount

unsigned RTPSink::fPacketCount
protected

Definition at line 112 of file RTPSink.hh.

Referenced by packetCount().

◆ fRTPInterface

RTPInterface RTPSink::fRTPInterface
protected

◆ fRTPPayloadFormatName

char const* RTPSink::fRTPPayloadFormatName
private

Definition at line 126 of file RTPSink.hh.

Referenced by rtpPayloadFormatName().

◆ fRTPPayloadType

unsigned char RTPSink::fRTPPayloadType
protected

Definition at line 111 of file RTPSink.hh.

Referenced by rtpPayloadType().

◆ fSeqNo

u_int16_t RTPSink::fSeqNo
protected

Definition at line 115 of file RTPSink.hh.

Referenced by currentSeqNo().

◆ fSource

FramedSource* MediaSink::fSource
protectedinherited

Definition at line 58 of file MediaSink.hh.

Referenced by MediaSink::source().

◆ fSSRC

u_int32_t RTPSink::fSSRC
private

Definition at line 122 of file RTPSink.hh.

Referenced by SSRC().

◆ fTimestampBase

u_int32_t RTPSink::fTimestampBase
private

Definition at line 122 of file RTPSink.hh.

◆ fTimestampFrequency

unsigned RTPSink::fTimestampFrequency
private

Definition at line 123 of file RTPSink.hh.

Referenced by rtpTimestampFrequency(), and setRTPTimestampFrequency().

◆ fTotalOctetCount

unsigned RTPSink::fTotalOctetCount
protected

Definition at line 112 of file RTPSink.hh.

◆ fTransmissionStatsDB

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: