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.
rtcpcompoundpacketbuilder.cpp
Go to the documentation of this file.
1 /*
2 
3  This file is a part of JRTPLIB
4  Copyright (c) 1999-2017 Jori Liesenborgs
5 
6  Contact: jori.liesenborgs@gmail.com
7 
8  This library was developed at the Expertise Centre for Digital Media
9  (http://www.edm.uhasselt.be), a research center of the Hasselt University
10  (http://www.uhasselt.be). The library is based upon work done for
11  my thesis at the School for Knowledge Technology (Belgium/The Netherlands).
12 
13  Permission is hereby granted, free of charge, to any person obtaining a
14  copy of this software and associated documentation files (the "Software"),
15  to deal in the Software without restriction, including without limitation
16  the rights to use, copy, modify, merge, publish, distribute, sublicense,
17  and/or sell copies of the Software, and to permit persons to whom the
18  Software is furnished to do so, subject to the following conditions:
19 
20  The above copyright notice and this permission notice shall be included
21  in all copies or substantial portions of the Software.
22 
23  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
29  IN THE SOFTWARE.
30 
31  */
32 
34 #include "rtcpsrpacket.h"
35 #include "rtcprrpacket.h"
36 #include "rtcpsdespacket.h"
37 #include "rtcpbyepacket.h"
38 #include "rtcpapppacket.h"
39 #include <string.h>
40 
41 namespace qrtplib
42 {
43 
45 {
46  byesize = 0;
47  appsize = 0;
49  buffer = 0;
50  external = false;
51  arebuilding = false;
52 }
53 
55 {
56  if (external)
57  compoundpacket = 0; // make sure RTCPCompoundPacket doesn't delete the external buffer
59 }
60 
62 {
63  report.Clear();
64  sdes.Clear();
65 
66  std::list<Buffer>::const_iterator it;
67  for (it = byepackets.begin(); it != byepackets.end(); it++)
68  {
69  if ((*it).packetdata)
70  delete[] (*it).packetdata;
71  }
72  for (it = apppackets.begin(); it != apppackets.end(); it++)
73  {
74  if ((*it).packetdata)
75  delete[] (*it).packetdata;
76  }
77  byepackets.clear();
78  apppackets.clear();
79  byesize = 0;
80  appsize = 0;
81 }
82 
83 int RTCPCompoundPacketBuilder::InitBuild(std::size_t maxpacketsize)
84 {
85  if (arebuilding)
87  if (compoundpacket)
89 
90  if (maxpacketsize < RTP_MINPACKETSIZE)
92 
93  maximumpacketsize = maxpacketsize;
94  buffer = 0;
95  external = false;
96  byesize = 0;
97  appsize = 0;
98 
99  arebuilding = true;
100  return 0;
101 }
102 
103 int RTCPCompoundPacketBuilder::InitBuild(void *externalbuffer, std::size_t buffersize)
104 {
105  if (arebuilding)
107  if (compoundpacket)
109 
110  if (buffersize < RTP_MINPACKETSIZE)
112 
113  maximumpacketsize = buffersize;
114  buffer = (uint8_t *) externalbuffer;
115  external = true;
116  byesize = 0;
117  appsize = 0;
118 
119  arebuilding = true;
120  return 0;
121 }
122 
123 int RTCPCompoundPacketBuilder::StartSenderReport(uint32_t senderssrc, const RTPNTPTime &ntptimestamp, uint32_t rtptimestamp, uint32_t packetcount, uint32_t octetcount)
124 {
125  if (!arebuilding)
127 
128  if (report.headerlength != 0)
130 
131  std::size_t totalsize = byesize + appsize + sdes.NeededBytes();
132  std::size_t sizeleft = maximumpacketsize - totalsize;
133  std::size_t neededsize = sizeof(RTCPCommonHeader) + sizeof(uint32_t) + sizeof(RTCPSenderReport);
134 
135  if (neededsize > sizeleft)
137 
138  // fill in some things
139 
140  report.headerlength = sizeof(uint32_t) + sizeof(RTCPSenderReport);
141  report.isSR = true;
142 
143  uint32_t *ssrc = (uint32_t *) report.headerdata;
144  *ssrc = qToBigEndian(senderssrc);
145 
147  sr->ntptime_msw = qToBigEndian(ntptimestamp.GetMSW());
148  sr->ntptime_lsw = qToBigEndian(ntptimestamp.GetLSW());
149  sr->rtptimestamp = qToBigEndian(rtptimestamp);
150  sr->packetcount = qToBigEndian(packetcount);
151  sr->octetcount = qToBigEndian(octetcount);
152 
153  return 0;
154 }
155 
157 {
158  if (!arebuilding)
160  if (report.headerlength != 0)
162 
163  std::size_t totalsize = byesize + appsize + sdes.NeededBytes();
164  std::size_t sizeleft = maximumpacketsize - totalsize;
165  std::size_t neededsize = sizeof(RTCPCommonHeader) + sizeof(uint32_t);
166 
167  if (neededsize > sizeleft)
169 
170  // fill in some things
171 
172  report.headerlength = sizeof(uint32_t);
173  report.isSR = false;
174 
175  uint32_t *ssrc = (uint32_t *) report.headerdata;
176  *ssrc = qToBigEndian(senderssrc);
177 
178  return 0;
179 }
180 
181 int RTCPCompoundPacketBuilder::AddReportBlock(uint32_t ssrc, uint8_t fractionlost, int32_t packetslost, uint32_t exthighestseq, uint32_t jitter, uint32_t lsr, uint32_t dlsr)
182 {
183  if (!arebuilding)
185  if (report.headerlength == 0)
187 
188  std::size_t totalothersize = byesize + appsize + sdes.NeededBytes();
189  std::size_t reportsizewithextrablock = report.NeededBytesWithExtraReportBlock();
190 
191  if ((totalothersize + reportsizewithextrablock) > maximumpacketsize)
193 
194  uint8_t *buf = new uint8_t[sizeof(RTCPReceiverReport)];
195 
197  uint32_t *packlost = (uint32_t *) &packetslost;
198  uint32_t packlost2 = (*packlost);
199 
200  rr->ssrc = qToBigEndian(ssrc);
201  rr->fractionlost = fractionlost;
202  rr->packetslost[2] = (uint8_t) (packlost2 & 0xFF);
203  rr->packetslost[1] = (uint8_t) ((packlost2 >> 8) & 0xFF);
204  rr->packetslost[0] = (uint8_t) ((packlost2 >> 16) & 0xFF);
205  rr->exthighseqnr = qToBigEndian(exthighestseq);
206  rr->jitter = qToBigEndian(jitter);
207  rr->lsr = qToBigEndian(lsr);
208  rr->dlsr = qToBigEndian(dlsr);
209 
210  report.reportblocks.push_back(Buffer(buf, sizeof(RTCPReceiverReport)));
211  return 0;
212 }
213 
215 {
216  if (!arebuilding)
218 
219  std::size_t totalotherbytes = byesize + appsize + report.NeededBytes();
220  std::size_t sdessizewithextrasource = sdes.NeededBytesWithExtraSource();
221 
222  if ((totalotherbytes + sdessizewithextrasource) > maximumpacketsize)
224 
225  int status;
226 
227  if ((status = sdes.AddSSRC(ssrc)) < 0)
228  return status;
229  return 0;
230 }
231 
233 {
234  if (!arebuilding)
236  if (sdes.sdessources.empty())
238 
239  uint8_t itemid;
240 
241  switch (t)
242  {
244  itemid = RTCP_SDES_ID_CNAME;
245  break;
247  itemid = RTCP_SDES_ID_NAME;
248  break;
250  itemid = RTCP_SDES_ID_EMAIL;
251  break;
253  itemid = RTCP_SDES_ID_PHONE;
254  break;
255  case RTCPSDESPacket::LOC:
256  itemid = RTCP_SDES_ID_LOCATION;
257  break;
259  itemid = RTCP_SDES_ID_TOOL;
260  break;
262  itemid = RTCP_SDES_ID_NOTE;
263  break;
264  default:
266  }
267 
268  std::size_t totalotherbytes = byesize + appsize + report.NeededBytes();
269  std::size_t sdessizewithextraitem = sdes.NeededBytesWithExtraItem(itemlength);
270 
271  if ((sdessizewithextraitem + totalotherbytes) > maximumpacketsize)
273 
274  uint8_t *buf;
275  std::size_t len;
276 
277  buf = new uint8_t[sizeof(RTCPSDESHeader) + (std::size_t) itemlength];
278  len = sizeof(RTCPSDESHeader) + (std::size_t) itemlength;
279 
280  RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *) (buf);
281 
282  sdeshdr->sdesid = itemid;
283  sdeshdr->length = itemlength;
284  if (itemlength != 0)
285  memcpy((buf + sizeof(RTCPSDESHeader)), itemdata, (std::size_t) itemlength);
286 
287  sdes.AddItem(buf, len);
288  return 0;
289 }
290 
291 #ifdef RTP_SUPPORT_SDESPRIV
292 int RTCPCompoundPacketBuilder::AddSDESPrivateItem(const void *prefixdata, uint8_t prefixlength, const void *valuedata, uint8_t valuelength)
293 {
294  if (!arebuilding)
296  if (sdes.sdessources.empty())
298 
299  std::size_t itemlength = ((std::size_t) prefixlength) + 1 + ((std::size_t) valuelength);
300  if (itemlength > 255)
302 
303  std::size_t totalotherbytes = byesize + appsize + report.NeededBytes();
304  std::size_t sdessizewithextraitem = sdes.NeededBytesWithExtraItem(itemlength);
305 
306  if ((sdessizewithextraitem + totalotherbytes) > maximumpacketsize)
308 
309  uint8_t *buf;
310  std::size_t len;
311 
312  buf = new uint8_t[sizeof(RTCPSDESHeader) + itemlength];
313  len = sizeof(RTCPSDESHeader) + (std::size_t) itemlength;
314 
315  RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *) (buf);
316 
317  sdeshdr->sdesid = RTCP_SDES_ID_PRIVATE;
318  sdeshdr->length = itemlength;
319 
320  buf[sizeof(RTCPSDESHeader)] = prefixlength;
321  if (prefixlength != 0)
322  memcpy((buf + sizeof(RTCPSDESHeader) + 1), prefixdata, (std::size_t) prefixlength);
323  if (valuelength != 0)
324  memcpy((buf + sizeof(RTCPSDESHeader) + 1 + (std::size_t) prefixlength), valuedata, (std::size_t) valuelength);
325 
326  sdes.AddItem(buf, len);
327  return 0;
328 }
329 #endif // RTP_SUPPORT_SDESPRIV
330 
331 int RTCPCompoundPacketBuilder::AddBYEPacket(uint32_t *ssrcs, uint8_t numssrcs, const void *reasondata, uint8_t reasonlength)
332 {
333  if (!arebuilding)
335 
336  if (numssrcs > 31)
338 
339  std::size_t packsize = sizeof(RTCPCommonHeader) + sizeof(uint32_t) * ((std::size_t) numssrcs);
340  std::size_t zerobytes = 0;
341 
342  if (reasonlength > 0)
343  {
344  packsize += 1; // 1 byte for the length;
345  packsize += (std::size_t) reasonlength;
346 
347  std::size_t r = (packsize & 0x03);
348  if (r != 0)
349  {
350  zerobytes = 4 - r;
351  packsize += zerobytes;
352  }
353  }
354 
355  std::size_t totalotherbytes = appsize + byesize + sdes.NeededBytes() + report.NeededBytes();
356 
357  if ((totalotherbytes + packsize) > maximumpacketsize)
359 
360  uint8_t *buf;
361  std::size_t numwords;
362 
363  buf = new uint8_t[packsize];
364 
365  RTCPCommonHeader *hdr = (RTCPCommonHeader *) buf;
366 
367  hdr->version = 2;
368  hdr->padding = 0;
369  hdr->count = numssrcs;
370 
371  numwords = packsize / sizeof(uint32_t);
372  hdr->length = qToBigEndian((uint16_t) (numwords - 1));
374 
375  uint32_t *sources = (uint32_t *) (buf + sizeof(RTCPCommonHeader));
376  uint8_t srcindex;
377 
378  for (srcindex = 0; srcindex < numssrcs; srcindex++)
379  sources[srcindex] = qToBigEndian(ssrcs[srcindex]);
380 
381  if (reasonlength != 0)
382  {
383  std::size_t offset = sizeof(RTCPCommonHeader) + ((std::size_t) numssrcs) * sizeof(uint32_t);
384 
385  buf[offset] = reasonlength;
386  memcpy((buf + offset + 1), reasondata, (std::size_t) reasonlength);
387  for (std::size_t i = 0; i < zerobytes; i++)
388  buf[packsize - 1 - i] = 0;
389  }
390 
391  byepackets.push_back(Buffer(buf, packsize));
392  byesize += packsize;
393 
394  return 0;
395 }
396 
397 int RTCPCompoundPacketBuilder::AddAPPPacket(uint8_t subtype, uint32_t ssrc, const uint8_t name[4], const void *appdata, std::size_t appdatalen)
398 {
399  if (!arebuilding)
401  if (subtype > 31)
403  if ((appdatalen % 4) != 0)
405 
406  std::size_t appdatawords = appdatalen / 4;
407 
408  if ((appdatawords + 2) > 65535)
410 
411  std::size_t packsize = sizeof(RTCPCommonHeader) + sizeof(uint32_t) * 2 + appdatalen;
412  std::size_t totalotherbytes = appsize + byesize + sdes.NeededBytes() + report.NeededBytes();
413 
414  if ((totalotherbytes + packsize) > maximumpacketsize)
416 
417  uint8_t *buf;
418 
419  buf = new uint8_t[packsize];
420 
421  RTCPCommonHeader *hdr = (RTCPCommonHeader *) buf;
422 
423  hdr->version = 2;
424  hdr->padding = 0;
425  hdr->count = subtype;
426 
427  hdr->length = qToBigEndian((uint16_t) (appdatawords + 2));
429 
430  uint32_t *source = (uint32_t *) (buf + sizeof(RTCPCommonHeader));
431  *source = qToBigEndian(ssrc);
432 
433  buf[sizeof(RTCPCommonHeader) + sizeof(uint32_t) + 0] = name[0];
434  buf[sizeof(RTCPCommonHeader) + sizeof(uint32_t) + 1] = name[1];
435  buf[sizeof(RTCPCommonHeader) + sizeof(uint32_t) + 2] = name[2];
436  buf[sizeof(RTCPCommonHeader) + sizeof(uint32_t) + 3] = name[3];
437 
438  if (appdatalen > 0)
439  memcpy((buf + sizeof(RTCPCommonHeader) + sizeof(uint32_t) * 2), appdata, appdatalen);
440 
441  apppackets.push_back(Buffer(buf, packsize));
442  appsize += packsize;
443 
444  return 0;
445 }
446 
448 {
449  if (!arebuilding)
451  if (report.headerlength == 0)
453 
454  uint8_t *buf;
455  std::size_t len;
456 
458 
459  if (!external)
460  {
461  buf = new uint8_t[len];
462  }
463  else
464  buf = buffer;
465 
466  uint8_t *curbuf = buf;
467  RTCPPacket *p;
468 
469  // first, we'll add all report info
470 
471  {
472  bool firstpacket = true;
473  bool done = false;
474  std::list<Buffer>::const_iterator it = report.reportblocks.begin();
475  do
476  {
477  RTCPCommonHeader *hdr = (RTCPCommonHeader *) curbuf;
478  std::size_t offset;
479 
480  hdr->version = 2;
481  hdr->padding = 0;
482 
483  if (firstpacket && report.isSR)
484  {
486  memcpy((curbuf + sizeof(RTCPCommonHeader)), report.headerdata, report.headerlength);
487  offset = sizeof(RTCPCommonHeader) + report.headerlength;
488  }
489  else
490  {
492  memcpy((curbuf + sizeof(RTCPCommonHeader)), report.headerdata, sizeof(uint32_t));
493  offset = sizeof(RTCPCommonHeader) + sizeof(uint32_t);
494  }
495  firstpacket = false;
496 
497  uint8_t count = 0;
498 
499  while (it != report.reportblocks.end() && count < 31)
500  {
501  memcpy(curbuf + offset, (*it).packetdata, (*it).packetlength);
502  offset += (*it).packetlength;
503  count++;
504  it++;
505  }
506 
507  std::size_t numwords = offset / sizeof(uint32_t);
508 
509  hdr->length = qToBigEndian((uint16_t) (numwords - 1));
510  hdr->count = count;
511 
512  // add entry in parent's list
513  if (hdr->packettype == RTP_RTCPTYPE_SR)
514  p = new RTCPSRPacket(curbuf, offset);
515  else
516  p = new RTCPRRPacket(curbuf, offset);
517  rtcppacklist.push_back(p);
518 
519  curbuf += offset;
520  if (it == report.reportblocks.end())
521  done = true;
522  } while (!done);
523  }
524 
525  // then, we'll add the sdes info
526 
527  if (!sdes.sdessources.empty())
528  {
529  bool done = false;
530  std::list<SDESSource *>::const_iterator sourceit = sdes.sdessources.begin();
531 
532  do
533  {
534  RTCPCommonHeader *hdr = (RTCPCommonHeader *) curbuf;
535  std::size_t offset = sizeof(RTCPCommonHeader);
536 
537  hdr->version = 2;
538  hdr->padding = 0;
540 
541  uint8_t sourcecount = 0;
542 
543  while (sourceit != sdes.sdessources.end() && sourcecount < 31)
544  {
545  uint32_t *ssrc = (uint32_t *) (curbuf + offset);
546  *ssrc = qToBigEndian((*sourceit)->ssrc);
547  offset += sizeof(uint32_t);
548 
549  std::list<Buffer>::const_iterator itemit, itemend;
550 
551  itemit = (*sourceit)->items.begin();
552  itemend = (*sourceit)->items.end();
553  while (itemit != itemend)
554  {
555  memcpy(curbuf + offset, (*itemit).packetdata, (*itemit).packetlength);
556  offset += (*itemit).packetlength;
557  itemit++;
558  }
559 
560  curbuf[offset] = 0; // end of item list;
561  offset++;
562 
563  std::size_t r = offset & 0x03;
564  if (r != 0) // align to 32 bit boundary
565  {
566  std::size_t num = 4 - r;
567  std::size_t i;
568 
569  for (i = 0; i < num; i++)
570  curbuf[offset + i] = 0;
571  offset += num;
572  }
573 
574  sourceit++;
575  sourcecount++;
576  }
577 
578  std::size_t numwords = offset / 4;
579 
580  hdr->count = sourcecount;
581  hdr->length = qToBigEndian((uint16_t) (numwords - 1));
582 
583  p = new RTCPSDESPacket(curbuf, offset);
584  rtcppacklist.push_back(p);
585 
586  curbuf += offset;
587  if (sourceit == sdes.sdessources.end())
588  done = true;
589  } while (!done);
590  }
591 
592  // adding the app data
593 
594  {
595  std::list<Buffer>::const_iterator it;
596 
597  for (it = apppackets.begin(); it != apppackets.end(); it++)
598  {
599  memcpy(curbuf, (*it).packetdata, (*it).packetlength);
600 
601  p = new RTCPAPPPacket(curbuf, (*it).packetlength);
602  rtcppacklist.push_back(p);
603 
604  curbuf += (*it).packetlength;
605  }
606  }
607 
608  // adding bye packets
609 
610  {
611  std::list<Buffer>::const_iterator it;
612 
613  for (it = byepackets.begin(); it != byepackets.end(); it++)
614  {
615  memcpy(curbuf, (*it).packetdata, (*it).packetlength);
616 
617  p = new RTCPBYEPacket(curbuf, (*it).packetlength);
618  rtcppacklist.push_back(p);
619 
620  curbuf += (*it).packetlength;
621  }
622  }
623 
624  compoundpacket = buf;
625  compoundpacketlength = len;
626  arebuilding = false;
628  return 0;
629 }
630 
631 } // end namespace
632 
#define RTCP_SDES_ID_EMAIL
Definition: rtpdefines.h:58
#define RTCP_SDES_ID_LOCATION
Definition: rtpdefines.h:60
#define ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT
Definition: rtperrors.h:95
#define RTP_RTCPTYPE_BYE
Definition: rtpdefines.h:53
int AddAPPPacket(uint8_t subtype, uint32_t ssrc, const uint8_t name[4], const void *appdata, std::size_t appdatalen)
int InitBuild(std::size_t maxpacketsize)
int AddSDESPrivateItem(const void *prefixdata, uint8_t prefixlength, const void *valuedata, uint8_t valuelength)
#define ERR_RTP_RTCPCOMPPACKBUILDER_ALREADYBUILT
Definition: rtperrors.h:84
#define RTCP_SDES_ID_NOTE
Definition: rtpdefines.h:62
std::size_t NeededBytesWithExtraItem(uint8_t itemdatalength)
#define ERR_RTP_RTCPCOMPPACKBUILDER_REPORTNOTSTARTED
Definition: rtperrors.h:96
uint32_t GetMSW() const
unsigned int uint32_t
Definition: rtptypes_win.h:46
#define RTP_RTCPTYPE_RR
Definition: rtpdefines.h:51
#define ERR_RTP_RTCPCOMPPACKBUILDER_ALREADYBUILDING
Definition: rtperrors.h:83
std::list< RTCPPacket * > rtcppacklist
#define RTP_MINPACKETSIZE
Definition: rtpdefines.h:39
unsigned char uint8_t
Definition: rtptypes_win.h:42
#define ERR_RTP_RTCPCOMPPACKBUILDER_BUFFERSIZETOOSMALL
Definition: rtperrors.h:87
unsigned short uint16_t
Definition: rtptypes_win.h:44
#define ERR_RTP_RTCPCOMPPACKBUILDER_ILLEGALSUBTYPE
Definition: rtperrors.h:89
#define ERR_RTP_RTCPCOMPPACKBUILDER_INVALIDITEMTYPE
Definition: rtperrors.h:90
int32_t i
Definition: decimators.h:244
#define ERR_RTP_RTCPCOMPPACKBUILDER_ILLEGALAPPDATALENGTH
Definition: rtperrors.h:88
int AddReportBlock(uint32_t ssrc, uint8_t fractionlost, int32_t packetslost, uint32_t exthighestseq, uint32_t jitter, uint32_t lsr, uint32_t dlsr)
#define RTCP_SDES_ID_TOOL
Definition: rtpdefines.h:61
#define RTP_RTCPTYPE_SR
Definition: rtpdefines.h:50
int int32_t
Definition: rtptypes_win.h:45
#define ERR_RTP_RTCPCOMPPACKBUILDER_NOREPORTPRESENT
Definition: rtperrors.h:93
#define ERR_RTP_RTCPCOMPPACKBUILDER_NOTBUILDING
Definition: rtperrors.h:94
#define RTCP_SDES_ID_CNAME
Definition: rtpdefines.h:56
uint32_t GetLSW() const
#define ERR_RTP_RTCPCOMPPACKBUILDER_TOOMANYSSRCS
Definition: rtperrors.h:97
int AddItem(uint8_t *buf, std::size_t len)
int AddBYEPacket(uint32_t *ssrcs, uint8_t numssrcs, const void *reasondata, uint8_t reasonlength)
#define RTCP_SDES_ID_NAME
Definition: rtpdefines.h:57
#define RTP_RTCPTYPE_APP
Definition: rtpdefines.h:54
#define RTCP_SDES_ID_PHONE
Definition: rtpdefines.h:59
#define ERR_RTP_RTCPCOMPPACKBUILDER_ALREADYGOTREPORT
Definition: rtperrors.h:85
#define RTP_RTCPTYPE_SDES
Definition: rtpdefines.h:52
#define ERR_RTP_RTCPCOMPPACKBUILDER_TOTALITEMLENGTHTOOBIG
Definition: rtperrors.h:98
#define RTCP_SDES_ID_PRIVATE
Definition: rtpdefines.h:63
#define ERR_RTP_RTCPCOMPPACKBUILDER_NOCURRENTSOURCE
Definition: rtperrors.h:92
#define ERR_RTP_RTCPCOMPPACKBUILDER_APPDATALENTOOBIG
Definition: rtperrors.h:86
int StartSenderReport(uint32_t senderssrc, const RTPNTPTime &ntptimestamp, uint32_t rtptimestamp, uint32_t packetcount, uint32_t octetcount)
#define ERR_RTP_RTCPCOMPPACKBUILDER_MAXPACKETSIZETOOSMALL
Definition: rtperrors.h:91
int AddSDESNormalItem(RTCPSDESPacket::ItemType t, const void *itemdata, uint8_t itemlength)