class RtpSession

RTP Session including RTP/RTCP transmitter, RTP/RTCP receiver

Public Fields

RtpEvent _rtpEvent
Rtp event class

Public Methods

int checkIntervalRTCP()
Check if time to send RTCP packet return: 1 = time to send RTCP packet
void constructRtpSession(const char* remoteHost, int remotePort, int localPort, int rtcpRemotePort, int rtcpLocalPort, int portRange, RtpPayloadType apiPayloadType, RtpPayloadType networkPayloadType, int jitterNew)
consturctor init (don't call this function)
RtpPacket* createPacket(int padbyteSize = 0, int csrcCount = 0)
Creates an RTP packet for transmitter
int getByteReceived()
int getByteSent()
int getJitter()
int getLatency()
int getNetworkPktSampleSize()
int getPacketLost()
int getPacketReceived()
int getPacketSent()
RtpTime getPrevRtpTime()
Gets the previous packet's RTP timestamp
RtcpReceiver* getRtcpRecv()
RTCP receiver
RtcpTransmitter* getRtcpTran()
RTCP transmitter
RtpReceiver* getRtpRecv()
RTP recevier
RtpTransmitter* getRtpTran()
RTP transmitter
RtpSessionState getSessionState()
void processRTCP()
Checks RTCP interval, transmits and receeives if neccessary
RtpPacket* receive()
Receives RTP packet information from network fn will deallocate packet on next call
int receiveRTCP()
receive and read compound RTCP packet @eturn 0 if no packet received, else 1 on sucess
int releaseRtcpPort()
release the rtcp port
int releaseRtpPort()
release the rtp port
int reserveRtcpPort(int localPort, int portRange = 0)
reserves a rtcp port by instantiating a RtcpReceiver object
int reserveRtpPort(int localMin = -1, int localMax = -1)
reserves a rtp port by instantiating a RtpReceiver object
RtpSession(const char* remoteHost, int remotePort = 0, int localPort = 0, int rtcpRemotePort = 0, int rtcpLocalPort = 0, RtpPayloadType apiPayloadType = rtpPayloadPCMU, RtpPayloadType networkPayloadType = rtpPayloadPCMU, int jitterNew = 5)
RtpSession(const char* remoteHost, int remotePort, int localPort, int rtcpRemotePort, int rtcpLocalPort, int portRange, RtpPayloadType apiPayloadType = rtpPayloadPCMU, RtpPayloadType networkPayloadType = rtpPayloadPCMU, int jitterNew = 5)
void setApiFormat(RtpPayloadType type, int size)
void setApiPktSampleSize(int size)
size is in number of samples
void setDTMFInterface( DTMFInterface* t )
DTMF callback function
int setReceiver( int localMinPort, int rtcpLocalPort, int portRange, RtpPayloadType apiFormat, RtpPayloadType networkFormat, int jitterNew = 5 )
set receivers
int setTransmiter( const char* remoteHost, int remotePort, int rtcpRemotePort, RtpPayloadType apiFormat, RtpPayloadType networkFormat )
set transmitters
int transmit(RtpPacket* packet)
Transmits packet onto network
int transmitEvent( int event )
Transmit DTMF event in RTP on network
int transmitRTCP()
Create and transmit compound RTCP packet
int transmitRTCPBYE()
Create and transmit a SR and BYE compound packet
~RtpSession()

Public

not implemented
not implemented
void Session Functions(RtpSessionState state)

Private Fields

RtpReceiver* recv
Internal pointer to RTP receiver
RtcpReceiver* rtcpRecv
Internal pointer to RTCP receiver
RtcpTransmitter* rtcpTran
Internal pointer to RTCP transmitter
RtpSessionError sessionError
session error code;
RtpSessionState sessionState
session state
RtpTransmitter* tran
Internal pointer to RTP transmitter

Documentation

RTP Session including RTP/RTCP transmitter, RTP/RTCP receiver
RtpSession(const char* remoteHost, int remotePort = 0, int localPort = 0, int rtcpRemotePort = 0, int rtcpLocalPort = 0, RtpPayloadType apiPayloadType = rtpPayloadPCMU, RtpPayloadType networkPayloadType = rtpPayloadPCMU, int jitterNew = 5)
Parameters:
ports - All ports are optional
jitterNew - = -1 to bypass jitterBuffer

RtpSession(const char* remoteHost, int remotePort, int localPort, int rtcpRemotePort, int rtcpLocalPort, int portRange, RtpPayloadType apiPayloadType = rtpPayloadPCMU, RtpPayloadType networkPayloadType = rtpPayloadPCMU, int jitterNew = 5)
Parameters:
ports - All ports are optional by passing 0. Port range is availiable here.
jitterNew - = -1 to bypass jitterBuffer

void constructRtpSession(const char* remoteHost, int remotePort, int localPort, int rtcpRemotePort, int rtcpLocalPort, int portRange, RtpPayloadType apiPayloadType, RtpPayloadType networkPayloadType, int jitterNew)
consturctor init (don't call this function)

~RtpSession()

int reserveRtpPort(int localMin = -1, int localMax = -1)
reserves a rtp port by instantiating a RtpReceiver object

int releaseRtpPort()
release the rtp port

int reserveRtcpPort(int localPort, int portRange = 0)
reserves a rtcp port by instantiating a RtcpReceiver object

int releaseRtcpPort()
release the rtcp port

void Session Functions(RtpSessionState state)
Being in a particular state disables some functions. For example, in recvonly state, the transmit function will do nothing. Availiable state are listed in rtpTyes.h

RtpSessionState getSessionState()

int setReceiver( int localMinPort, int rtcpLocalPort, int portRange, RtpPayloadType apiFormat, RtpPayloadType networkFormat, int jitterNew = 5 )
set receivers

int setTransmiter( const char* remoteHost, int remotePort, int rtcpRemotePort, RtpPayloadType apiFormat, RtpPayloadType networkFormat )
set transmitters

void setApiFormat(RtpPayloadType type, int size)

void setApiPktSampleSize(int size)
size is in number of samples

int getNetworkPktSampleSize()

int getPacketSent()

int getByteSent()

int getPacketReceived()

int getByteReceived()

int getPacketLost()

int getJitter()

int getLatency()

not implemented

not implemented

RtpPacket* createPacket(int padbyteSize = 0, int csrcCount = 0)
Creates an RTP packet for transmitter
Parameters:
no_samples - number of samples for specified payload
padbyteSize - always 0, not fully implemented
csrc_count - number of contributing sources to packet

RtpTime getPrevRtpTime()
Gets the previous packet's RTP timestamp

int transmit(RtpPacket* packet)
Transmits packet onto network
Returns:
-1 error, otherwise size sent on sucess

int transmitEvent( int event )
Transmit DTMF event in RTP on network
Returns:
-1 error, otherwise 0

RtpPacket* receive()
Receives RTP packet information from network fn will deallocate packet on next call
Returns:
-1 error in packet or network, 0 no packet received, otherwise bytes receeived

void processRTCP()
Checks RTCP interval, transmits and receeives if neccessary

int transmitRTCP()
Create and transmit compound RTCP packet
Returns:
-1 failure, else number of bytes sent on success

int transmitRTCPBYE()
Create and transmit a SR and BYE compound packet
Returns:
-1 failure, else number of bytes sent on success

int receiveRTCP()
receive and read compound RTCP packet @eturn 0 if no packet received, else 1 on sucess

int checkIntervalRTCP()
Check if time to send RTCP packet return: 1 = time to send RTCP packet

RtpTransmitter* getRtpTran()
RTP transmitter

RtpReceiver* getRtpRecv()
RTP recevier

RtcpTransmitter* getRtcpTran()
RTCP transmitter

RtcpReceiver* getRtcpRecv()
RTCP receiver

RtpEvent _rtpEvent
Rtp event class

void setDTMFInterface( DTMFInterface* t )
DTMF callback function

RtpTransmitter* tran
Internal pointer to RTP transmitter

RtpReceiver* recv
Internal pointer to RTP receiver

RtcpTransmitter* rtcpTran
Internal pointer to RTCP transmitter

RtcpReceiver* rtcpRecv
Internal pointer to RTCP receiver

RtpSessionState sessionState
session state

RtpSessionError sessionError
session error code;


This class has no child classes.

alphabetic index hierarchy of classes


generated by doc++