SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Member Functions | List of all members
qrtplib::RTPInternalSourceData Class Reference

#include <rtpinternalsourcedata.h>

+ Inheritance diagram for qrtplib::RTPInternalSourceData:
+ Collaboration diagram for qrtplib::RTPInternalSourceData:

Public Member Functions

 RTPInternalSourceData (uint32_t ssrc)
 
 ~RTPInternalSourceData ()
 
int ProcessRTPPacket (RTPPacket *rtppack, const RTPTime &receivetime, bool *stored, RTPSources *sources)
 
void ProcessSenderInfo (const RTPNTPTime &ntptime, uint32_t rtptime, uint32_t packetcount, uint32_t octetcount, const RTPTime &receivetime)
 
void ProcessReportBlock (uint8_t fractionlost, int32_t lostpackets, uint32_t exthighseqnr, uint32_t jitter, uint32_t lsr, uint32_t dlsr, const RTPTime &receivetime)
 
void UpdateMessageTime (const RTPTime &receivetime)
 
int ProcessSDESItem (uint8_t sdesid, const uint8_t *data, std::size_t itemlen, const RTPTime &receivetime, bool *cnamecollis)
 
int ProcessPrivateSDESItem (const uint8_t *prefix, std::size_t prefixlen, const uint8_t *value, std::size_t valuelen, const RTPTime &receivetime)
 
int ProcessBYEPacket (const uint8_t *reason, std::size_t reasonlen, const RTPTime &receivetime)
 
int SetRTPDataAddress (const RTPAddress *a)
 
int SetRTCPDataAddress (const RTPAddress *a)
 
void ClearSenderFlag ()
 
void SentRTPPacket ()
 
void SetOwnSSRC ()
 
void SetCSRC ()
 
void ClearNote ()
 
- Public Member Functions inherited from qrtplib::RTPSourceData
RTPPacketGetNextPacket ()
 
void FlushPackets ()
 
bool HasData () const
 
uint32_t GetSSRC () const
 
bool IsOwnSSRC () const
 
bool IsCSRC () const
 
bool IsSender () const
 
bool IsValidated () const
 
bool IsActive () const
 
void SetProcessedInRTCP (bool v)
 
bool IsProcessedInRTCP () const
 
bool IsRTPAddressSet () const
 
bool IsRTCPAddressSet () const
 
const RTPAddressGetRTPDataAddress () const
 
const RTPAddressGetRTCPDataAddress () const
 
bool ReceivedBYE () const
 
uint8_tGetBYEReason (std::size_t *len) const
 
RTPTime GetBYETime () const
 
void SetTimestampUnit (double tsu)
 
double GetTimestampUnit () const
 
bool SR_HasInfo () const
 
RTPNTPTime SR_GetNTPTimestamp () const
 
uint32_t SR_GetRTPTimestamp () const
 
uint32_t SR_GetPacketCount () const
 
uint32_t SR_GetByteCount () const
 
RTPTime SR_GetReceiveTime () const
 
bool SR_Prev_HasInfo () const
 
RTPNTPTime SR_Prev_GetNTPTimestamp () const
 
uint32_t SR_Prev_GetRTPTimestamp () const
 
uint32_t SR_Prev_GetPacketCount () const
 
uint32_t SR_Prev_GetByteCount () const
 
RTPTime SR_Prev_GetReceiveTime () const
 
bool RR_HasInfo () const
 
double RR_GetFractionLost () const
 
int32_t RR_GetPacketsLost () const
 
uint32_t RR_GetExtendedHighestSequenceNumber () const
 
uint32_t RR_GetJitter () const
 
uint32_t RR_GetLastSRTimestamp () const
 
uint32_t RR_GetDelaySinceLastSR () const
 
RTPTime RR_GetReceiveTime () const
 
bool RR_Prev_HasInfo () const
 
double RR_Prev_GetFractionLost () const
 
int32_t RR_Prev_GetPacketsLost () const
 
uint32_t RR_Prev_GetExtendedHighestSequenceNumber () const
 
uint32_t RR_Prev_GetJitter () const
 
uint32_t RR_Prev_GetLastSRTimestamp () const
 
uint32_t RR_Prev_GetDelaySinceLastSR () const
 
RTPTime RR_Prev_GetReceiveTime () const
 
bool INF_HasSentData () const
 
int32_t INF_GetNumPacketsReceived () const
 
uint32_t INF_GetBaseSequenceNumber () const
 
uint32_t INF_GetExtendedHighestSequenceNumber () const
 
uint32_t INF_GetJitter () const
 
RTPTime INF_GetLastMessageTime () const
 
RTPTime INF_GetLastRTPPacketTime () const
 
double INF_GetEstimatedTimestampUnit () const
 
uint32_t INF_GetNumPacketsReceivedInInterval () const
 
uint32_t INF_GetSavedExtendedSequenceNumber () const
 
void INF_StartNewInterval ()
 
RTPTime INF_GetRoundtripTime () const
 
RTPTime INF_GetLastSDESNoteTime () const
 
uint8_tSDES_GetCNAME (std::size_t *len) const
 
uint8_tSDES_GetName (std::size_t *len) const
 
uint8_tSDES_GetEMail (std::size_t *len) const
 
uint8_tSDES_GetPhone (std::size_t *len) const
 
uint8_tSDES_GetLocation (std::size_t *len) const
 
uint8_tSDES_GetTool (std::size_t *len) const
 
uint8_tSDES_GetNote (std::size_t *len) const
 
void SDES_GotoFirstPrivateValue ()
 
bool SDES_GetNextPrivateValue (uint8_t **prefix, std::size_t *prefixlen, uint8_t **value, std::size_t *valuelen)
 
bool SDES_GetPrivateValue (uint8_t *prefix, std::size_t prefixlen, uint8_t **value, std::size_t *valuelen) const
 

Additional Inherited Members

- Protected Member Functions inherited from qrtplib::RTPSourceData
 RTPSourceData (uint32_t ssrc)
 
virtual ~RTPSourceData ()
 
- Protected Attributes inherited from qrtplib::RTPSourceData
std::list< RTPPacket * > packetlist
 
uint32_t ssrc
 
bool ownssrc
 
bool iscsrc
 
double timestampunit
 
bool receivedbye
 
bool validated
 
bool processedinrtcp
 
bool issender
 
RTCPSenderReportInfo SRinf
 
RTCPSenderReportInfo SRprevinf
 
RTCPReceiverReportInfo RRinf
 
RTCPReceiverReportInfo RRprevinf
 
RTPSourceStats stats
 
RTCPSDESInfo SDESinf
 
bool isrtpaddrset
 
bool isrtcpaddrset
 
RTPAddressrtpaddr
 
RTPAddressrtcpaddr
 
RTPTime byetime
 
uint8_tbyereason
 
std::size_t byereasonlen
 

Detailed Description

Definition at line 52 of file rtpinternalsourcedata.h.

Constructor & Destructor Documentation

◆ RTPInternalSourceData()

qrtplib::RTPInternalSourceData::RTPInternalSourceData ( uint32_t  ssrc)

Definition at line 42 of file rtpinternalsourcedata.cpp.

42  :
44 {
45 }
RTPSourceData(uint32_t ssrc)

◆ ~RTPInternalSourceData()

qrtplib::RTPInternalSourceData::~RTPInternalSourceData ( )

Definition at line 47 of file rtpinternalsourcedata.cpp.

48 {
49 }

Member Function Documentation

◆ ClearNote()

void qrtplib::RTPInternalSourceData::ClearNote ( )
inline

Definition at line 107 of file rtpinternalsourcedata.h.

Referenced by qrtplib::RTPSources::MultipleTimeouts(), and qrtplib::RTPSources::NoteTimeout().

108  {
109  SDESinf.SetNote(0, 0);
110  }
int SetNote(const uint8_t *s, std::size_t l)
Definition: rtcpsdesinfo.h:106
+ Here is the caller graph for this function:

◆ ClearSenderFlag()

void qrtplib::RTPInternalSourceData::ClearSenderFlag ( )
inline

Definition at line 84 of file rtpinternalsourcedata.h.

Referenced by qrtplib::RTPSources::MultipleTimeouts(), and qrtplib::RTPSources::SenderTimeout().

85  {
86  issender = false;
87  }
+ Here is the caller graph for this function:

◆ ProcessBYEPacket()

int qrtplib::RTPInternalSourceData::ProcessBYEPacket ( const uint8_t reason,
std::size_t  reasonlen,
const RTPTime receivetime 
)

Definition at line 236 of file rtpinternalsourcedata.cpp.

References qrtplib::RTPSourceData::byereason, qrtplib::RTPSourceData::byereasonlen, qrtplib::RTPSourceData::byetime, qrtplib::RTPSourceData::receivedbye, qrtplib::RTPSourceStats::SetLastMessageTime(), and qrtplib::RTPSourceData::stats.

Referenced by qrtplib::RTPSources::ProcessBYE().

237 {
238  if (byereason)
239  {
240  delete[] byereason;
241  byereason = 0;
242  byereasonlen = 0;
243  }
244 
245  byetime = receivetime;
246  byereason = new uint8_t[reasonlen];
247  memcpy(byereason, reason, reasonlen);
248  byereasonlen = reasonlen;
249  receivedbye = true;
250  stats.SetLastMessageTime(receivetime);
251  return 0;
252 }
unsigned char uint8_t
Definition: rtptypes_win.h:42
RTPSourceStats stats
void SetLastMessageTime(const RTPTime &t)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessPrivateSDESItem()

int qrtplib::RTPInternalSourceData::ProcessPrivateSDESItem ( const uint8_t prefix,
std::size_t  prefixlen,
const uint8_t value,
std::size_t  valuelen,
const RTPTime receivetime 
)

Definition at line 223 of file rtpinternalsourcedata.cpp.

References ERR_RTP_SDES_MAXPRIVITEMS, qrtplib::RTPSourceData::SDESinf, qrtplib::RTPSourceStats::SetLastMessageTime(), qrtplib::RTCPSDESInfo::SetPrivateValue(), and qrtplib::RTPSourceData::stats.

Referenced by qrtplib::RTPSources::ProcessSDESPrivateItem().

224 {
225  int status;
226 
227  stats.SetLastMessageTime(receivetime);
228  status = SDESinf.SetPrivateValue(prefix, prefixlen, value, valuelen);
229  if (status == ERR_RTP_SDES_MAXPRIVITEMS)
230  return 0; // don't stop processing just because the number of items is full
231  return status;
232 }
#define ERR_RTP_SDES_MAXPRIVITEMS
Definition: rtperrors.h:108
int SetPrivateValue(const uint8_t *prefix, std::size_t prefixlen, const uint8_t *value, std::size_t valuelen)
RTPSourceStats stats
void SetLastMessageTime(const RTPTime &t)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessReportBlock()

void qrtplib::RTPInternalSourceData::ProcessReportBlock ( uint8_t  fractionlost,
int32_t  lostpackets,
uint32_t  exthighseqnr,
uint32_t  jitter,
uint32_t  lsr,
uint32_t  dlsr,
const RTPTime receivetime 
)
inline

Definition at line 65 of file rtpinternalsourcedata.h.

Referenced by qrtplib::RTPSources::ProcessRTCPReportBlock().

66  {
67  RRprevinf = RRinf;
68  RRinf.Set(fractionlost, lostpackets, exthighseqnr, jitter, lsr, dlsr, receivetime);
69  stats.SetLastMessageTime(receivetime);
70  }
void Set(uint8_t fraclost, int32_t plost, uint32_t exthigh, uint32_t jit, uint32_t l, uint32_t dl, const RTPTime &rcvtime)
RTPSourceStats stats
RTCPReceiverReportInfo RRprevinf
void SetLastMessageTime(const RTPTime &t)
RTCPReceiverReportInfo RRinf
+ Here is the caller graph for this function:

◆ ProcessRTPPacket()

int qrtplib::RTPInternalSourceData::ProcessRTPPacket ( RTPPacket rtppack,
const RTPTime receivetime,
bool *  stored,
RTPSources sources 
)

Definition at line 52 of file rtpinternalsourcedata.cpp.

References qrtplib::RTPPacket::GetExtendedSequenceNumber(), qrtplib::RTPSourceData::INF_GetEstimatedTimestampUnit(), qrtplib::RTPSourceData::issender, qrtplib::RTPSources::OnValidatedRTPPacket(), qrtplib::RTPSourceData::ownssrc, qrtplib::RTPSourceData::packetlist, qrtplib::RTPSourceStats::ProcessPacket(), RTPINTERNALSOURCEDATA_MAXPROBATIONPACKETS, qrtplib::RTPSourceData::stats, qrtplib::RTPSourceData::timestampunit, and qrtplib::RTPSourceData::validated.

Referenced by qrtplib::RTPSources::ProcessRTPPacket().

53 {
54  bool accept;
55  double tsunit;
56 
57  *stored = false;
58 
59  if (timestampunit < 0)
61  else
62  tsunit = timestampunit;
63 
64  stats.ProcessPacket(rtppack, receivetime, tsunit, ownssrc, &accept);
65 
66  if (!accept)
67  return 0;
68  validated = true;
69 
70  if (validated && !ownssrc) // for own ssrc these variables depend on the outgoing packets, not on the incoming
71  issender = true;
72 
73  bool isonprobation = !validated;
74  bool ispackethandled = false;
75 
76  sources->OnValidatedRTPPacket(this, rtppack, isonprobation, &ispackethandled);
77  if (ispackethandled) // Packet is already handled in the callback, no need to store it in the list
78  {
79  // Set 'stored' to true to avoid the packet being deallocated
80  *stored = true;
81  return 0;
82  }
83 
84  // Now, we can place the packet in the queue
85 
86  if (packetlist.empty())
87  {
88  *stored = true;
89  packetlist.push_back(rtppack);
90  return 0;
91  }
92 
93  if (!validated) // still on probation
94  {
95  // Make sure that we don't buffer too much packets to avoid wasting memory
96  // on a bad source. Delete the packet in the queue with the lowest sequence
97  // number.
99  {
100  RTPPacket *p = *(packetlist.begin());
101  packetlist.pop_front();
102  delete p;
103  }
104  }
105 
106  // find the right position to insert the packet
107 
108  std::list<RTPPacket*>::iterator it, start;
109  bool done = false;
110  uint32_t newseqnr = rtppack->GetExtendedSequenceNumber();
111 
112  it = packetlist.end();
113  --it;
114  start = packetlist.begin();
115 
116  while (!done)
117  {
118  RTPPacket *p;
119  uint32_t seqnr;
120 
121  p = *it;
122  seqnr = p->GetExtendedSequenceNumber();
123  if (seqnr > newseqnr)
124  {
125  if (it != start)
126  --it;
127  else // we're at the start of the list
128  {
129  *stored = true;
130  done = true;
131  packetlist.push_front(rtppack);
132  }
133  }
134  else if (seqnr < newseqnr) // insert after this packet
135  {
136  ++it;
137  packetlist.insert(it, rtppack);
138  done = true;
139  *stored = true;
140  }
141  else // they're equal !! Drop packet
142  {
143  done = true;
144  }
145  }
146 
147  return 0;
148 }
void ProcessPacket(RTPPacket *pack, const RTPTime &receivetime, double tsunit, bool ownpacket, bool *accept)
#define RTPINTERNALSOURCEDATA_MAXPROBATIONPACKETS
unsigned int uint32_t
Definition: rtptypes_win.h:46
double INF_GetEstimatedTimestampUnit() const
RTPSourceStats stats
std::list< RTPPacket * > packetlist
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessSDESItem()

int qrtplib::RTPInternalSourceData::ProcessSDESItem ( uint8_t  sdesid,
const uint8_t data,
std::size_t  itemlen,
const RTPTime receivetime,
bool *  cnamecollis 
)

Definition at line 150 of file rtpinternalsourcedata.cpp.

References qrtplib::RTCPSDESInfo::GetCNAME(), qrtplib::RTCPSDESInfo::GetEMail(), qrtplib::RTCPSDESInfo::GetName(), qrtplib::RTCPSDESInfo::GetTool(), RTCP_SDES_ID_CNAME, RTCP_SDES_ID_EMAIL, RTCP_SDES_ID_LOCATION, RTCP_SDES_ID_NAME, RTCP_SDES_ID_NOTE, RTCP_SDES_ID_PHONE, RTCP_SDES_ID_TOOL, qrtplib::RTPSourceData::SDESinf, qrtplib::RTCPSDESInfo::SetCNAME(), qrtplib::RTCPSDESInfo::SetEMail(), qrtplib::RTPSourceStats::SetLastMessageTime(), qrtplib::RTPSourceStats::SetLastNoteTime(), qrtplib::RTCPSDESInfo::SetLocation(), qrtplib::RTCPSDESInfo::SetName(), qrtplib::RTCPSDESInfo::SetNote(), qrtplib::RTCPSDESInfo::SetPhone(), qrtplib::RTCPSDESInfo::SetTool(), qrtplib::RTPSourceData::stats, and qrtplib::RTPSourceData::validated.

Referenced by qrtplib::RTPSources::ProcessSDESNormalItem().

151 {
152  *cnamecollis = false;
153 
154  stats.SetLastMessageTime(receivetime);
155 
156  switch (sdesid)
157  {
158  case RTCP_SDES_ID_CNAME:
159  {
160  std::size_t curlen;
161  uint8_t *oldcname;
162 
163  // NOTE: we're going to make sure that the CNAME is only set once.
164  oldcname = SDESinf.GetCNAME(&curlen);
165  if (curlen == 0)
166  {
167  // if CNAME is set, the source is validated
168  SDESinf.SetCNAME(data, itemlen);
169  validated = true;
170  }
171  else // check if this CNAME is equal to the one that is already present
172  {
173  if (curlen != itemlen)
174  *cnamecollis = true;
175  else
176  {
177  if (memcmp(data, oldcname, itemlen) != 0)
178  *cnamecollis = true;
179  }
180  }
181  }
182  break;
183  case RTCP_SDES_ID_NAME:
184  {
185  std::size_t oldlen;
186 
187  SDESinf.GetName(&oldlen);
188  if (oldlen == 0) // Name not set
189  return SDESinf.SetName(data, itemlen);
190  }
191  break;
192  case RTCP_SDES_ID_EMAIL:
193  {
194  std::size_t oldlen;
195 
196  SDESinf.GetEMail(&oldlen);
197  if (oldlen == 0)
198  return SDESinf.SetEMail(data, itemlen);
199  }
200  break;
201  case RTCP_SDES_ID_PHONE:
202  return SDESinf.SetPhone(data, itemlen);
204  return SDESinf.SetLocation(data, itemlen);
205  case RTCP_SDES_ID_TOOL:
206  {
207  std::size_t oldlen;
208 
209  SDESinf.GetTool(&oldlen);
210  if (oldlen == 0)
211  return SDESinf.SetTool(data, itemlen);
212  }
213  break;
214  case RTCP_SDES_ID_NOTE:
215  stats.SetLastNoteTime(receivetime);
216  return SDESinf.SetNote(data, itemlen);
217  }
218  return 0;
219 }
#define RTCP_SDES_ID_EMAIL
Definition: rtpdefines.h:58
#define RTCP_SDES_ID_LOCATION
Definition: rtpdefines.h:60
uint8_t * GetTool(std::size_t *len) const
Definition: rtcpsdesinfo.h:153
uint8_t * GetCNAME(std::size_t *len) const
Definition: rtcpsdesinfo.h:123
int SetPhone(const uint8_t *s, std::size_t l)
Definition: rtcpsdesinfo.h:88
#define RTCP_SDES_ID_NOTE
Definition: rtpdefines.h:62
int SetEMail(const uint8_t *s, std::size_t l)
Definition: rtcpsdesinfo.h:82
int SetCNAME(const uint8_t *s, std::size_t l)
Definition: rtcpsdesinfo.h:70
void SetLastNoteTime(const RTPTime &t)
unsigned char uint8_t
Definition: rtptypes_win.h:42
uint8_t * GetName(std::size_t *len) const
Definition: rtcpsdesinfo.h:129
uint8_t * GetEMail(std::size_t *len) const
Definition: rtcpsdesinfo.h:135
#define RTCP_SDES_ID_TOOL
Definition: rtpdefines.h:61
int SetTool(const uint8_t *s, std::size_t l)
Definition: rtcpsdesinfo.h:100
int SetLocation(const uint8_t *s, std::size_t l)
Definition: rtcpsdesinfo.h:94
#define RTCP_SDES_ID_CNAME
Definition: rtpdefines.h:56
int SetName(const uint8_t *s, std::size_t l)
Definition: rtcpsdesinfo.h:76
RTPSourceStats stats
void SetLastMessageTime(const RTPTime &t)
#define RTCP_SDES_ID_NAME
Definition: rtpdefines.h:57
#define RTCP_SDES_ID_PHONE
Definition: rtpdefines.h:59
int SetNote(const uint8_t *s, std::size_t l)
Definition: rtcpsdesinfo.h:106
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessSenderInfo()

void qrtplib::RTPInternalSourceData::ProcessSenderInfo ( const RTPNTPTime ntptime,
uint32_t  rtptime,
uint32_t  packetcount,
uint32_t  octetcount,
const RTPTime receivetime 
)
inline

Definition at line 59 of file rtpinternalsourcedata.h.

Referenced by qrtplib::RTPSources::ProcessRTCPSenderInfo().

60  {
61  SRprevinf = SRinf;
62  SRinf.Set(ntptime, rtptime, packetcount, octetcount, receivetime);
63  stats.SetLastMessageTime(receivetime);
64  }
RTCPSenderReportInfo SRprevinf
RTPSourceStats stats
void SetLastMessageTime(const RTPTime &t)
RTCPSenderReportInfo SRinf
void Set(const RTPNTPTime &ntptime, uint32_t rtptime, uint32_t pcount, uint32_t bcount, const RTPTime &rcvtime)
Definition: rtpsourcedata.h:67
+ Here is the caller graph for this function:

◆ SentRTPPacket()

void qrtplib::RTPInternalSourceData::SentRTPPacket ( )
inline

Definition at line 88 of file rtpinternalsourcedata.h.

References qrtplib::RTPTime::CurrentTime().

Referenced by qrtplib::RTPSources::SentRTPPacket().

89  {
90  if (!ownssrc)
91  return;
92  RTPTime t = RTPTime::CurrentTime();
93  issender = true;
96  }
void SetLastRTPPacketTime(const RTPTime &t)
RTPSourceStats stats
void SetLastMessageTime(const RTPTime &t)
static RTPTime CurrentTime()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetCSRC()

void qrtplib::RTPInternalSourceData::SetCSRC ( )
inline

Definition at line 102 of file rtpinternalsourcedata.h.

Referenced by qrtplib::RTPSources::ProcessRTPPacket().

103  {
104  validated = true;
105  iscsrc = true;
106  }
+ Here is the caller graph for this function:

◆ SetOwnSSRC()

void qrtplib::RTPInternalSourceData::SetOwnSSRC ( )
inline

Definition at line 97 of file rtpinternalsourcedata.h.

Referenced by qrtplib::RTPSources::CreateOwnSSRC().

98  {
99  ownssrc = true;
100  validated = true;
101  }
+ Here is the caller graph for this function:

◆ SetRTCPDataAddress()

int qrtplib::RTPInternalSourceData::SetRTCPDataAddress ( const RTPAddress a)
inline

Definition at line 138 of file rtpinternalsourcedata.h.

References qrtplib::RTPAddress::CreateCopy(), and ERR_RTP_OUTOFMEM.

Referenced by qrtplib::RTPSources::CheckCollision(), qrtplib::RTPSources::CreateOwnSSRC(), and qrtplib::RTPSources::GetRTCPSourceData().

139 {
140  if (a == 0)
141  {
142  if (rtcpaddr)
143  {
144  delete rtcpaddr;
145  rtcpaddr = 0;
146  }
147  }
148  else
149  {
150  RTPAddress *newaddr = a->CreateCopy();
151  if (newaddr == 0)
152  return ERR_RTP_OUTOFMEM;
153 
154  if (rtcpaddr && a != rtcpaddr)
155  delete rtcpaddr;
156  rtcpaddr = newaddr;
157  }
158  isrtcpaddrset = true;
159  return 0;
160 }
RTPAddress * CreateCopy() const
Definition: rtpaddress.cpp:38
#define ERR_RTP_OUTOFMEM
Definition: rtperrors.h:53
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetRTPDataAddress()

int qrtplib::RTPInternalSourceData::SetRTPDataAddress ( const RTPAddress a)
inline

Definition at line 114 of file rtpinternalsourcedata.h.

References qrtplib::RTPAddress::CreateCopy(), and ERR_RTP_OUTOFMEM.

Referenced by qrtplib::RTPSources::CheckCollision(), qrtplib::RTPSources::CreateOwnSSRC(), and qrtplib::RTPSources::ProcessRTPPacket().

115 {
116  if (a == 0)
117  {
118  if (rtpaddr)
119  {
120  delete rtpaddr;
121  rtpaddr = 0;
122  }
123  }
124  else
125  {
126  RTPAddress *newaddr = a->CreateCopy();
127  if (newaddr == 0)
128  return ERR_RTP_OUTOFMEM;
129 
130  if (rtpaddr && a != rtpaddr)
131  delete rtpaddr;
132  rtpaddr = newaddr;
133  }
134  isrtpaddrset = true;
135  return 0;
136 }
RTPAddress * CreateCopy() const
Definition: rtpaddress.cpp:38
#define ERR_RTP_OUTOFMEM
Definition: rtperrors.h:53
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateMessageTime()

void qrtplib::RTPInternalSourceData::UpdateMessageTime ( const RTPTime receivetime)
inline

Definition at line 71 of file rtpinternalsourcedata.h.

Referenced by qrtplib::RTPSources::UpdateReceiveTime().

72  {
73  stats.SetLastMessageTime(receivetime);
74  }
RTPSourceStats stats
void SetLastMessageTime(const RTPTime &t)
+ Here is the caller graph for this function:

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