INET Framework for OMNeT++/OMNEST
inet::rtp::RTPReceiverInfo Class Reference

This class, a subclass of RTPParticipantInfo, is used for storing information about other RTP endsystems. More...

#include <RTPReceiverInfo.h>

Inheritance diagram for inet::rtp::RTPReceiverInfo:
inet::rtp::RTPParticipantInfo inet::rtp::RTPParticipantInfo_Base

Public Types

enum  { MAX_INACTIVE_INTERVALS = 5 }
 

Public Member Functions

 RTPReceiverInfo (uint32 ssrc=0)
 Default constructor. More...
 
 RTPReceiverInfo (const RTPReceiverInfo &receiverInfo)
 Copy constructor. More...
 
virtual ~RTPReceiverInfo ()
 Destructor. More...
 
RTPReceiverInfooperator= (const RTPReceiverInfo &receiverInfo)
 Assignment operator. More...
 
virtual RTPReceiverInfodup () const override
 Duplicates this RTPReceiverInfo by calling the copy constructor. More...
 
virtual void processRTPPacket (RTPPacket *packet, int id, simtime_t arrivalTime) override
 Extracts information of the given RTPPacket. More...
 
virtual void processSenderReport (SenderReport *report, simtime_t arrivalTime)
 Extracts information of the given SenderReport. More...
 
virtual void processSDESChunk (SDESChunk *sdesChunk, simtime_t arrivalTime) override
 Extracts information of the given SDESChunk. More...
 
virtual ReceptionReportreceptionReport (simtime_t now) override
 Returns a ReceptionReport if this RTP end system is a sender, nullptr otherwise. More...
 
virtual void nextInterval (simtime_t now) override
 Informs this RTPReceiverInfo that one rtcp interval has past. More...
 
virtual bool isActive ()
 Returns true if this RTP end system is regarded active. More...
 
virtual bool isValid ()
 Returns true if this RTP end system is regarded valid. More...
 
virtual bool toBeDeleted (simtime_t now) override
 Returns true if this RTP end system should be deleted from the list of known RTP session participant. More...
 
- Public Member Functions inherited from inet::rtp::RTPParticipantInfo
 RTPParticipantInfo (uint32 ssrc=0)
 Default constructor. More...
 
 RTPParticipantInfo (const RTPParticipantInfo &participantInfo)
 Copy constructor. More...
 
virtual ~RTPParticipantInfo ()
 Destructor. More...
 
RTPParticipantInfooperator= (const RTPParticipantInfo &participantInfo)
 Assignment operator. More...
 
virtual void processSenderReport (SenderReport &report, simtime_t arrivalTime)
 This method extracts information about an RTP endsystem as provided by the given SenderReport. More...
 
virtual void processReceptionReport (ReceptionReport &report, simtime_t arrivalTime)
 This method extracts information of the given ReceptionReport. More...
 
virtual SDESChunkgetSDESChunk () const
 Returns a copy of the sdes chunk used for storing source description items about this system. More...
 
virtual void addSDESItem (SDESItem *sdesItem)
 Adds this sdes item to the sdes chunk of this participant. More...
 
virtual SenderReportsenderReport (simtime_t now)
 This method is intended to be overwritten by subclasses which are used for storing information about itself. More...
 
virtual bool isSender () const
 Returns true if this endsystem has sent at least one RTP data packet during the last two rtcp intervals (including the current one). More...
 
virtual uint32 getSsrc () const override
 Returns the ssrc identifier of the RTP endsystem. More...
 
virtual void setSsrc (uint32 ssrc) override
 Sets the ssrc identifier. More...
 
virtual void addSDESItem (SDESItem::SDES_ITEM_TYPE type, const char *content)
 Creates a new SDESItem and adds it to the SDESChunk stored in this RTPParticipantInfo. More...
 
virtual void parsimPack (cCommBuffer *b) const override
 
virtual void parsimUnpack (cCommBuffer *b) override
 
- Public Member Functions inherited from inet::rtp::RTPParticipantInfo_Base
virtual ~RTPParticipantInfo_Base ()
 
virtual void parsimPack (omnetpp::cCommBuffer *b) const override
 
virtual void parsimUnpack (omnetpp::cCommBuffer *b) override
 
virtual IPv4AddressgetAddress ()
 
virtual const IPv4AddressgetAddress () const
 
virtual void setAddress (const IPv4Address &address)
 
virtual int getRTPPort () const
 
virtual void setRTPPort (int RTPPort)
 
virtual int getRTCPPort () const
 
virtual void setRTCPPort (int RTCPPort)
 

Protected Attributes

uint16 _sequenceNumberBase = 0
 The sequence number of the first RTPPacket received. More...
 
uint16 _highestSequenceNumber = 0
 The highest sequence number of an RTPPacket received. More...
 
uint32 _highestSequenceNumberPrior = 0
 The highest sequence number of an RTPPacket received before the beginning of the current rtcp interval. More...
 
uint32 _sequenceNumberCycles = 0
 The number of sequence number wrap arounds. More...
 
uint32 _packetsReceived = 0
 How many RTP packets from this source have been received. More...
 
uint32 _packetsReceivedPrior = 0
 How many RTP packets have been received from this source before the current rtcp interval began. More...
 
simtime_t _jitter
 The interarrival jitter. More...
 
int _clockRate = 0
 The output vector for jitter value. More...
 
uint32 _lastSenderReportRTPTimeStamp = 0
 The RTP time stamp of the last SenderReport received from this sender. More...
 
uint64 _lastSenderReportNTPTimeStamp = 0
 The ntp time stamp of the last SenderReport received from this sender. More...
 
uint32 _lastPacketRTPTimeStamp = 0
 The RTP time stamp of the last RTPPacket received from this sender. More...
 
simtime_t _lastPacketArrivalTime
 The arrival time of the last RTPPacket received from this sender. More...
 
simtime_t _lastSenderReportArrivalTime
 The arrival time of the last SenderReport received from this sender. More...
 
int _inactiveIntervals = 0
 The consecutive number of rtcp intervals this rtcp end system hasn't sent anything. More...
 
simtime_t _startOfInactivity = 0.0
 The time when this RTP end system has been inactive for five consecutive rtcp intervals. More...
 
int _itemsReceived = 0
 The number of RTP and rtcp packets received from this RTP end system. More...
 
- Protected Attributes inherited from inet::rtp::RTPParticipantInfo
SDESChunk _sdesChunk
 Used for storing sdes information about this RTP endsystem. More...
 
int _silentIntervals
 Stores the number of rtcp intervals (including the current one) during which this RTP endsystem hasn't sent any RTP data packets. More...
 
- Protected Attributes inherited from inet::rtp::RTPParticipantInfo_Base
IPv4Address address
 
int RTPPort
 
int RTCPPort
 

Private Member Functions

void copy (const RTPReceiverInfo &other)
 

Additional Inherited Members

- Static Public Member Functions inherited from inet::rtp::RTPParticipantInfo
static std::string ssrcToName (uint32 ssrc)
 This method returns the given 32 bit ssrc identifier as an 8 character hexadecimal number which is used as name of an RTPParticipantInfo object. More...
 
- Protected Member Functions inherited from inet::rtp::RTPParticipantInfo_Base
bool operator== (const RTPParticipantInfo_Base &)
 
 RTPParticipantInfo_Base (const char *name=nullptr)
 
 RTPParticipantInfo_Base (const RTPParticipantInfo_Base &other)
 
RTPParticipantInfo_Baseoperator= (const RTPParticipantInfo_Base &other)
 

Detailed Description

This class, a subclass of RTPParticipantInfo, is used for storing information about other RTP endsystems.

This class processes RTP packets, rtcp sender reports and rtcp sdes chunks originating from this endsystem.

Member Enumeration Documentation

anonymous enum
Enumerator
MAX_INACTIVE_INTERVALS 

Constructor & Destructor Documentation

inet::rtp::RTPReceiverInfo::RTPReceiverInfo ( uint32  ssrc = 0)

Default constructor.

Referenced by dup().

29  : RTPParticipantInfo(ssrc)
30 {
31 }
RTPParticipantInfo(uint32 ssrc=0)
Default constructor.
Definition: RTPParticipantInfo.cc:29
inet::rtp::RTPReceiverInfo::RTPReceiverInfo ( const RTPReceiverInfo receiverInfo)

Copy constructor.

33  : RTPParticipantInfo(receiverInfo)
34 {
35  copy(receiverInfo);
36 }
void copy(const RTPReceiverInfo &other)
Definition: RTPReceiverInfo.cc:51
RTPParticipantInfo(uint32 ssrc=0)
Default constructor.
Definition: RTPParticipantInfo.cc:29
inet::rtp::RTPReceiverInfo::~RTPReceiverInfo ( )
virtual

Destructor.

39 {
40 }

Member Function Documentation

void inet::rtp::RTPReceiverInfo::copy ( const RTPReceiverInfo other)
private

Referenced by operator=(), and RTPReceiverInfo().

52 {
53  _sequenceNumberBase = receiverInfo._sequenceNumberBase;
54  _highestSequenceNumber = receiverInfo._highestSequenceNumber;
55  _highestSequenceNumberPrior = receiverInfo._highestSequenceNumberPrior;
56  _sequenceNumberCycles = receiverInfo._sequenceNumberCycles;
57 
58  _packetsReceived = receiverInfo._packetsReceived;
59  _packetsReceivedPrior = receiverInfo._packetsReceivedPrior;
60 
61  _jitter = receiverInfo._jitter;
62  _clockRate = receiverInfo._clockRate;
63  _lastSenderReportRTPTimeStamp = receiverInfo._lastSenderReportRTPTimeStamp;
64  _lastSenderReportNTPTimeStamp = receiverInfo._lastSenderReportNTPTimeStamp;
65  _lastPacketRTPTimeStamp = receiverInfo._lastPacketRTPTimeStamp;
66 
67  _lastPacketArrivalTime = receiverInfo._lastPacketArrivalTime;
68  _lastSenderReportArrivalTime = receiverInfo._lastSenderReportArrivalTime;
69 
70  _inactiveIntervals = receiverInfo._inactiveIntervals;
71  _startOfInactivity = receiverInfo._startOfInactivity;
72  _itemsReceived = receiverInfo._itemsReceived;
73 }
simtime_t _startOfInactivity
The time when this RTP end system has been inactive for five consecutive rtcp intervals.
Definition: RTPReceiverInfo.h:202
simtime_t _lastPacketArrivalTime
The arrival time of the last RTPPacket received from this sender.
Definition: RTPReceiverInfo.h:185
uint16 _highestSequenceNumber
The highest sequence number of an RTPPacket received.
Definition: RTPReceiverInfo.h:121
uint64 _lastSenderReportNTPTimeStamp
The ntp time stamp of the last SenderReport received from this sender.
Definition: RTPReceiverInfo.h:173
uint32 _lastSenderReportRTPTimeStamp
The RTP time stamp of the last SenderReport received from this sender.
Definition: RTPReceiverInfo.h:168
uint32 _lastPacketRTPTimeStamp
The RTP time stamp of the last RTPPacket received from this sender.
Definition: RTPReceiverInfo.h:179
uint32 _sequenceNumberCycles
The number of sequence number wrap arounds.
Definition: RTPReceiverInfo.h:132
int _itemsReceived
The number of RTP and rtcp packets received from this RTP end system.
Definition: RTPReceiverInfo.h:207
uint16 _sequenceNumberBase
The sequence number of the first RTPPacket received.
Definition: RTPReceiverInfo.h:116
uint32 _packetsReceivedPrior
How many RTP packets have been received from this source before the current rtcp interval began...
Definition: RTPReceiverInfo.h:143
uint32 _highestSequenceNumberPrior
The highest sequence number of an RTPPacket received before the beginning of the current rtcp interva...
Definition: RTPReceiverInfo.h:127
simtime_t _jitter
The interarrival jitter.
Definition: RTPReceiverInfo.h:148
simtime_t _lastSenderReportArrivalTime
The arrival time of the last SenderReport received from this sender.
Definition: RTPReceiverInfo.h:190
uint32 _packetsReceived
How many RTP packets from this source have been received.
Definition: RTPReceiverInfo.h:137
int _clockRate
The output vector for jitter value.
Definition: RTPReceiverInfo.h:163
int _inactiveIntervals
The consecutive number of rtcp intervals this rtcp end system hasn&#39;t sent anything.
Definition: RTPReceiverInfo.h:196
RTPReceiverInfo * inet::rtp::RTPReceiverInfo::dup ( ) const
overridevirtual

Duplicates this RTPReceiverInfo by calling the copy constructor.

Reimplemented from inet::rtp::RTPParticipantInfo.

76 {
77  return new RTPReceiverInfo(*this);
78 }
RTPReceiverInfo(uint32 ssrc=0)
Default constructor.
Definition: RTPReceiverInfo.cc:29
bool inet::rtp::RTPReceiverInfo::isActive ( )
virtual

Returns true if this RTP end system is regarded active.

Referenced by toBeDeleted().

216 {
218 }
int _inactiveIntervals
The consecutive number of rtcp intervals this rtcp end system hasn&#39;t sent anything.
Definition: RTPReceiverInfo.h:196
bool inet::rtp::RTPReceiverInfo::isValid ( )
virtual

Returns true if this RTP end system is regarded valid.

Referenced by toBeDeleted().

221 {
223 }
int _itemsReceived
The number of RTP and rtcp packets received from this RTP end system.
Definition: RTPReceiverInfo.h:207
void inet::rtp::RTPReceiverInfo::nextInterval ( simtime_t  now)
overridevirtual

Informs this RTPReceiverInfo that one rtcp interval has past.

Reimplemented from inet::rtp::RTPParticipantInfo.

205 {
208  _startOfInactivity = now;
209  }
213 }
simtime_t _startOfInactivity
The time when this RTP end system has been inactive for five consecutive rtcp intervals.
Definition: RTPReceiverInfo.h:202
uint16 _highestSequenceNumber
The highest sequence number of an RTPPacket received.
Definition: RTPReceiverInfo.h:121
uint32 _sequenceNumberCycles
The number of sequence number wrap arounds.
Definition: RTPReceiverInfo.h:132
virtual void nextInterval(simtime_t now)
This method should be called by the rtcp module which uses this class for storing information every t...
Definition: RTPParticipantInfo.cc:123
uint32 _packetsReceivedPrior
How many RTP packets have been received from this source before the current rtcp interval began...
Definition: RTPReceiverInfo.h:143
uint32 _highestSequenceNumberPrior
The highest sequence number of an RTPPacket received before the beginning of the current rtcp interva...
Definition: RTPReceiverInfo.h:127
uint32 _packetsReceived
How many RTP packets from this source have been received.
Definition: RTPReceiverInfo.h:137
int _inactiveIntervals
The consecutive number of rtcp intervals this rtcp end system hasn&#39;t sent anything.
Definition: RTPReceiverInfo.h:196
RTPReceiverInfo & inet::rtp::RTPReceiverInfo::operator= ( const RTPReceiverInfo receiverInfo)

Assignment operator.

43 {
44  if (this == &receiverInfo)
45  return *this;
46  RTPParticipantInfo::operator=(receiverInfo);
47  copy(receiverInfo);
48  return *this;
49 }
void copy(const RTPReceiverInfo &other)
Definition: RTPReceiverInfo.cc:51
RTPParticipantInfo & operator=(const RTPParticipantInfo &participantInfo)
Assignment operator.
Definition: RTPParticipantInfo.cc:51
void inet::rtp::RTPReceiverInfo::processRTPPacket ( RTPPacket packet,
int  id,
simtime_t  arrivalTime 
)
overridevirtual

Extracts information of the given RTPPacket.

Also sets _inactiveIntervals to 0.

Reimplemented from inet::rtp::RTPParticipantInfo.

81 {
82  // this endsystem sends, it isn't inactive
84 
87 
88  if (_packetsReceived == 1) {
89  _sequenceNumberBase = packet->getSequenceNumber();
90  }
91  else {
92  /*if (packet->getSequenceNumber() > _highestSequenceNumber+1)
93  {
94  _packetLostOutVector.record(packet->getSequenceNumber() - _highestSequenceNumber -1);
95  for (int i = _highestSequenceNumber+1; i< packet->getSequenceNumber(); i++ )
96  {
97  //std::cout << "id = "<< id <<" SequeceNumber loss = "<<i<<endl;
98  packetSequenceLostLogFile = fopen ("PacketLossLog.log","+w");
99  if (packetSequenceLostLogFile != nullptr)
100  {
101  //sprintf (line, "id = %d SequeceNumber loss = %f ", id,i);
102  fputs (i, packetSequenceLostLogFile);
103  fclose (packetSequenceLostLogFile);
104  }
105  }
106  }*/
107 
108  if (packet->getSequenceNumber() > _highestSequenceNumber) {
109  // it is possible that this is a late packet from the
110  // previous sequence wrap
111  if (!(packet->getSequenceNumber() > 0xFFEF && _highestSequenceNumber < 0x10))
112  _highestSequenceNumber = packet->getSequenceNumber();
113  }
114  else {
115  // is it a sequence number wrap around 0xFFFF to 0x0000 ?
116  if (packet->getSequenceNumber() < 0x10 && _highestSequenceNumber > 0xFFEF) {
117  _sequenceNumberCycles += 0x00010000;
118  _highestSequenceNumber = packet->getSequenceNumber();
119  }
120  }
121  // calculate interarrival jitter
122  if (_clockRate != 0) {
123  simtime_t d = packet->getTimeStamp() - _lastPacketRTPTimeStamp
124  - (arrivalTime - _lastPacketArrivalTime) * (double)_clockRate;
125  if (d < 0)
126  d = -d;
127  _jitter = _jitter + (d - _jitter) / 16;
128  }
129 
130  _lastPacketRTPTimeStamp = packet->getTimeStamp();
131  _lastPacketArrivalTime = arrivalTime;
132  }
133 
134  RTPParticipantInfo::processRTPPacket(packet, id, arrivalTime);
135 }
simtime_t _lastPacketArrivalTime
The arrival time of the last RTPPacket received from this sender.
Definition: RTPReceiverInfo.h:185
uint16 _highestSequenceNumber
The highest sequence number of an RTPPacket received.
Definition: RTPReceiverInfo.h:121
uint32 _lastPacketRTPTimeStamp
The RTP time stamp of the last RTPPacket received from this sender.
Definition: RTPReceiverInfo.h:179
uint32 _sequenceNumberCycles
The number of sequence number wrap arounds.
Definition: RTPReceiverInfo.h:132
int _itemsReceived
The number of RTP and rtcp packets received from this RTP end system.
Definition: RTPReceiverInfo.h:207
RTPParticipantInfo(uint32 ssrc=0)
Default constructor.
Definition: RTPParticipantInfo.cc:29
uint16 _sequenceNumberBase
The sequence number of the first RTPPacket received.
Definition: RTPReceiverInfo.h:116
virtual void processRTPPacket(RTPPacket *packet, int id, simtime_t arrivalTime) override
Extracts information of the given RTPPacket.
Definition: RTPReceiverInfo.cc:80
simtime_t _jitter
The interarrival jitter.
Definition: RTPReceiverInfo.h:148
uint32 _packetsReceived
How many RTP packets from this source have been received.
Definition: RTPReceiverInfo.h:137
int _clockRate
The output vector for jitter value.
Definition: RTPReceiverInfo.h:163
int _inactiveIntervals
The consecutive number of rtcp intervals this rtcp end system hasn&#39;t sent anything.
Definition: RTPReceiverInfo.h:196
if(!(yy_init))
Definition: lexer.cc:1644
void inet::rtp::RTPReceiverInfo::processSDESChunk ( SDESChunk sdesChunk,
simtime_t  arrivalTime 
)
overridevirtual

Extracts information of the given SDESChunk.

Reimplemented from inet::rtp::RTPParticipantInfo.

158 {
159  RTPParticipantInfo::processSDESChunk(sdesChunk, arrivalTime);
160  _itemsReceived++;
161  _inactiveIntervals = 0;
162 }
int _itemsReceived
The number of RTP and rtcp packets received from this RTP end system.
Definition: RTPReceiverInfo.h:207
int _inactiveIntervals
The consecutive number of rtcp intervals this rtcp end system hasn&#39;t sent anything.
Definition: RTPReceiverInfo.h:196
virtual void processSDESChunk(SDESChunk *sdesChunk, simtime_t arrivalTime)
This method extracts sdes information of the given sdes chunk.and stores it.
Definition: RTPParticipantInfo.cc:87
void inet::rtp::RTPReceiverInfo::processSenderReport ( SenderReport report,
simtime_t  arrivalTime 
)
virtual

Extracts information of the given SenderReport.

138 {
139  _lastSenderReportArrivalTime = arrivalTime;
141  _lastSenderReportRTPTimeStamp = report->getRTPTimeStamp();
142  _lastSenderReportNTPTimeStamp = report->getNTPTimeStamp();
143  }
144  else if (_clockRate == 0) {
145  uint32 rtpTicks = report->getRTPTimeStamp() - _lastSenderReportRTPTimeStamp;
146  uint64 ntpDifference = report->getNTPTimeStamp() - _lastSenderReportNTPTimeStamp;
147  long double ntpSeconds = (long double)ntpDifference / (long double)(0xFFFFFFFF);
148  _clockRate = (int)((long double)rtpTicks / ntpSeconds);
149  }
150 
151  _inactiveIntervals = 0;
152  _itemsReceived++;
153 
154  delete report;
155 }
uint64 _lastSenderReportNTPTimeStamp
The ntp time stamp of the last SenderReport received from this sender.
Definition: RTPReceiverInfo.h:173
uint32 _lastSenderReportRTPTimeStamp
The RTP time stamp of the last SenderReport received from this sender.
Definition: RTPReceiverInfo.h:168
int _itemsReceived
The number of RTP and rtcp packets received from this RTP end system.
Definition: RTPReceiverInfo.h:207
uint64_t uint64
Definition: Compat.h:28
simtime_t _lastSenderReportArrivalTime
The arrival time of the last SenderReport received from this sender.
Definition: RTPReceiverInfo.h:190
int _clockRate
The output vector for jitter value.
Definition: RTPReceiverInfo.h:163
int _inactiveIntervals
The consecutive number of rtcp intervals this rtcp end system hasn&#39;t sent anything.
Definition: RTPReceiverInfo.h:196
uint32_t uint32
Definition: Compat.h:30
ReceptionReport * inet::rtp::RTPReceiverInfo::receptionReport ( simtime_t  now)
overridevirtual

Returns a ReceptionReport if this RTP end system is a sender, nullptr otherwise.

Reimplemented from inet::rtp::RTPParticipantInfo.

165 {
166  if (isSender()) {
167  ReceptionReport *receptionReport = new ReceptionReport();
168  receptionReport->setSsrc(getSsrc());
169 
172  uint64 packetsLost = packetsExpected - _packetsReceived;
173 
174  int32 packetsExpectedInInterval =
176  int32 packetsReceivedInInterval = _packetsReceived - _packetsReceivedPrior;
177  int32 packetsLostInInterval = packetsExpectedInInterval - packetsReceivedInInterval;
178  uint8 fractionLost = 0;
179  if (packetsLostInInterval > 0) {
180  fractionLost = (packetsLostInInterval << 8) / packetsExpectedInInterval;
181  }
182 
183  receptionReport->setFractionLost(fractionLost);
184  receptionReport->setPacketsLostCumulative(packetsLost);
185  receptionReport->setSequenceNumber(_sequenceNumberCycles + _highestSequenceNumber);
186 
187  receptionReport->setJitter((uint32)SIMTIME_DBL(_jitter)); //XXX ??? store it in secs? --Andras
188 
189  // the middle 32 bit of the ntp time stamp of the last sender report
190  receptionReport->setLastSR((_lastSenderReportNTPTimeStamp >> 16) & 0xFFFFFFFF);
191 
192  // the delay since the arrival of the last sender report in units
193  // of 1 / 65536 seconds
194  // 0 if no sender report has ben received
195  receptionReport->setDelaySinceLastSR(_lastSenderReportArrivalTime == 0.0 ? 0
196  : (uint32)(SIMTIME_DBL(now - _lastSenderReportArrivalTime) * 65536.0));
197 
198  return receptionReport;
199  }
200  else
201  return nullptr;
202 }
uint8_t uint8
Definition: Compat.h:34
uint16 _highestSequenceNumber
The highest sequence number of an RTPPacket received.
Definition: RTPReceiverInfo.h:121
uint64 _lastSenderReportNTPTimeStamp
The ntp time stamp of the last SenderReport received from this sender.
Definition: RTPReceiverInfo.h:173
uint32 _sequenceNumberCycles
The number of sequence number wrap arounds.
Definition: RTPReceiverInfo.h:132
uint16 _sequenceNumberBase
The sequence number of the first RTPPacket received.
Definition: RTPReceiverInfo.h:116
uint32 _packetsReceivedPrior
How many RTP packets have been received from this source before the current rtcp interval began...
Definition: RTPReceiverInfo.h:143
virtual ReceptionReport * receptionReport(simtime_t now) override
Returns a ReceptionReport if this RTP end system is a sender, nullptr otherwise.
Definition: RTPReceiverInfo.cc:164
uint32 _highestSequenceNumberPrior
The highest sequence number of an RTPPacket received before the beginning of the current rtcp interva...
Definition: RTPReceiverInfo.h:127
simtime_t _jitter
The interarrival jitter.
Definition: RTPReceiverInfo.h:148
simtime_t _lastSenderReportArrivalTime
The arrival time of the last SenderReport received from this sender.
Definition: RTPReceiverInfo.h:190
uint64_t uint64
Definition: Compat.h:28
uint32 _packetsReceived
How many RTP packets from this source have been received.
Definition: RTPReceiverInfo.h:137
int32_t int32
Definition: Compat.h:31
uint32_t uint32
Definition: Compat.h:30
virtual bool isSender() const
Returns true if this endsystem has sent at least one RTP data packet during the last two rtcp interva...
Definition: RTPParticipantInfo.cc:108
if(!(yy_init))
Definition: lexer.cc:1644
virtual uint32 getSsrc() const override
Returns the ssrc identifier of the RTP endsystem.
Definition: RTPParticipantInfo.cc:133
bool inet::rtp::RTPReceiverInfo::toBeDeleted ( simtime_t  now)
overridevirtual

Returns true if this RTP end system should be deleted from the list of known RTP session participant.

This method should be called directly after nextInterval().

Reimplemented from inet::rtp::RTPParticipantInfo.

226 {
227  // an RTP system should be removed from the list of known systems
228  // when it hasn't been validated and hasn't been active for
229  // 5 rtcp intervals or if it has been validated and has been
230  // inactive for 30 minutes
231  return (!isValid() && !isActive()) || (isValid() && !isActive() && (now - _startOfInactivity > 60.0 * 30.0));
232 }
simtime_t _startOfInactivity
The time when this RTP end system has been inactive for five consecutive rtcp intervals.
Definition: RTPReceiverInfo.h:202
virtual bool isValid()
Returns true if this RTP end system is regarded valid.
Definition: RTPReceiverInfo.cc:220
virtual bool isActive()
Returns true if this RTP end system is regarded active.
Definition: RTPReceiverInfo.cc:215

Member Data Documentation

int inet::rtp::RTPReceiverInfo::_clockRate = 0
protected

The output vector for jitter value.

The output vector for packet lost The clock rate (in ticks per second) the sender increases the RTP timestamps. It is calculated when two sender reports have been received.

Referenced by copy(), processRTPPacket(), and processSenderReport().

uint16 inet::rtp::RTPReceiverInfo::_highestSequenceNumber = 0
protected

The highest sequence number of an RTPPacket received.

Referenced by copy(), nextInterval(), processRTPPacket(), and receptionReport().

uint32 inet::rtp::RTPReceiverInfo::_highestSequenceNumberPrior = 0
protected

The highest sequence number of an RTPPacket received before the beginning of the current rtcp interval.

Referenced by copy(), nextInterval(), and receptionReport().

int inet::rtp::RTPReceiverInfo::_inactiveIntervals = 0
protected

The consecutive number of rtcp intervals this rtcp end system hasn't sent anything.

Referenced by copy(), isActive(), nextInterval(), processRTPPacket(), processSDESChunk(), and processSenderReport().

int inet::rtp::RTPReceiverInfo::_itemsReceived = 0
protected

The number of RTP and rtcp packets received from this RTP end system.

Referenced by copy(), isValid(), processRTPPacket(), processSDESChunk(), and processSenderReport().

simtime_t inet::rtp::RTPReceiverInfo::_jitter
protected

The interarrival jitter.

See RTP rfc for details.

Referenced by copy(), processRTPPacket(), and receptionReport().

simtime_t inet::rtp::RTPReceiverInfo::_lastPacketArrivalTime
protected

The arrival time of the last RTPPacket received from this sender.

Needed for calculating the jitter.

Referenced by copy(), and processRTPPacket().

uint32 inet::rtp::RTPReceiverInfo::_lastPacketRTPTimeStamp = 0
protected

The RTP time stamp of the last RTPPacket received from this sender.

Needed for calculating the jitter.

Referenced by copy(), and processRTPPacket().

simtime_t inet::rtp::RTPReceiverInfo::_lastSenderReportArrivalTime
protected

The arrival time of the last SenderReport received from this sender.

Referenced by copy(), processSenderReport(), and receptionReport().

uint64 inet::rtp::RTPReceiverInfo::_lastSenderReportNTPTimeStamp = 0
protected

The ntp time stamp of the last SenderReport received from this sender.

Referenced by copy(), processSenderReport(), and receptionReport().

uint32 inet::rtp::RTPReceiverInfo::_lastSenderReportRTPTimeStamp = 0
protected

The RTP time stamp of the last SenderReport received from this sender.

Referenced by copy(), and processSenderReport().

uint32 inet::rtp::RTPReceiverInfo::_packetsReceived = 0
protected

How many RTP packets from this source have been received.

Referenced by copy(), nextInterval(), processRTPPacket(), and receptionReport().

uint32 inet::rtp::RTPReceiverInfo::_packetsReceivedPrior = 0
protected

How many RTP packets have been received from this source before the current rtcp interval began.

Referenced by copy(), nextInterval(), and receptionReport().

uint16 inet::rtp::RTPReceiverInfo::_sequenceNumberBase = 0
protected

The sequence number of the first RTPPacket received.

Referenced by copy(), processRTPPacket(), and receptionReport().

uint32 inet::rtp::RTPReceiverInfo::_sequenceNumberCycles = 0
protected

The number of sequence number wrap arounds.

Referenced by copy(), nextInterval(), processRTPPacket(), and receptionReport().

simtime_t inet::rtp::RTPReceiverInfo::_startOfInactivity = 0.0
protected

The time when this RTP end system has been inactive for five consecutive rtcp intervals.

Referenced by copy(), nextInterval(), and toBeDeleted().


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