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
 
void setupForSRTP (Boolean useEncryption)
 
u_int8_t * setupForSRTP (Boolean useEncryption, unsigned &resultMIKEYStateMessageSize)
 
void setupForSRTP (u_int8_t const *MIKEYStateMessage, unsigned MIKEYStateMessageSize)
 
virtual char const * sdpMediaType () const
 
virtual char * rtpmapLine () const
 
virtual char * keyMgmtLine ()
 
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, TLSState *tlsState)
 
void addStreamSocket (int sockNum, unsigned char streamChannelId, TLSState *tlsState)
 
void removeStreamSocket (int sockNum, unsigned char streamChannelId)
 
unsigned & estimatedBitrate ()
 
u_int32_t SSRC () const
 
SRTPCryptographicContextgetCrypto () 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
 
MIKEYStatefMIKEYState
 
SRTPCryptographicContextfCrypto
 
FramedSourcefSource
 

Private Member Functions

virtual Boolean isRTPSink () const
 
virtual Boolean isSink () 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
 
afterPlayingFuncfAfterFunc
 
void * fAfterClientData
 
UsageEnvironmentfEnviron
 
char fMediumName [mediumNameMaxLen]
 
TaskToken fNextTask
 

Friends

class RTCPInstance
 
class RTPTransmissionStats
 

Detailed Description

Definition at line 36 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,
TLSState tlsState 
)
inline

Definition at line 92 of file RTPSink.hh.

92 {
93 fRTPInterface.addStreamSocket(sockNum, streamChannelId, tlsState);
94 }
void addStreamSocket(int sockNum, unsigned char streamChannelId, TLSState *tlsState)
RTPInterface fRTPInterface
Definition: RTPSink.hh:123

References RTPInterface::addStreamSocket(), and fRTPInterface.

◆ auxSDPLine()

virtual char const * RTPSink::auxSDPLine ( )
virtual

◆ close() [1/2]

static void Medium::close ( Medium medium)
staticinherited

◆ close() [2/2]

static void Medium::close ( UsageEnvironment env,
char const *  mediumName 
)
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 83 of file RTPSink.hh.

83{ return fCreationTime; }
struct timeval fCreationTime
Definition: RTPSink.hh:145

References fCreationTime.

◆ currentSeqNo()

u_int16_t RTPSink::currentSeqNo ( ) const
inline

Definition at line 67 of file RTPSink.hh.

67{ return fSeqNo; }
u_int16_t fSeqNo
Definition: RTPSink.hh:128

References fSeqNo.

◆ enableRTCPReports()

Boolean & RTPSink::enableRTCPReports ( )
inline

Definition at line 77 of file RTPSink.hh.

77{ return fEnableRTCPReports; }
Boolean fEnableRTCPReports
Definition: RTPSink.hh:142

References fEnableRTCPReports.

◆ envir()

UsageEnvironment & Medium::envir ( ) const
inlineinherited

◆ estimatedBitrate()

unsigned & RTPSink::estimatedBitrate ( )
inline

Definition at line 98 of file RTPSink.hh.

98{ return fEstimatedBitrate; } // kbps; usually 0 (i.e., unset)
unsigned fEstimatedBitrate
Definition: RTPSink.hh:146

References fEstimatedBitrate.

◆ getCrypto()

SRTPCryptographicContext * RTPSink::getCrypto ( ) const
inline

Definition at line 103 of file RTPSink.hh.

103{ return fCrypto; }
SRTPCryptographicContext * fCrypto
Definition: RTPSink.hh:132

References fCrypto.

◆ getTotalBitrate()

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

◆ groupsockBeingUsed() [1/2]

Groupsock & RTPSink::groupsockBeingUsed ( )
inline

Definition at line 43 of file RTPSink.hh.

43{ return *(fRTPInterface.gs()); }
Groupsock * gs() const
Definition: RTPInterface.hh:51

References fRTPInterface, and RTPInterface::gs().

◆ groupsockBeingUsed() [2/2]

Groupsock const & RTPSink::groupsockBeingUsed ( ) const
inline

Definition at line 42 of file RTPSink.hh.

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

References fRTPInterface, and RTPInterface::gs().

◆ initialPresentationTime()

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

Definition at line 84 of file RTPSink.hh.

84{ 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.

◆ isSink()

virtual Boolean MediaSink::isSink ( ) const
privatevirtualinherited

Reimplemented from Medium.

◆ isSource()

virtual Boolean Medium::isSource ( ) const
virtualinherited

Reimplemented in MediaSource.

◆ keyMgmtLine()

virtual char * RTPSink::keyMgmtLine ( )
virtual

◆ lookupByName() [1/3]

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

◆ lookupByName() [2/3]

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

◆ lookupByName() [3/3]

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

◆ mostRecentPresentationTime()

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

Definition at line 85 of file RTPSink.hh.

struct timeval fTotalOctetCountStartTime fInitialPresentationTime fMostRecentPresentationTime
Definition: RTPSink.hh:126

References fMostRecentPresentationTime.

◆ name()

char const * Medium::name ( ) const
inlineinherited

Definition at line 61 of file Media.hh.

61{return fMediumName;}
char fMediumName[mediumNameMaxLen]
Definition: Media.hh:83

References Medium::fMediumName.

◆ nextTask()

TaskToken & Medium::nextTask ( )
inlineprotectedinherited

Definition at line 77 of file Media.hh.

77 {
78 return fNextTask;
79 }
TaskToken fNextTask
Definition: Media.hh:84

References Medium::fNextTask.

◆ nextTimestampHasBeenPreset()

Boolean RTPSink::nextTimestampHasBeenPreset ( ) const
inline

Definition at line 76 of file RTPSink.hh.

Boolean fNextTimestampHasBeenPreset
Definition: RTPSink.hh:141

References fNextTimestampHasBeenPreset.

◆ numChannels()

unsigned RTPSink::numChannels ( ) const
inline

Definition at line 52 of file RTPSink.hh.

52{ return fNumChannels; }
unsigned fNumChannels
Definition: RTPSink.hh:144

References fNumChannels.

◆ octetCount()

unsigned RTPSink::octetCount ( ) const
inlineprotected

Definition at line 120 of file RTPSink.hh.

120{return fOctetCount;}
unsigned fOctetCount
Definition: RTPSink.hh:125

References fOctetCount.

◆ onSourceClosure() [1/2]

void MediaSink::onSourceClosure ( )
protectedinherited

◆ onSourceClosure() [2/2]

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

◆ packetCount()

unsigned RTPSink::packetCount ( ) const
inlineprotected

Definition at line 119 of file RTPSink.hh.

119{return fPacketCount;}
unsigned fPacketCount
Definition: RTPSink.hh:125

References fPacketCount.

◆ presetNextTimestamp()

u_int32_t RTPSink::presetNextTimestamp ( )

◆ removeStreamSocket()

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

Definition at line 95 of file RTPSink.hh.

95 {
96 fRTPInterface.removeStreamSocket(sockNum, streamChannelId);
97 }
void removeStreamSocket(int sockNum, unsigned char streamChannelId)

References fRTPInterface, and RTPInterface::removeStreamSocket().

◆ resetPresentationTimes()

void RTPSink::resetPresentationTimes ( )

◆ rtpmapLine()

virtual char * RTPSink::rtpmapLine ( ) const
virtual

◆ rtpPayloadFormatName()

char const * RTPSink::rtpPayloadFormatName ( ) const
inline

Definition at line 50 of file RTPSink.hh.

char const * fRTPPayloadFormatName
Definition: RTPSink.hh:143

References fRTPPayloadFormatName.

◆ rtpPayloadType()

unsigned char RTPSink::rtpPayloadType ( ) const
inline

Definition at line 45 of file RTPSink.hh.

45{ return fRTPPayloadType; }
unsigned char fRTPPayloadType
Definition: RTPSink.hh:124

References fRTPPayloadType.

◆ rtpTimestampFrequency()

unsigned RTPSink::rtpTimestampFrequency ( ) const
inline

Definition at line 46 of file RTPSink.hh.

46{ return fTimestampFrequency; }
unsigned fTimestampFrequency
Definition: RTPSink.hh:140

References fTimestampFrequency.

◆ sdpMediaType()

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

◆ setRTPTimestampFrequency()

void RTPSink::setRTPTimestampFrequency ( unsigned  freq)
inline

Definition at line 47 of file RTPSink.hh.

47 {
49 }

References fTimestampFrequency.

◆ setStreamSocket()

void RTPSink::setStreamSocket ( int  sockNum,
unsigned char  streamChannelId,
TLSState tlsState 
)
inline

Definition at line 89 of file RTPSink.hh.

89 {
90 fRTPInterface.setStreamSocket(sockNum, streamChannelId, tlsState);
91 }
void setStreamSocket(int sockNum, unsigned char streamChannelId, TLSState *tlsState)

References fRTPInterface, and RTPInterface::setStreamSocket().

◆ setupForSRTP() [1/3]

void RTPSink::setupForSRTP ( Boolean  useEncryption)

◆ setupForSRTP() [2/3]

u_int8_t * RTPSink::setupForSRTP ( Boolean  useEncryption,
unsigned &  resultMIKEYStateMessageSize 
)

◆ setupForSRTP() [3/3]

void RTPSink::setupForSRTP ( u_int8_t const *  MIKEYStateMessage,
unsigned  MIKEYStateMessageSize 
)

◆ source()

FramedSource * MediaSink::source ( ) const
inlineinherited

Definition at line 42 of file MediaSink.hh.

42{return fSource;}
FramedSource * fSource
Definition: MediaSink.hh:58

References MediaSink::fSource.

◆ sourceIsCompatibleWithUs()

virtual Boolean MediaSink::sourceIsCompatibleWithUs ( MediaSource source)
protectedvirtualinherited

◆ SSRC()

u_int32_t RTPSink::SSRC ( ) const
inline

Definition at line 100 of file RTPSink.hh.

100{return fSSRC;}
u_int32_t fSSRC
Definition: RTPSink.hh:139

References fSSRC.

◆ 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 72 of file RTPSink.hh.

72 {
74 }
RTPTransmissionStatsDB * fTransmissionStatsDB
Definition: RTPSink.hh:148

References fTransmissionStatsDB.

Friends And Related Function Documentation

◆ RTCPInstance

friend class RTCPInstance
friend

Definition at line 116 of file RTPSink.hh.

◆ RTPTransmissionStats

friend class RTPTransmissionStats
friend

Definition at line 117 of file RTPSink.hh.

Field Documentation

◆ fAfterClientData

void* MediaSink::fAfterClientData
privateinherited

Definition at line 67 of file MediaSink.hh.

◆ fAfterFunc

afterPlayingFunc* MediaSink::fAfterFunc
privateinherited

Definition at line 66 of file MediaSink.hh.

◆ fCreationTime

struct timeval RTPSink::fCreationTime
private

Definition at line 145 of file RTPSink.hh.

Referenced by creationTime().

◆ fCrypto

SRTPCryptographicContext* RTPSink::fCrypto
protected

Definition at line 132 of file RTPSink.hh.

Referenced by getCrypto().

◆ fCurrentTimestamp

u_int32_t RTPSink::fCurrentTimestamp
protected

Definition at line 127 of file RTPSink.hh.

◆ fEnableRTCPReports

Boolean RTPSink::fEnableRTCPReports
private

Definition at line 142 of file RTPSink.hh.

Referenced by enableRTCPReports().

◆ fEnviron

UsageEnvironment& Medium::fEnviron
privateinherited

Definition at line 82 of file Media.hh.

Referenced by Medium::envir().

◆ fEstimatedBitrate

unsigned RTPSink::fEstimatedBitrate
private

Definition at line 146 of file RTPSink.hh.

Referenced by estimatedBitrate().

◆ fMediumName

char Medium::fMediumName[mediumNameMaxLen]
privateinherited

Definition at line 83 of file Media.hh.

Referenced by Medium::name().

◆ fMIKEYState

MIKEYState* RTPSink::fMIKEYState
protected

Definition at line 131 of file RTPSink.hh.

◆ fMostRecentPresentationTime

struct timeval fTotalOctetCountStartTime fInitialPresentationTime RTPSink::fMostRecentPresentationTime
protected

Definition at line 126 of file RTPSink.hh.

Referenced by mostRecentPresentationTime().

◆ fNextTask

TaskToken Medium::fNextTask
privateinherited

Definition at line 84 of file Media.hh.

Referenced by Medium::nextTask().

◆ fNextTimestampHasBeenPreset

Boolean RTPSink::fNextTimestampHasBeenPreset
private

Definition at line 141 of file RTPSink.hh.

Referenced by nextTimestampHasBeenPreset().

◆ fNumChannels

unsigned RTPSink::fNumChannels
private

Definition at line 144 of file RTPSink.hh.

Referenced by numChannels().

◆ fOctetCount

unsigned RTPSink::fOctetCount
protected

Definition at line 125 of file RTPSink.hh.

Referenced by octetCount().

◆ fPacketCount

unsigned RTPSink::fPacketCount
protected

Definition at line 125 of file RTPSink.hh.

Referenced by packetCount().

◆ fRTPInterface

RTPInterface RTPSink::fRTPInterface
protected

◆ fRTPPayloadFormatName

char const* RTPSink::fRTPPayloadFormatName
private

Definition at line 143 of file RTPSink.hh.

Referenced by rtpPayloadFormatName().

◆ fRTPPayloadType

unsigned char RTPSink::fRTPPayloadType
protected

Definition at line 124 of file RTPSink.hh.

Referenced by rtpPayloadType().

◆ fSeqNo

u_int16_t RTPSink::fSeqNo
protected

Definition at line 128 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 139 of file RTPSink.hh.

Referenced by SSRC().

◆ fTimestampBase

u_int32_t RTPSink::fTimestampBase
private

Definition at line 139 of file RTPSink.hh.

◆ fTimestampFrequency

unsigned RTPSink::fTimestampFrequency
private

Definition at line 140 of file RTPSink.hh.

Referenced by rtpTimestampFrequency(), and setRTPTimestampFrequency().

◆ fTotalOctetCount

unsigned RTPSink::fTotalOctetCount
protected

Definition at line 125 of file RTPSink.hh.

◆ fTransmissionStatsDB

RTPTransmissionStatsDB* RTPSink::fTransmissionStatsDB
private

Definition at line 148 of file RTPSink.hh.

Referenced by transmissionStatsDB().


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