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

Public Member Functions

 SDESSource (uint32_t s)
 
 ~SDESSource ()
 
std::size_t NeededBytes ()
 
std::size_t NeededBytesWithExtraItem (uint8_t itemdatalength)
 
void AddItem (uint8_t *buf, std::size_t len)
 

Public Attributes

uint32_t ssrc
 
std::list< Bufferitems
 

Private Attributes

std::size_t totalitemsize
 

Detailed Description

Definition at line 225 of file rtcpcompoundpacketbuilder.h.

Constructor & Destructor Documentation

◆ SDESSource()

qrtplib::RTCPCompoundPacketBuilder::SDESSource::SDESSource ( uint32_t  s)
inline

◆ ~SDESSource()

qrtplib::RTCPCompoundPacketBuilder::SDESSource::~SDESSource ( )
inline

Definition at line 232 of file rtcpcompoundpacketbuilder.h.

233  {
234  std::list<Buffer>::const_iterator it;
235  for (it = items.begin(); it != items.end(); it++)
236  {
237  if ((*it).packetdata)
238  delete[] (*it).packetdata;
239  }
240  items.clear();
241  }

Member Function Documentation

◆ AddItem()

void qrtplib::RTCPCompoundPacketBuilder::SDESSource::AddItem ( uint8_t buf,
std::size_t  len 
)
inline

Definition at line 265 of file rtcpcompoundpacketbuilder.h.

266  {
267  Buffer b(buf, len);
268  totalitemsize += len;
269  items.push_back(b);
270  }

◆ NeededBytes()

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

Definition at line 243 of file rtcpcompoundpacketbuilder.h.

244  {
245  std::size_t x, r;
246  x = totalitemsize + 1; // +1 for the 0 byte which terminates the item list
247  r = x % sizeof(uint32_t);
248  if (r != 0)
249  x += (sizeof(uint32_t) - r); // make sure it ends on a 32 bit boundary
250  x += sizeof(uint32_t); // for ssrc
251  return x;
252  }
unsigned int uint32_t
Definition: rtptypes_win.h:46

◆ NeededBytesWithExtraItem()

std::size_t qrtplib::RTCPCompoundPacketBuilder::SDESSource::NeededBytesWithExtraItem ( uint8_t  itemdatalength)
inline

Definition at line 254 of file rtcpcompoundpacketbuilder.h.

255  {
256  std::size_t x, r;
257  x = totalitemsize + sizeof(RTCPSDESHeader) + (std::size_t) itemdatalength + 1;
258  r = x % sizeof(uint32_t);
259  if (r != 0)
260  x += (sizeof(uint32_t) - r); // make sure it ends on a 32 bit boundary
261  x += sizeof(uint32_t); // for ssrc
262  return x;
263  }
unsigned int uint32_t
Definition: rtptypes_win.h:46

Member Data Documentation

◆ items

std::list<Buffer> qrtplib::RTCPCompoundPacketBuilder::SDESSource::items

Definition at line 273 of file rtcpcompoundpacketbuilder.h.

◆ ssrc

uint32_t qrtplib::RTCPCompoundPacketBuilder::SDESSource::ssrc

Definition at line 272 of file rtcpcompoundpacketbuilder.h.

◆ totalitemsize

std::size_t qrtplib::RTCPCompoundPacketBuilder::SDESSource::totalitemsize
private

Definition at line 275 of file rtcpcompoundpacketbuilder.h.


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