class RtpReceiver : public RtpEventReceiver

Data structure for RTP Receiver

Inheritance:


Public Fields

RtpReceiverError receiverError
receiver error code;
RtcpReceiver* rtcpRecv
additional SDES and RTCP information

Public Methods

int addSource(RtpPacket* packet)
Add source to receiver
void constructRtpReceiver(RtpPayloadType apiFormat, RtpPayloadType networkFormat, int jitterNew)
consturctor init (don't call this function)
void emptyNetwork()
Empties pending network packets
int getApiPktSampleSize()
int getJitter()
int getNetworkPktSampleSize()
RtpPacket* getPacket()
Receives an RTP packet from network into buffer
int getPacketReceived()
int getPayloadReceived()
int getPort()
Port this stack is sending its singal
int getSocketFD()
Socket File Descriptor used for select()
UdpStack* getUdpStack()
get ptr of my UdpStack
void initSource(RtpPacket* packet)
Initalize source counters
int isValid(RtpPacket* packet)
Update souce information
RtpPacket* receive()
Receive an RTP packet from buffer
void removeSource(RtpSrc src, int flag = 0)
Remove source from receiver
NtpTime rtp2ntp(RtpTime time)
Convert from rtp time to ntp time using inital ntp time and sampleRate
RtpReceiver(UdpStack* udp, RtpPayloadType apiFormat = rtpPayloadPCMU, RtpPayloadType networkFormat = rtpPayloadPCMU, int jitterNew = 0)
Giving UdpStack ptr
RtpReceiver(int localMinPort, int localMaxPort, RtpPayloadType apiFormat = rtpPayloadPCMU, RtpPayloadType networkFormat = rtpPayloadPCMU, int jitterNew = 0)
using port range
RtpReceiver(int localPort, RtpPayloadType apiFormat = rtpPayloadPCMU, RtpPayloadType networkFormat = rtpPayloadPCMU, int jitterNew = 0)
using specified port
void setApiFormat(RtpPayloadType type, int no_samples, RtpPacket* p = NULL, bool print = true)
void setApiPktSize(int size)
void setNetworkFormat(RtpPayloadType type, int no_samples, RtpPacket* p = NULL, bool print = true)
void setNetworkPktSize(int size)
void setRTCPrecv(RtcpReceiver* rtcpRecv)
int updateSource(RtpPacket* packet)
Check if packet is valid
~RtpReceiver()

Public

Prints out the sequencing of buffer
Clears out buffer

Private Fields

int api_pktSampleSize
number of samples per RTP packet on api (typical 160 or 240)
RtpPayloadType apiFormat
format of payload for stack
int apiFormat_bitRate
payload specific sample rate
int apiFormat_perSampleSize
number of bytes per sample (typical 1 or 2, used for endian conversion)
int baseSampleRate
payload specific sample rate
bool freeStack
should I free my stack?
NtpTime gotime
next packet play time
static const int IN_BUFFER_SIZE
incoming buffer size, including RTP header
char inBuff[8192]
buffer incoming rtp pkt from network
int jitter
estimated jitter
int jitterSeed
inital jitter size
int jitterTime
jitter time in ms time
static const int MISORDER
max misordering tolerated
UdpStack* myStack
my UDP stack
int packetReceived
number of packets received
int payloadReceived
number of bytes of payload received
int playCycles
number of played sequence number cycles
NtpTime prevNtpTime
last NtpTime play
RtpPacket* prevPacket
previous packet
RtpTime prevRtpTime
last RtpTime play
RtpSeqNumber prevSeqPlay
previous sequence numer played
RtpSeqNumber prevSeqRecv
previous sequence number received
static const int PROB_MAX
max number of sequental lost packets allowed
int probation
probation, 0 source valid
bool probationSet
probation set flag
static const int RECV_BUF
buffer size for single pkt
int recvCycles
number of received sequence number cycles
friend class RtcpReceiver
allow RTCP stack to probe for information
friend class RtcpTransmitter
allow RTCP stack to probe for information
RtpTime sampleRate
rtp interval
NtpTime seedNtpTime
inital NTP timestamp
RtpTime seedRtpTime
inital RTP timestamp
RtpSeqNumber seedSeq
inital seqence number
bool sourceSet
source found flag
RtpSrc srcProbation
wouldn't listen to this source
RtpSrc ssrc
SRC number for this source
int transit
relative transmission time for prev packet

Private

jitter buffer

Documentation

Data structure for RTP Receiver
RtpReceiver(int localPort, RtpPayloadType apiFormat = rtpPayloadPCMU, RtpPayloadType networkFormat = rtpPayloadPCMU, int jitterNew = 0)
using specified port

RtpReceiver(int localMinPort, int localMaxPort, RtpPayloadType apiFormat = rtpPayloadPCMU, RtpPayloadType networkFormat = rtpPayloadPCMU, int jitterNew = 0)
using port range

RtpReceiver(UdpStack* udp, RtpPayloadType apiFormat = rtpPayloadPCMU, RtpPayloadType networkFormat = rtpPayloadPCMU, int jitterNew = 0)
Giving UdpStack ptr

void constructRtpReceiver(RtpPayloadType apiFormat, RtpPayloadType networkFormat, int jitterNew)
consturctor init (don't call this function)

~RtpReceiver()

RtpPacket* receive()
Receive an RTP packet from buffer. Do not delete packet, it's used in next recive call as replacement
Returns:
NULL if not time to play packet

RtpPacket* getPacket()
Receives an RTP packet from network into buffer
Returns:
NULL invalid packet, else packet pointer

int isValid(RtpPacket* packet)
Update souce information
Returns:
0 not valid, 1 valid

int updateSource(RtpPacket* packet)
Check if packet is valid
Returns:
0 on success, 1 fail

void initSource(RtpPacket* packet)
Initalize source counters

int addSource(RtpPacket* packet)
Add source to receiver
Returns:
1 if transmitter on probation

void removeSource(RtpSrc src, int flag = 0)
Remove source from receiver

NtpTime rtp2ntp(RtpTime time)
Convert from rtp time to ntp time using inital ntp time and sampleRate

Clears out buffer

Prints out the sequencing of buffer

void emptyNetwork()
Empties pending network packets

void setRTCPrecv(RtcpReceiver* rtcpRecv)

void setApiFormat(RtpPayloadType type, int no_samples, RtpPacket* p = NULL, bool print = true)

int getApiPktSampleSize()

void setApiPktSize(int size)

void setNetworkFormat(RtpPayloadType type, int no_samples, RtpPacket* p = NULL, bool print = true)

int getNetworkPktSampleSize()

void setNetworkPktSize(int size)

int getPacketReceived()

int getPayloadReceived()

int getJitter()

int getPort()
Port this stack is sending its singal

int getSocketFD()
Socket File Descriptor used for select()

RtpReceiverError receiverError
receiver error code;

UdpStack* getUdpStack()
get ptr of my UdpStack

static const int IN_BUFFER_SIZE
incoming buffer size, including RTP header

static const int RECV_BUF
buffer size for single pkt

static const int MISORDER
max misordering tolerated

static const int PROB_MAX
max number of sequental lost packets allowed

bool sourceSet
source found flag

RtpSrc ssrc
SRC number for this source

bool probationSet
probation set flag

RtpSrc srcProbation
wouldn't listen to this source

int probation
probation, 0 source valid

RtpSeqNumber seedSeq
inital seqence number

NtpTime seedNtpTime
inital NTP timestamp

RtpTime seedRtpTime
inital RTP timestamp

RtpTime sampleRate
rtp interval

int baseSampleRate
payload specific sample rate

RtpPacket* prevPacket
previous packet

NtpTime gotime
next packet play time

int packetReceived
number of packets received

int payloadReceived
number of bytes of payload received

RtpTime prevRtpTime
last RtpTime play

NtpTime prevNtpTime
last NtpTime play

RtpSeqNumber prevSeqRecv
previous sequence number received

RtpSeqNumber prevSeqPlay
previous sequence numer played

int recvCycles
number of received sequence number cycles

int playCycles
number of played sequence number cycles

int transit
relative transmission time for prev packet

int jitter
estimated jitter

int jitterTime
jitter time in ms time

jitter buffer

RtcpReceiver* rtcpRecv
additional SDES and RTCP information

friend class RtcpTransmitter
allow RTCP stack to probe for information

friend class RtcpReceiver
allow RTCP stack to probe for information

RtpPayloadType apiFormat
format of payload for stack

int api_pktSampleSize
number of samples per RTP packet on api (typical 160 or 240)

int apiFormat_perSampleSize
number of bytes per sample (typical 1 or 2, used for endian conversion)

int apiFormat_bitRate
payload specific sample rate

int jitterSeed
inital jitter size

UdpStack* myStack
my UDP stack

bool freeStack
should I free my stack?

char inBuff[8192]
buffer incoming rtp pkt from network


This class has no child classes.

alphabetic index hierarchy of classes


generated by doc++