• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GStreamer
2  * Copyright (C) <2007> Wim Taymans <wim@fluendo.com>
3  *
4  * gstrtcpbuffer.h: various helper functions to manipulate buffers
5  *     with RTCP payload.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef __GST_RTCPBUFFER_H__
24 #define __GST_RTCPBUFFER_H__
25 
26 #include <gst/gst.h>
27 #include <gst/rtp/rtp-prelude.h>
28 
29 G_BEGIN_DECLS
30 
31 /**
32  * GST_RTCP_VERSION:
33  *
34  * The supported RTCP version 2.
35  */
36 #define GST_RTCP_VERSION 2
37 
38 /**
39  * GstRTCPType:
40  * @GST_RTCP_TYPE_INVALID: Invalid type
41  * @GST_RTCP_TYPE_SR: Sender report
42  * @GST_RTCP_TYPE_RR: Receiver report
43  * @GST_RTCP_TYPE_SDES: Source description
44  * @GST_RTCP_TYPE_BYE: Goodbye
45  * @GST_RTCP_TYPE_APP: Application defined
46  * @GST_RTCP_TYPE_RTPFB: Transport layer feedback.
47  * @GST_RTCP_TYPE_PSFB: Payload-specific feedback.
48  * @GST_RTCP_TYPE_XR: Extended report.
49  *
50  * Different RTCP packet types.
51  */
52 typedef enum
53 {
54   GST_RTCP_TYPE_INVALID = 0,
55   GST_RTCP_TYPE_SR      = 200,
56   GST_RTCP_TYPE_RR      = 201,
57   GST_RTCP_TYPE_SDES    = 202,
58   GST_RTCP_TYPE_BYE     = 203,
59   GST_RTCP_TYPE_APP     = 204,
60   GST_RTCP_TYPE_RTPFB   = 205,
61   GST_RTCP_TYPE_PSFB    = 206,
62   GST_RTCP_TYPE_XR      = 207
63 } GstRTCPType;
64 
65 /* FIXME 2.0: backwards compatibility define for enum typo */
66 #define GST_RTCP_RTPFB_TYPE_RCTP_SR_REQ GST_RTCP_RTPFB_TYPE_RTCP_SR_REQ
67 
68 /**
69  * GstRTCPFBType:
70  * @GST_RTCP_FB_TYPE_INVALID: Invalid type
71  * @GST_RTCP_RTPFB_TYPE_NACK: Generic NACK
72  * @GST_RTCP_RTPFB_TYPE_TMMBR: Temporary Maximum Media Stream Bit Rate Request
73  * @GST_RTCP_RTPFB_TYPE_TMMBN: Temporary Maximum Media Stream Bit Rate
74  *    Notification
75  * @GST_RTCP_RTPFB_TYPE_RTCP_SR_REQ: Request an SR packet for early
76  *    synchronization
77  * @GST_RTCP_PSFB_TYPE_PLI: Picture Loss Indication
78  * @GST_RTCP_PSFB_TYPE_SLI: Slice Loss Indication
79  * @GST_RTCP_PSFB_TYPE_RPSI: Reference Picture Selection Indication
80  * @GST_RTCP_PSFB_TYPE_AFB: Application layer Feedback
81  * @GST_RTCP_PSFB_TYPE_FIR: Full Intra Request Command
82  * @GST_RTCP_PSFB_TYPE_TSTR: Temporal-Spatial Trade-off Request
83  * @GST_RTCP_PSFB_TYPE_TSTN: Temporal-Spatial Trade-off Notification
84  * @GST_RTCP_PSFB_TYPE_VBCN: Video Back Channel Message
85  *
86  * Different types of feedback messages.
87  */
88 typedef enum
89 {
90   /* generic */
91   GST_RTCP_FB_TYPE_INVALID        = 0,
92   /* RTPFB types */
93   GST_RTCP_RTPFB_TYPE_NACK        = 1,
94   /* RTPFB types assigned in RFC 5104 */
95   GST_RTCP_RTPFB_TYPE_TMMBR       = 3,
96   GST_RTCP_RTPFB_TYPE_TMMBN       = 4,
97   /* RTPFB types assigned in RFC 6051 */
98   GST_RTCP_RTPFB_TYPE_RTCP_SR_REQ = 5,
99   /* draft-holmer-rmcat-transport-wide-cc-extensions-01 */
100   GST_RTCP_RTPFB_TYPE_TWCC         = 15,
101 
102   /* PSFB types */
103   GST_RTCP_PSFB_TYPE_PLI          = 1,
104   GST_RTCP_PSFB_TYPE_SLI          = 2,
105   GST_RTCP_PSFB_TYPE_RPSI         = 3,
106   GST_RTCP_PSFB_TYPE_AFB          = 15,
107   /* PSFB types assigned in RFC 5104 */
108   GST_RTCP_PSFB_TYPE_FIR          = 4,
109   GST_RTCP_PSFB_TYPE_TSTR         = 5,
110   GST_RTCP_PSFB_TYPE_TSTN         = 6,
111   GST_RTCP_PSFB_TYPE_VBCN         = 7,
112 } GstRTCPFBType;
113 
114 /**
115  * GstRTCPSDESType:
116  * @GST_RTCP_SDES_INVALID: Invalid SDES entry
117  * @GST_RTCP_SDES_END: End of SDES list
118  * @GST_RTCP_SDES_CNAME: Canonical name
119  * @GST_RTCP_SDES_NAME: User name
120  * @GST_RTCP_SDES_EMAIL: User's electronic mail address
121  * @GST_RTCP_SDES_PHONE: User's phone number
122  * @GST_RTCP_SDES_LOC: Geographic user location
123  * @GST_RTCP_SDES_TOOL: Name of application or tool
124  * @GST_RTCP_SDES_NOTE: Notice about the source
125  * @GST_RTCP_SDES_PRIV: Private extensions
126  *
127  * Different types of SDES content.
128  */
129 /**
130  * GST_RTCP_SDES_H323_CADDR:
131  *
132  * H.323 callable address
133  *
134  * Since: 1.20:
135  */
136 /**
137  * GST_RTCP_SDES_APSI:
138  *
139  * Application Specific Identifier (RFC6776)
140  *
141  * Since: 1.20:
142  */
143 /**
144  * GST_RTCP_SDES_RGRP:
145  *
146  * Reporting Group Identifier (RFC8861)
147  *
148  * Since: 1.20:
149  */
150 /**
151  * GST_RTCP_SDES_RTP_STREAM_ID:
152  *
153  * RtpStreamId SDES item (RFC8852).
154  *
155  * Since: 1.20:
156  */
157 /**
158  * GST_RTCP_SDES_REPAIRED_RTP_STREAM_ID:
159  *
160  * RepairedRtpStreamId SDES item (RFC8852).
161  *
162  * Since: 1.20:
163  */
164 /**
165  * GST_RTCP_SDES_CCID:
166  *
167  * CLUE CaptId (RFC8849)
168  *
169  * Since: 1.20:
170  */
171 /**
172  * GST_RTCP_SDES_MID:
173  *
174  * MID SDES item (RFC8843).
175  *
176  * Since: 1.20:
177  */
178 typedef enum
179 {
180   GST_RTCP_SDES_INVALID                 = -1,
181   GST_RTCP_SDES_END                     = 0,
182   GST_RTCP_SDES_CNAME                   = 1,
183   GST_RTCP_SDES_NAME                    = 2,
184   GST_RTCP_SDES_EMAIL                   = 3,
185   GST_RTCP_SDES_PHONE                   = 4,
186   GST_RTCP_SDES_LOC                     = 5,
187   GST_RTCP_SDES_TOOL                    = 6,
188   GST_RTCP_SDES_NOTE                    = 7,
189   GST_RTCP_SDES_PRIV                    = 8,
190   GST_RTCP_SDES_H323_CADDR              = 9,
191   GST_RTCP_SDES_APSI                    = 10,
192   GST_RTCP_SDES_RGRP                    = 11,
193   GST_RTCP_SDES_RTP_STREAM_ID           = 12,
194   GST_RTCP_SDES_REPAIRED_RTP_STREAM_ID  = 13,
195   GST_RTCP_SDES_CCID                    = 14,
196   GST_RTCP_SDES_MID                     = 15,
197 } GstRTCPSDESType;
198 
199 /**
200  * GstRTCPXRType:
201  * @GST_RTCP_XR_TYPE_INVALID: Invalid XR Report Block
202  * @GST_RTCP_XR_TYPE_LRLE: Loss RLE Report Block
203  * @GST_RTCP_XR_TYPE_DRLE: Duplicate RLE Report Block
204  * @GST_RTCP_XR_TYPE_PRT: Packet Receipt Times Report Block
205  * @GST_RTCP_XR_TYPE_RRT: Receiver Reference Time Report Block
206  * @GST_RTCP_XR_TYPE_DLRR: Delay since the last Receiver Report
207  * @GST_RTCP_XR_TYPE_SSUMM: Statistics Summary Report Block
208  * @GST_RTCP_XR_TYPE_VOIP_METRICS: VoIP Metrics Report Block
209  *
210  * Types of RTCP Extended Reports, those are defined in RFC 3611 and other RFCs
211  * according to the [IANA registry](https://www.iana.org/assignments/rtcp-xr-block-types/rtcp-xr-block-types.xhtml).
212  *
213  * Since: 1.16
214  */
215 typedef enum
216 {
217   GST_RTCP_XR_TYPE_INVALID      = -1,
218   GST_RTCP_XR_TYPE_LRLE         = 1,
219   GST_RTCP_XR_TYPE_DRLE         = 2,
220   GST_RTCP_XR_TYPE_PRT          = 3,
221   GST_RTCP_XR_TYPE_RRT          = 4,
222   GST_RTCP_XR_TYPE_DLRR         = 5,
223   GST_RTCP_XR_TYPE_SSUMM        = 6,
224   GST_RTCP_XR_TYPE_VOIP_METRICS = 7
225 } GstRTCPXRType;
226 
227 /**
228  * GST_RTCP_MAX_SDES:
229  *
230  * The maximum text length for an SDES item.
231  */
232 #define GST_RTCP_MAX_SDES 255
233 
234 /**
235  * GST_RTCP_MAX_RB_COUNT:
236  *
237  * The maximum amount of Receiver report blocks in RR and SR messages.
238  */
239 #define GST_RTCP_MAX_RB_COUNT   31
240 
241 /**
242  * GST_RTCP_MAX_SDES_ITEM_COUNT:
243  *
244  * The maximum amount of SDES items.
245  */
246 #define GST_RTCP_MAX_SDES_ITEM_COUNT   31
247 
248 /**
249  * GST_RTCP_MAX_BYE_SSRC_COUNT:
250  *
251  * The maximum amount of SSRCs in a BYE packet.
252  */
253 #define GST_RTCP_MAX_BYE_SSRC_COUNT   31
254 
255 /**
256  * GST_RTCP_VALID_MASK:
257  *
258  * Mask for version, padding bit and packet type pair
259  */
260 #define GST_RTCP_VALID_MASK (0xc000 | 0x2000 | 0xfe)
261 
262 /**
263  * GST_RTCP_REDUCED_SIZE_VALID_MASK:
264  *
265  * Mask for version and packet type pair allowing reduced size
266  * packets, basically it accepts other types than RR and SR
267  */
268 #define GST_RTCP_REDUCED_SIZE_VALID_MASK (0xc000 | 0xf8)
269 
270 /**
271  * GST_RTCP_VALID_VALUE:
272  *
273  * Valid value for the first two bytes of an RTCP packet after applying
274  * #GST_RTCP_VALID_MASK to them.
275  */
276 #define GST_RTCP_VALID_VALUE ((GST_RTCP_VERSION << 14) | GST_RTCP_TYPE_SR)
277 
278 typedef struct _GstRTCPBuffer GstRTCPBuffer;
279 typedef struct _GstRTCPPacket GstRTCPPacket;
280 
281 struct _GstRTCPBuffer
282 {
283   GstBuffer   *buffer;
284   GstMapInfo   map;
285 };
286 
287 #define GST_RTCP_BUFFER_INIT { NULL, GST_MAP_INFO_INIT }
288 
289 /**
290  * GstRTCPPacket:
291  * @rtcp: pointer to RTCP buffer
292  * @offset: offset of packet in buffer data
293  *
294  * Data structure that points to a packet at @offset in @buffer.
295  * The size of the structure is made public to allow stack allocations.
296  */
297 struct _GstRTCPPacket
298 {
299   /*< public >*/
300   GstRTCPBuffer *rtcp;
301   guint          offset;
302 
303   /*< private >*/
304   gboolean       padding;      /* padding field of current packet */
305   guint8         count;        /* count field of current packet */
306   GstRTCPType    type;         /* type of current packet */
307   guint16        length;       /* length of current packet in 32-bits words minus one, this is validated when doing _get_first_packet() and _move_to_next() */
308 
309   guint          item_offset;  /* current item offset for navigating SDES */
310   guint          item_count;   /* current item count */
311   guint          entry_offset; /* current entry offset for navigating SDES items */
312 };
313 
314 /* creating buffers */
315 
316 GST_RTP_API
317 GstBuffer*      gst_rtcp_buffer_new_take_data     (gpointer data, guint len);
318 
319 GST_RTP_API
320 GstBuffer*      gst_rtcp_buffer_new_copy_data     (gconstpointer data, guint len);
321 
322 GST_RTP_API
323 gboolean        gst_rtcp_buffer_validate_data     (guint8 *data, guint len);
324 
325 GST_RTP_API
326 gboolean        gst_rtcp_buffer_validate          (GstBuffer *buffer);
327 
328 GST_RTP_API
329 gboolean        gst_rtcp_buffer_validate_data_reduced   (guint8 *data, guint len);
330 
331 GST_RTP_API
332 gboolean        gst_rtcp_buffer_validate_reduced        (GstBuffer *buffer);
333 
334 
335 GST_RTP_API
336 GstBuffer*      gst_rtcp_buffer_new               (guint mtu);
337 
338 GST_RTP_API
339 gboolean        gst_rtcp_buffer_map               (GstBuffer *buffer, GstMapFlags flags, GstRTCPBuffer *rtcp);
340 
341 GST_RTP_API
342 gboolean        gst_rtcp_buffer_unmap             (GstRTCPBuffer *rtcp);
343 
344 /* adding/retrieving packets */
345 
346 GST_RTP_API
347 guint           gst_rtcp_buffer_get_packet_count  (GstRTCPBuffer *rtcp);
348 
349 GST_RTP_API
350 gboolean        gst_rtcp_buffer_get_first_packet  (GstRTCPBuffer *rtcp, GstRTCPPacket *packet);
351 
352 GST_RTP_API
353 gboolean        gst_rtcp_packet_move_to_next      (GstRTCPPacket *packet);
354 
355 GST_RTP_API
356 gboolean        gst_rtcp_buffer_add_packet        (GstRTCPBuffer *rtcp, GstRTCPType type,
357                                                    GstRTCPPacket *packet);
358 
359 GST_RTP_API
360 gboolean        gst_rtcp_packet_remove            (GstRTCPPacket *packet);
361 
362 /* working with packets */
363 
364 GST_RTP_API
365 gboolean        gst_rtcp_packet_get_padding       (GstRTCPPacket *packet);
366 
367 GST_RTP_API
368 guint8          gst_rtcp_packet_get_count         (GstRTCPPacket *packet);
369 
370 GST_RTP_API
371 GstRTCPType     gst_rtcp_packet_get_type          (GstRTCPPacket *packet);
372 
373 GST_RTP_API
374 guint16         gst_rtcp_packet_get_length        (GstRTCPPacket *packet);
375 
376 
377 /* sender reports */
378 
379 GST_RTP_API
380 void            gst_rtcp_packet_sr_get_sender_info    (GstRTCPPacket *packet, guint32 *ssrc,
381                                                        guint64 *ntptime, guint32 *rtptime,
382                                                        guint32 *packet_count, guint32 *octet_count);
383 
384 GST_RTP_API
385 void            gst_rtcp_packet_sr_set_sender_info    (GstRTCPPacket *packet, guint32 ssrc,
386                                                        guint64 ntptime, guint32 rtptime,
387                                                        guint32 packet_count, guint32 octet_count);
388 /* receiver reports */
389 
390 GST_RTP_API
391 guint32         gst_rtcp_packet_rr_get_ssrc           (GstRTCPPacket *packet);
392 
393 GST_RTP_API
394 void            gst_rtcp_packet_rr_set_ssrc           (GstRTCPPacket *packet, guint32 ssrc);
395 
396 
397 /* report blocks for SR and RR */
398 
399 GST_RTP_API
400 guint           gst_rtcp_packet_get_rb_count          (GstRTCPPacket *packet);
401 
402 GST_RTP_API
403 void            gst_rtcp_packet_get_rb                (GstRTCPPacket *packet, guint nth, guint32 *ssrc,
404                                                        guint8 *fractionlost, gint32 *packetslost,
405                                                        guint32 *exthighestseq, guint32 *jitter,
406                                                        guint32 *lsr, guint32 *dlsr);
407 
408 GST_RTP_API
409 gboolean        gst_rtcp_packet_add_rb                (GstRTCPPacket *packet, guint32 ssrc,
410                                                        guint8 fractionlost, gint32 packetslost,
411                                                        guint32 exthighestseq, guint32 jitter,
412                                                        guint32 lsr, guint32 dlsr);
413 
414 GST_RTP_API
415 void            gst_rtcp_packet_set_rb                (GstRTCPPacket *packet, guint nth, guint32 ssrc,
416                                                        guint8 fractionlost, gint32 packetslost,
417                                                        guint32 exthighestseq, guint32 jitter,
418                                                        guint32 lsr, guint32 dlsr);
419 
420 /* profile-specific extensions for SR and RR */
421 
422 GST_RTP_API
423 gboolean        gst_rtcp_packet_add_profile_specific_ext        (GstRTCPPacket * packet,
424                                                                  const guint8 * data, guint len);
425 
426 GST_RTP_API
427 guint16         gst_rtcp_packet_get_profile_specific_ext_length (GstRTCPPacket * packet);
428 
429 GST_RTP_API
430 gboolean        gst_rtcp_packet_get_profile_specific_ext        (GstRTCPPacket * packet,
431                                                                  guint8 ** data, guint * len);
432 
433 GST_RTP_API
434 gboolean        gst_rtcp_packet_copy_profile_specific_ext       (GstRTCPPacket * packet,
435                                                                  guint8 ** data, guint * len);
436 
437 /* source description packet */
438 
439 GST_RTP_API
440 guint           gst_rtcp_packet_sdes_get_item_count   (GstRTCPPacket *packet);
441 
442 GST_RTP_API
443 gboolean        gst_rtcp_packet_sdes_first_item       (GstRTCPPacket *packet);
444 
445 GST_RTP_API
446 gboolean        gst_rtcp_packet_sdes_next_item        (GstRTCPPacket *packet);
447 
448 GST_RTP_API
449 guint32         gst_rtcp_packet_sdes_get_ssrc         (GstRTCPPacket *packet);
450 
451 GST_RTP_API
452 gboolean        gst_rtcp_packet_sdes_first_entry      (GstRTCPPacket *packet);
453 
454 GST_RTP_API
455 gboolean        gst_rtcp_packet_sdes_next_entry       (GstRTCPPacket *packet);
456 
457 GST_RTP_API
458 gboolean        gst_rtcp_packet_sdes_get_entry        (GstRTCPPacket *packet,
459                                                        GstRTCPSDESType *type, guint8 *len,
460                                                        guint8 **data);
461 
462 GST_RTP_API
463 gboolean        gst_rtcp_packet_sdes_copy_entry       (GstRTCPPacket *packet,
464                                                        GstRTCPSDESType *type, guint8 *len,
465                                                        guint8 **data);
466 
467 GST_RTP_API
468 gboolean        gst_rtcp_packet_sdes_add_item         (GstRTCPPacket *packet, guint32 ssrc);
469 
470 GST_RTP_API
471 gboolean        gst_rtcp_packet_sdes_add_entry        (GstRTCPPacket *packet, GstRTCPSDESType type,
472                                                        guint8 len, const guint8 *data);
473 
474 /* bye packet */
475 
476 GST_RTP_API
477 guint           gst_rtcp_packet_bye_get_ssrc_count    (GstRTCPPacket *packet);
478 
479 GST_RTP_API
480 guint32         gst_rtcp_packet_bye_get_nth_ssrc      (GstRTCPPacket *packet, guint nth);
481 
482 GST_RTP_API
483 gboolean        gst_rtcp_packet_bye_add_ssrc          (GstRTCPPacket *packet, guint32 ssrc);
484 
485 GST_RTP_API
486 gboolean        gst_rtcp_packet_bye_add_ssrcs         (GstRTCPPacket *packet, guint32 *ssrc, guint len);
487 
488 GST_RTP_API
489 guint8          gst_rtcp_packet_bye_get_reason_len    (GstRTCPPacket *packet);
490 
491 GST_RTP_API
492 gchar*          gst_rtcp_packet_bye_get_reason        (GstRTCPPacket *packet);
493 
494 GST_RTP_API
495 gboolean        gst_rtcp_packet_bye_set_reason        (GstRTCPPacket *packet, const gchar *reason);
496 
497 /* app packets */
498 
499 GST_RTP_API
500 void            gst_rtcp_packet_app_set_subtype       (GstRTCPPacket * packet, guint8 subtype);
501 
502 GST_RTP_API
503 guint8          gst_rtcp_packet_app_get_subtype       (GstRTCPPacket * packet);
504 
505 GST_RTP_API
506 void            gst_rtcp_packet_app_set_ssrc          (GstRTCPPacket * packet, guint32 ssrc);
507 
508 GST_RTP_API
509 guint32         gst_rtcp_packet_app_get_ssrc          (GstRTCPPacket * packet);
510 
511 GST_RTP_API
512 void            gst_rtcp_packet_app_set_name          (GstRTCPPacket * packet, const gchar *name);
513 
514 GST_RTP_API
515 const gchar*    gst_rtcp_packet_app_get_name          (GstRTCPPacket * packet);
516 
517 GST_RTP_API
518 guint16         gst_rtcp_packet_app_get_data_length   (GstRTCPPacket * packet);
519 
520 GST_RTP_API
521 gboolean        gst_rtcp_packet_app_set_data_length   (GstRTCPPacket * packet, guint16 wordlen);
522 
523 GST_RTP_API
524 guint8*         gst_rtcp_packet_app_get_data          (GstRTCPPacket * packet);
525 
526 /* feedback packets */
527 
528 GST_RTP_API
529 guint32         gst_rtcp_packet_fb_get_sender_ssrc    (GstRTCPPacket *packet);
530 
531 GST_RTP_API
532 void            gst_rtcp_packet_fb_set_sender_ssrc    (GstRTCPPacket *packet, guint32 ssrc);
533 
534 GST_RTP_API
535 guint32         gst_rtcp_packet_fb_get_media_ssrc     (GstRTCPPacket *packet);
536 
537 GST_RTP_API
538 void            gst_rtcp_packet_fb_set_media_ssrc     (GstRTCPPacket *packet, guint32 ssrc);
539 
540 GST_RTP_API
541 GstRTCPFBType   gst_rtcp_packet_fb_get_type           (GstRTCPPacket *packet);
542 
543 GST_RTP_API
544 void            gst_rtcp_packet_fb_set_type           (GstRTCPPacket *packet, GstRTCPFBType type);
545 
546 GST_RTP_API
547 guint16         gst_rtcp_packet_fb_get_fci_length     (GstRTCPPacket *packet);
548 
549 GST_RTP_API
550 gboolean        gst_rtcp_packet_fb_set_fci_length     (GstRTCPPacket *packet, guint16 wordlen);
551 
552 GST_RTP_API
553 guint8 *        gst_rtcp_packet_fb_get_fci            (GstRTCPPacket *packet);
554 
555 /* helper functions */
556 
557 GST_RTP_API
558 guint64         gst_rtcp_ntp_to_unix                  (guint64 ntptime);
559 
560 GST_RTP_API
561 guint64         gst_rtcp_unix_to_ntp                  (guint64 unixtime);
562 
563 GST_RTP_API
564 const gchar *   gst_rtcp_sdes_type_to_name            (GstRTCPSDESType type);
565 
566 GST_RTP_API
567 GstRTCPSDESType gst_rtcp_sdes_name_to_type            (const gchar *name);
568 
569 /* extended report */
570 
571 GST_RTP_API
572 guint32         gst_rtcp_packet_xr_get_ssrc           (GstRTCPPacket *packet);
573 
574 GST_RTP_API
575 gboolean        gst_rtcp_packet_xr_first_rb           (GstRTCPPacket *packet);
576 
577 GST_RTP_API
578 gboolean        gst_rtcp_packet_xr_next_rb            (GstRTCPPacket * packet);
579 
580 GST_RTP_API
581 GstRTCPXRType   gst_rtcp_packet_xr_get_block_type     (GstRTCPPacket * packet);
582 
583 GST_RTP_API
584 guint16         gst_rtcp_packet_xr_get_block_length   (GstRTCPPacket * packet);
585 
586 GST_RTP_API
587 gboolean        gst_rtcp_packet_xr_get_rle_info       (GstRTCPPacket * packet,
588                                                        guint32 * ssrc, guint8 * thinning,
589                                                        guint16 * begin_seq, guint16 * end_seq,
590                                                        guint32 * chunk_count);
591 
592 GST_RTP_API
593 gboolean        gst_rtcp_packet_xr_get_rle_nth_chunk  (GstRTCPPacket * packet, guint nth,
594                                                        guint16 * chunk);
595 
596 GST_RTP_API
597 gboolean        gst_rtcp_packet_xr_get_prt_info       (GstRTCPPacket * packet,
598                                                        guint32 * ssrc, guint8 * thinning,
599                                                        guint16 * begin_seq, guint16 * end_seq);
600 
601 GST_RTP_API
602 gboolean        gst_rtcp_packet_xr_get_prt_by_seq     (GstRTCPPacket * packet, guint16 seq,
603                                                        guint32 * receipt_time);
604 
605 GST_RTP_API
606 gboolean        gst_rtcp_packet_xr_get_rrt            (GstRTCPPacket * packet, guint64 * timestamp);
607 
608 GST_RTP_API
609 gboolean        gst_rtcp_packet_xr_get_dlrr_block     (GstRTCPPacket * packet,
610                                                        guint nth, guint32 * ssrc,
611                                                        guint32 * last_rr, guint32 * delay);
612 
613 GST_RTP_API
614 gboolean        gst_rtcp_packet_xr_get_summary_info   (GstRTCPPacket * packet, guint32 * ssrc,
615                                                        guint16 * begin_seq, guint16 * end_seq);
616 
617 GST_RTP_API
618 gboolean        gst_rtcp_packet_xr_get_summary_pkt    (GstRTCPPacket * packet,
619                                                        guint32 * lost_packets, guint32 * dup_packets);
620 
621 GST_RTP_API
622 gboolean        gst_rtcp_packet_xr_get_summary_jitter (GstRTCPPacket * packet,
623                                                        guint32 * min_jitter, guint32 * max_jitter,
624                                                        guint32 * mean_jitter, guint32 * dev_jitter);
625 
626 GST_RTP_API
627 gboolean        gst_rtcp_packet_xr_get_summary_ttl    (GstRTCPPacket * packet, gboolean * is_ipv4,
628                                                        guint8 * min_ttl, guint8 * max_ttl,
629                                                        guint8 * mean_ttl, guint8 * dev_ttl);
630 
631 GST_RTP_API
632 gboolean        gst_rtcp_packet_xr_get_voip_metrics_ssrc        (GstRTCPPacket * packet, guint32 * ssrc);
633 
634 GST_RTP_API
635 gboolean        gst_rtcp_packet_xr_get_voip_packet_metrics      (GstRTCPPacket * packet,
636                                                                  guint8 * loss_rate, guint8 * discard_rate);
637 
638 GST_RTP_API
639 gboolean        gst_rtcp_packet_xr_get_voip_burst_metrics       (GstRTCPPacket * packet,
640                                                                  guint8 * burst_density, guint8 * gap_density,
641                                                                  guint16 * burst_duration, guint16 * gap_duration);
642 
643 GST_RTP_API
644 gboolean        gst_rtcp_packet_xr_get_voip_delay_metrics       (GstRTCPPacket * packet,
645                                                                  guint16 * roundtrip_delay,
646                                                                  guint16 * end_system_delay);
647 
648 GST_RTP_API
649 gboolean        gst_rtcp_packet_xr_get_voip_signal_metrics      (GstRTCPPacket * packet,
650                                                                  guint8 * signal_level, guint8 * noise_level,
651                                                                  guint8 * rerl, guint8 * gmin);
652 
653 GST_RTP_API
654 gboolean        gst_rtcp_packet_xr_get_voip_quality_metrics     (GstRTCPPacket * packet,
655                                                                  guint8 * r_factor, guint8 * ext_r_factor,
656                                                                  guint8 * mos_lq, guint8 * mos_cq);
657 
658 GST_RTP_API
659 gboolean        gst_rtcp_packet_xr_get_voip_configuration_params        (GstRTCPPacket * packet,
660                                                                          guint8 * gmin, guint8 * rx_config);
661 
662 GST_RTP_API
663 gboolean        gst_rtcp_packet_xr_get_voip_jitter_buffer_params        (GstRTCPPacket * packet,
664                                                                          guint16 * jb_nominal,
665                                                                          guint16 * jb_maximum,
666                                                                          guint16 * jb_abs_max);
667 
668 G_END_DECLS
669 
670 #endif /* __GST_RTCPBUFFER_H__ */
671 
672