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 | Public Attributes | List of all members
qrtplib::RTCPCompoundPacketBuilder::Report Class Reference

Public Member Functions

 Report ()
 
 ~Report ()
 
void Clear ()
 
std::size_t NeededBytes ()
 
std::size_t NeededBytesWithExtraReportBlock ()
 

Public Attributes

bool isSR
 
uint8_theaderdata
 
uint32_t headerdata32 [(sizeof(uint32_t)+sizeof(RTCPSenderReport))/sizeof(uint32_t)]
 
std::size_t headerlength
 
std::list< Bufferreportblocks
 

Detailed Description

Definition at line 150 of file rtcpcompoundpacketbuilder.h.

Constructor & Destructor Documentation

◆ Report()

qrtplib::RTCPCompoundPacketBuilder::Report::Report ( )
inline

Definition at line 153 of file rtcpcompoundpacketbuilder.h.

154  {
156  std::fill(&headerdata32[0], &headerdata32[0] + ((sizeof(uint32_t) + sizeof(RTCPSenderReport)) / sizeof(uint32_t)), 0U);
157  isSR = false;
158  headerlength = 0;
159  }
unsigned int uint32_t
Definition: rtptypes_win.h:46
unsigned char uint8_t
Definition: rtptypes_win.h:42
uint32_t headerdata32[(sizeof(uint32_t)+sizeof(RTCPSenderReport))/sizeof(uint32_t)]

◆ ~Report()

qrtplib::RTCPCompoundPacketBuilder::Report::~Report ( )
inline

Definition at line 160 of file rtcpcompoundpacketbuilder.h.

Member Function Documentation

◆ Clear()

void qrtplib::RTCPCompoundPacketBuilder::Report::Clear ( )
inline

Definition at line 165 of file rtcpcompoundpacketbuilder.h.

Referenced by qrtplib::RTCPCompoundPacketBuilder::ClearBuildBuffers().

166  {
167  std::list<Buffer>::const_iterator it;
168  for (it = reportblocks.begin(); it != reportblocks.end(); it++)
169  {
170  if ((*it).packetdata)
171  delete[] (*it).packetdata;
172  }
173  reportblocks.clear();
174  isSR = false;
175  headerlength = 0;
176  }
+ Here is the caller graph for this function:

◆ NeededBytes()

std::size_t qrtplib::RTCPCompoundPacketBuilder::Report::NeededBytes ( )
inline

Definition at line 178 of file rtcpcompoundpacketbuilder.h.

Referenced by qrtplib::RTCPCompoundPacketBuilder::AddAPPPacket(), qrtplib::RTCPCompoundPacketBuilder::AddBYEPacket(), qrtplib::RTCPCompoundPacketBuilder::AddSDESNormalItem(), qrtplib::RTCPCompoundPacketBuilder::AddSDESPrivateItem(), qrtplib::RTCPCompoundPacketBuilder::AddSDESSource(), and qrtplib::RTCPCompoundPacketBuilder::EndBuild().

179  {
180  std::size_t x, n, d, r;
181  n = reportblocks.size();
182  if (n == 0)
183  {
184  if (headerlength == 0)
185  return 0;
186  x = sizeof(RTCPCommonHeader) + headerlength;
187  }
188  else
189  {
190  x = n * sizeof(RTCPReceiverReport);
191  d = n / 31; // max 31 reportblocks per report
192  r = n % 31;
193  if (r != 0)
194  d++;
195  x += d * (sizeof(RTCPCommonHeader) + sizeof(uint32_t)); /* header and SSRC */
196  if (isSR)
197  x += sizeof(RTCPSenderReport);
198  }
199  return x;
200  }
unsigned int uint32_t
Definition: rtptypes_win.h:46
+ Here is the caller graph for this function:

◆ NeededBytesWithExtraReportBlock()

std::size_t qrtplib::RTCPCompoundPacketBuilder::Report::NeededBytesWithExtraReportBlock ( )
inline

Definition at line 202 of file rtcpcompoundpacketbuilder.h.

Referenced by qrtplib::RTCPCompoundPacketBuilder::AddReportBlock().

203  {
204  std::size_t x, n, d, r;
205  n = reportblocks.size() + 1; // +1 for the extra block
206  x = n * sizeof(RTCPReceiverReport);
207  d = n / 31; // max 31 reportblocks per report
208  r = n % 31;
209  if (r != 0)
210  d++;
211  x += d * (sizeof(RTCPCommonHeader) + sizeof(uint32_t)); /* header and SSRC */
212  if (isSR)
213  x += sizeof(RTCPSenderReport);
214  return x;
215  }
unsigned int uint32_t
Definition: rtptypes_win.h:46
+ Here is the caller graph for this function:

Member Data Documentation

◆ headerdata

uint8_t* qrtplib::RTCPCompoundPacketBuilder::Report::headerdata

◆ headerdata32

uint32_t qrtplib::RTCPCompoundPacketBuilder::Report::headerdata32[(sizeof(uint32_t)+sizeof(RTCPSenderReport))/sizeof(uint32_t)]

Definition at line 220 of file rtcpcompoundpacketbuilder.h.

◆ headerlength

std::size_t qrtplib::RTCPCompoundPacketBuilder::Report::headerlength

◆ isSR

bool qrtplib::RTCPCompoundPacketBuilder::Report::isSR

◆ reportblocks

std::list<Buffer> qrtplib::RTCPCompoundPacketBuilder::Report::reportblocks

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