uvgRTP 2.2.0
An open-source library for RTP/SRTP media delivery
Loading...
Searching...
No Matches
rtcp.hh
1#pragma once
2
3#include "clock.hh"
4#include "util.hh"
5#include "frame.hh"
6
7#include <bitset>
8#include <map>
9#include <thread>
10#include <vector>
11#include <functional>
12#include <memory>
13#include <mutex>
14#include <deque>
15#include <atomic>
16
17namespace uvgrtp {
18
19 class rtp;
20 class srtcp;
21 class socket;
22
23 typedef std::vector<std::pair<size_t, uint8_t*>> buf_vec; // also defined in socket.hh
24
26 enum RTCP_ROLE {
27 RECEIVER,
28 SENDER
29 };
30
31 struct sender_statistics {
32 /* sender stats */
33 uint32_t sent_pkts = 0; /* Number of sent RTP packets */
34 uint32_t sent_bytes = 0; /* Number of sent bytes excluding RTP Header */
35 bool sent_rtp_packet = false; // since last report
36 };
37
38 struct receiver_statistics {
39 /* receiver stats */
40 uint32_t received_pkts = 0; /* Number of packets received */
41 uint32_t lost_pkts = 0; /* Number of dropped RTP packets */
42 uint32_t received_bytes = 0; /* Number of bytes received excluding RTP Header */
43 bool received_rtp_packet = false; // since last report
44
45 uint32_t expected_pkts = 0; /* Number of expected packets */
46 uint32_t received_prior = 0; /* Number of received packets in last report */
47 uint32_t expected_prior = 0; /* Number of expected packets in last report */
48
49 double jitter = 0; /* The estimation of jitter (see RFC 3550 A.8) */
50 uint32_t transit = 0; /* TODO: */
51
52
53 /* Receiver clock related stuff */
54 uint64_t initial_ntp = 0; /* Wallclock reading when the first RTP packet was received */
55 uint32_t initial_rtp = 0; /* RTP timestamp of the first RTP packet received */
56 uint32_t clock_rate = 0; /* Rate of the clock (used for jitter calculations) */
57
58 uint32_t lsr = 0; /* Middle 32 bits of the 64-bit NTP timestamp of previous SR */
59 uvgrtp::clock::hrc::hrc_t sr_ts; /* When the last SR was received (used to calculate delay) */
60
61 uint16_t max_seq = 0; /* Highest sequence number received */
62 uint32_t base_seq = 0; /* First sequence number received */
63 uint32_t bad_seq = 0; /* TODO: */
64 uint16_t cycles = 0; /* Number of sequence cycles */
65 };
66
67 struct rtcp_participant {
68 struct receiver_statistics stats; /* RTCP session statistics of the participant */
69
70 uint32_t probation = 0; /* has the participant been fully accepted to the session */
71 int role = 0; /* is the participant a sender or a receiver */
72
73 /* Save the latest RTCP packets received from this participant
74 * Users can query these packets using the SSRC of participant */
75 uvgrtp::frame::rtcp_sender_report *sr_frame = nullptr;
76 uvgrtp::frame::rtcp_receiver_report *rr_frame = nullptr;
77 uvgrtp::frame::rtcp_sdes_packet *sdes_frame = nullptr;
78 uvgrtp::frame::rtcp_app_packet *app_frame = nullptr;
79 };
80
81 struct rtcp_app_packet {
82 rtcp_app_packet(const rtcp_app_packet& orig_packet) = delete;
83 rtcp_app_packet(const char* name, uint8_t subtype, uint32_t payload_len, std::unique_ptr<uint8_t[]> payload);
84 ~rtcp_app_packet();
85
86 const char* name;
87 uint8_t subtype;
88
89 uint32_t payload_len;
90 std::unique_ptr<uint8_t[]> payload;
91 };
93
111 class rtcp {
112 public:
114 rtcp(std::shared_ptr<uvgrtp::rtp> rtp, std::shared_ptr<std::atomic<std::uint32_t>> ssrc, std::string cname, int rce_flags);
115 rtcp(std::shared_ptr<uvgrtp::rtp> rtp, std::shared_ptr<std::atomic<std::uint32_t>> ssrc, std::string cname, std::shared_ptr<uvgrtp::srtcp> srtcp, int rce_flags);
116 ~rtcp();
117
118 /* start the RTCP runner thread
119 *
120 * return RTP_OK on success and RTP_MEMORY_ERROR if the allocation fails */
121 rtp_error_t start();
122
123 /* End the RTCP session and send RTCP BYE to all participants
124 *
125 * return RTP_OK on success */
126 rtp_error_t stop();
127
128 /* Generate either RTCP Sender or Receiver report and sent it to all participants
129 * Return RTP_OK on success and RTP_ERROR on error */
130 rtp_error_t generate_report();
131
132 /* Handle incoming RTCP packet (first make sure it's a valid RTCP packet)
133 * This function will call one of the above functions internally
134 *
135 * Return RTP_OK on success and RTP_ERROR on error */
136 rtp_error_t handle_incoming_packet(uint8_t *buffer, size_t size);
138
139 /* Send "frame" to all participants
140 *
141 * These routines will convert all necessary fields to network byte order
142 *
143 * Return RTP_OK on success
144 * Return RTP_INVALID_VALUE if "frame" is in some way invalid
145 * Return RTP_SEND_ERROR if sending "frame" did not succeed (see socket.hh for details) */
146
156 rtp_error_t send_sdes_packet(const std::vector<uvgrtp::frame::rtcp_sdes_item>& items);
157
170 rtp_error_t send_app_packet(const char *name, uint8_t subtype, uint32_t payload_len, const uint8_t *payload);
171
186 rtp_error_t send_bye_packet(std::vector<uint32_t> ssrcs);
187
189 /* Return the latest RTCP packet received from participant of "ssrc"
190 * Return nullptr if we haven't received this kind of packet or if "ssrc" doesn't exist
191 *
192 * NOTE: Caller is responsible for deallocating the memory */
193 uvgrtp::frame::rtcp_sender_report *get_sender_packet(uint32_t ssrc);
194 uvgrtp::frame::rtcp_receiver_report *get_receiver_packet(uint32_t ssrc);
195 uvgrtp::frame::rtcp_sdes_packet *get_sdes_packet(uint32_t ssrc);
196 uvgrtp::frame::rtcp_app_packet *get_app_packet(uint32_t ssrc);
197
198 /* Somebody joined the multicast group the owner of this RTCP instance is part of
199 * Add it to RTCP participant list so we can start listening for reports
200 *
201 * "clock_rate" tells how much the RTP timestamp advances, this information is needed
202 * to calculate the interarrival jitter correctly. It has nothing do with our clock rate,
203 * (or whether we're even sending anything)
204 *
205 * Return RTP_OK on success and RTP_ERROR on error */
206 rtp_error_t add_initial_participant(uint32_t clock_rate);
207
208 /* Functions for updating various RTP sender statistics */
209 void sender_update_stats(const uvgrtp::frame::rtp_frame *frame);
210
211 /* If we've detected that our SSRC has collided with someone else's SSRC, we need to
212 * generate new random SSRC and reinitialize our own RTCP state.
213 * RTCP object still has the participants of "last session", we can use their SSRCs
214 * to detected new collision
215 *
216 * Return RTP_OK if reinitialization succeeded
217 * Return RTP_SSRC_COLLISION if our new SSRC has collided and we need to generate new SSRC */
218 rtp_error_t reset_rtcp_state(uint32_t ssrc);
219
220 /* Update various session statistics */
221 void update_session_statistics(const uvgrtp::frame::rtp_frame *frame);
222
223 /* Getter for interval_ms_, which is calculated by set_session_bandwidth */
224 uint32_t get_rtcp_interval_ms() const;
225
226 /* Set RTCP packet transmission interval in milliseconds
227 *
228 * Return RTP_OK if interval was set successfully
229 * Return RTP_INVALID_VALUE if new interval is invalid */
230 rtp_error_t set_rtcp_interval_ms(int32_t new_interval);
231
232 /* Set total bandwidth for this session, called at the start
233 * If you want to set the interval manually later, use
234 * set_rtcp_interval_ms() function */
235 void set_session_bandwidth(uint32_t kbps);
236
237 std::shared_ptr<uvgrtp::socket> get_socket() const;
238
239 /* Store the following info in RTCP
240 * Local IP address
241 * Remote IP address
242 * Local port number for RTCP
243 * Destination port number for RTCP
244 * These are used when adding new participants and creating sockets for them */
245
246 rtp_error_t set_network_addresses(std::string local_addr, std::string remote_addr,
247 uint16_t local_port, uint16_t dst_port);
248
249 /* Return SSRCs of all participants */
250 std::vector<uint32_t> get_participants() const;
252
267 void set_ts_info(uint64_t clock_start, uint32_t clock_rate, uint32_t rtp_ts_start);
268
269 /* Alternate way to get RTCP packets is to install a hook for them. So instead of
270 * polling an RTCP packet, user can install a function that is called when
271 * a specific RTCP packet is received. */
272
284
295 rtp_error_t install_sender_hook(std::function<void(std::unique_ptr<uvgrtp::frame::rtcp_sender_report>)> sr_handler);
296
308
319 rtp_error_t install_receiver_hook(std::function<void(std::unique_ptr<uvgrtp::frame::rtcp_receiver_report>)> rr_handler);
320
332
343 rtp_error_t install_sdes_hook(std::function<void(std::unique_ptr<uvgrtp::frame::rtcp_sdes_packet>)> sdes_handler);
344
356
367 rtp_error_t install_app_hook(std::function<void(std::unique_ptr<uvgrtp::frame::rtcp_app_packet>)> app_handler);
368
370 // These have been replaced by functions with unique_ptr in them
371 rtp_error_t install_sender_hook(std::function<void(std::shared_ptr<uvgrtp::frame::rtcp_sender_report>)> sr_handler);
372 rtp_error_t install_receiver_hook(std::function<void(std::shared_ptr<uvgrtp::frame::rtcp_receiver_report>)> rr_handler);
373 rtp_error_t install_sdes_hook(std::function<void(std::shared_ptr<uvgrtp::frame::rtcp_sdes_packet>)> sdes_handler);
374 rtp_error_t install_app_hook(std::function<void(std::shared_ptr<uvgrtp::frame::rtcp_app_packet>)> app_handler);
376
387 rtp_error_t install_send_app_hook(std::string app_name, std::function<std::unique_ptr<uint8_t[]>(uint8_t& subtype, uint32_t& payload_len)> app_sending_func);
388
396 rtp_error_t remove_all_hooks();
397
398 rtp_error_t remove_send_app_hook(std::string app_name);
399
401 /* Update RTCP-related sender statistics */
402 rtp_error_t update_sender_stats(size_t pkt_size);
403
404 /* Update RTCP-related receiver statistics */
405 static rtp_error_t recv_packet_handler(void *arg, int rce_flags, frame::rtp_frame **out);
406
407 /* Update RTCP-related sender statistics */
408 static rtp_error_t send_packet_handler_vec(void *arg, uvgrtp::buf_vec& buffers);
409
410 // the length field is the rtcp packet size measured in 32-bit words - 1
411 size_t rtcp_length_in_bytes(uint16_t length);
412
413 void set_payload_size(size_t mtu_size);
415
416 private:
417
418 rtp_error_t set_sdes_items(const std::vector<uvgrtp::frame::rtcp_sdes_item>& items);
419
420 uint32_t size_of_ready_app_packets() const;
421 uint32_t size_of_apps_from_hook(std::vector< std::shared_ptr<rtcp_app_packet>> packets) const;
422
423 uint32_t size_of_compound_packet(uint16_t reports,
424 bool sr_packet, bool rr_packet, bool sdes_packet, uint32_t app_size, bool bye_packet) const;
425
426 /* read the header values from rtcp packet */
427 void read_rtcp_header(const uint8_t* buffer, size_t& read_ptr,
429 void read_reports(const uint8_t* buffer, size_t& read_ptr, size_t packet_end, uint8_t count,
430 std::vector<uvgrtp::frame::rtcp_report_block>& reports);
431
432 void read_ssrc(const uint8_t* buffer, size_t& read_ptr, uint32_t& out_ssrc);
433
434 /* Handle different kinds of incoming rtcp packets. The read header is passed to functions
435 which read rest of the frame type specific data.
436 * Return RTP_OK on success and RTP_ERROR on error */
437 rtp_error_t handle_sender_report_packet(uint8_t* buffer, size_t& read_ptr, size_t packet_end,
439 rtp_error_t handle_receiver_report_packet(uint8_t* buffer, size_t& read_ptr, size_t packet_end,
441 rtp_error_t handle_sdes_packet(uint8_t* buffer, size_t& read_ptr, size_t packet_end,
442 uvgrtp::frame::rtcp_header& header, uint32_t sender_ssrc);
443 rtp_error_t handle_bye_packet(uint8_t* buffer, size_t& read_ptr,
445 rtp_error_t handle_app_packet(uint8_t* buffer, size_t& read_ptr, size_t packet_end,
447
448 static void rtcp_runner(rtcp *rtcp);
449
450 static void rtcp_report_reader(rtcp *rtcp);
451
452 /* when we start the RTCP instance, we don't know what the SSRC of the remote is
453 * when an RTP packet is received, we must check if we've already received a packet
454 * from this sender and if not, create new entry to receiver_stats_ map */
455 bool is_participant(uint32_t ssrc) const;
456
457 //TODO: Resolve collision??
458 /* When we receive an RTP or RTCP packet, we need to check the source address and see if it's
459 * the same address where we've received packets before.
460 *
461 * If the address is new, it means we have detected an SSRC collision and the paket should
462 * be dropped We also need to check whether this SSRC matches with our own SSRC and if it does
463 * we need to send RTCP BYE and rejoin to the session */
464 bool collision_detected(uint32_t ssrc) const;
465
466 /* Move participant from initial_peers_ to participants_ */
467 rtp_error_t add_participant(uint32_t ssrc);
468
469 /* We've got a message from new source (the SSRC of the frame is not known to us)
470 * Initialize statistics for the peer and move it to participants_ */
471 rtp_error_t init_new_participant(const uvgrtp::frame::rtp_frame *frame);
472
473 /* Initialize the RTP Sequence related stuff of peer
474 * This function assumes that the peer already exists in the participants_ map */
475 rtp_error_t init_participant_seq(uint32_t ssrc, uint16_t base_seq);
476
477 /* Update the SSRC's sequence related data in participants_ map
478 *
479 * Return RTP_OK if the received packet was OK
480 * Return RTP_GENERIC_ERROR if it wasn't and
481 * packet-related statistics should not be updated */
482 rtp_error_t update_participant_seq(uint32_t ssrc, uint16_t seq);
483
484 /* Update the RTCP bandwidth variables
485 *
486 * "pkt_size" tells how much rtcp_byte_count_
487 * should be increased before calculating the new average */
488 void update_rtcp_bandwidth(size_t pkt_size);
489
490 /* Update average RTCP packet size variable
491 * packet_size is the size of received RTCP packet in octets */
492 void update_avg_rtcp_size(uint64_t packet_size);
493
494 /* Calculate the RTCP report interval in seconds
495 * rtcp_bw is given in kbps
496 * Defined in RFC3550 Appendix A.7 */
497 double rtcp_interval(int members, int senders,
498 double rtcp_bw, bool we_sent, double avg_rtcp_size, bool red_min, bool randomisation);
499
500 /* RTCP runner keeps track of ssrcs and how long they have been silent.
501 * By default a source get timed out if it has been silent for 25 seconds
502 * If an ssrc is timed out, this function removes it from participants_ map and
503 * updates any other infos */
504 rtp_error_t remove_timeout_ssrc(uint32_t ssrc);
505
506 /* Because struct statistics contains uvgRTP clock object we cannot
507 * zero it out without compiler complaining about it so all the fields
508 * must be set to zero manually */
509 void zero_stats(uvgrtp::sender_statistics *stats);
510
511 void zero_stats(uvgrtp::receiver_statistics *stats);
512
513 /* Takes ownership of the frame */
514 rtp_error_t send_rtcp_packet_to_participants(uint8_t* frame, uint32_t frame_size, bool encrypt);
515
516 void free_participant(std::unique_ptr<rtcp_participant> participant);
517
518 void cleanup_participants();
519
520 /* Secure RTCP context */
521 std::shared_ptr<uvgrtp::srtcp> srtcp_;
522
523 /* RTP context flags */
524 int rce_flags_;
525
526 /* are we a sender (and possible a receiver) or just a receiver */
527 int our_role_;
528
529 /* TODO: time_t?? */
530 // TODO: Check these, they don't seem to be used
531 size_t tp_; /* the last time an RTCP packet was transmitted */
532 size_t tc_; /* the current time */
533 size_t tn_; /* the next scheduled transmission time of an RTCP packet */
534 size_t pmembers_; /* the estimated number of session members at the time tn was last recomputed */
535 size_t members_; /* the most current estimate for the number of session members */
536 size_t senders_; /* the most current estimate for the number of senders in the session */
537
538 /* Total session bandwidth. RTCP bandwidth will be set to 5 % of this */
539 uint32_t total_bandwidth_;
540
541 /* The target RTCP bandwidth, i.e., the total bandwidth
542 * that will be used for RTCP packets by all members of this session,
543 * in octets per second. This will be a specified fraction of the
544 * "session bandwidth" parameter supplied to the application at startup. */
545 double rtcp_bandwidth_;
546
547 /* "Minimum" value for RTCP transmission interval, depends on the session bandwidth
548 * Actual interval can be 50 % smaller due to randomisation */
549 uint32_t reduced_minimum_;
550
551 /* Flag that is true if the application has sent data since
552 * the 2nd previous RTCP report was transmitted. */
553 // TODO: Only set, never read
554 bool we_sent_;
555
556 /* Store sender and receiver info, this is needed when calling
557 * add_participant dynamically (i.e. after initializing the stream) */
558 std::string local_addr_;
559 std::string remote_addr_;
560 uint16_t local_port_;
561 uint16_t dst_port_;
562
563 /* The average compound RTCP packet size, in octets,
564 * over all RTCP packets sent and received by this participant. The
565 * size includes lower-layer transport and network protocol headers
566 * (e.g., UDP and IP) as explained in Section 6.2 */
567 // TODO: Only set, never read
568 size_t avg_rtcp_pkt_pize_;
569
570 /* Average RTCP packet size in octets.
571 * Initialized to 64 */
572 uint64_t avg_rtcp_size_;
573
574 /* Number of RTCP packets and bytes sent and received by this participant */
575 // TODO: Only set, never read
576 size_t rtcp_pkt_count_;
577 size_t rtcp_byte_count_;
578
579 /* Number of RTCP packets sent */
580 uint32_t rtcp_pkt_sent_count_;
581
582 /* Flag that is true if the application has not yet sent an RTCP packet. */
583 // TODO: Only set, never read
584 bool initial_;
585
586 /* Copy of our own current SSRC */
587 std::shared_ptr<std::atomic_uint> ssrc_;
588
589 /* NTP timestamp associated with initial RTP timestamp (aka t = 0) */
590 uint64_t clock_start_;
591
592 /* Clock rate of the media ie. how fast does the time increase */
593 uint32_t clock_rate_;
594
595 /* The first value of RTP timestamp (aka t = 0) */
596 uint32_t rtp_ts_start_;
597
598 std::map<uint32_t, std::unique_ptr<rtcp_participant>> participants_;
599 uint8_t num_receivers_; // maximum is 32 at the moment (5 bits)
600
601 /* Address of the socket that we are sending data to */
602 sockaddr_in socket_address_ = {};
603
604
605 /* Map for keeping track of sources for timeouts
606 * First number is the sources ssrc
607 * Second number is how many milliseconds it has been silent*/
608 std::map<uint32_t, uint32_t> ms_since_last_rep_;
609
610 /* statistics for RTCP Sender and Receiver Reports */
611 struct sender_statistics our_stats;
612
613 /* If we expect frames from remote but haven't received anything from remote yet,
614 * the participant resides in this vector until he's moved to participants_ */
615 std::vector<std::unique_ptr<rtcp_participant>> initial_participants_;
616
617
618
619 void (*sender_hook_)(uvgrtp::frame::rtcp_sender_report *);
620 void (*receiver_hook_)(uvgrtp::frame::rtcp_receiver_report *);
621 void (*sdes_hook_)(uvgrtp::frame::rtcp_sdes_packet *);
622 void (*app_hook_)(uvgrtp::frame::rtcp_app_packet *);
623
624 std::function<void(std::shared_ptr<uvgrtp::frame::rtcp_sender_report>)> sr_hook_f_;
625 std::function<void(std::unique_ptr<uvgrtp::frame::rtcp_sender_report>)> sr_hook_u_;
626 std::function<void(std::shared_ptr<uvgrtp::frame::rtcp_receiver_report>)> rr_hook_f_;
627 std::function<void(std::unique_ptr<uvgrtp::frame::rtcp_receiver_report>)> rr_hook_u_;
628 std::function<void(std::shared_ptr<uvgrtp::frame::rtcp_sdes_packet>)> sdes_hook_f_;
629 std::function<void(std::unique_ptr<uvgrtp::frame::rtcp_sdes_packet>)> sdes_hook_u_;
630 std::function<void(std::shared_ptr<uvgrtp::frame::rtcp_app_packet>)> app_hook_f_;
631 std::function<void(std::unique_ptr<uvgrtp::frame::rtcp_app_packet>)> app_hook_u_;
632
633 std::mutex sr_mutex_;
634 std::mutex rr_mutex_;
635 std::mutex sdes_mutex_;
636 std::mutex app_mutex_;
637 mutable std::mutex participants_mutex_;
638 std::mutex send_app_mutex_;
639
640 std::unique_ptr<std::thread> report_generator_;
641 std::unique_ptr<std::thread> report_reader_;
642 std::shared_ptr<uvgrtp::socket> rtcp_socket_;
643
644 bool is_active() const
645 {
646 return active_;
647 }
648
649 bool active_;
650
651 std::atomic<uint32_t> interval_ms_;
652
653 std::shared_ptr<uvgrtp::rtp> rtp_ptr_;
654
655 std::mutex packet_mutex_;
656
657 // messages waiting to be sent
658 std::vector<uvgrtp::frame::rtcp_sdes_item> ourItems_; // always sent
659 std::vector<uint32_t> bye_ssrcs_; // sent once
660
661 std::map<std::string, std::deque<rtcp_app_packet>> app_packets_; // sent one at a time per name
662 // APPs for hook
663 std::multimap<std::string, std::function <std::unique_ptr<uint8_t[]>(uint8_t& subtype, uint32_t& payload_len)>> outgoing_app_hooks_;
664
665 bool hooked_app_;
666
667
669 char cname_[255];
670
671 size_t mtu_size_;
672 };
673}
674
675namespace uvg_rtp = uvgrtp;
RTCP instance handles all incoming and outgoing RTCP traffic, including report generation.
Definition: rtcp.hh:111
rtp_error_t install_receiver_hook(void(*hook)(uvgrtp::frame::rtcp_receiver_report *))
Install an RTCP Receiver Report hook.
rtp_error_t send_app_packet(const char *name, uint8_t subtype, uint32_t payload_len, const uint8_t *payload)
Send an RTCP APP packet.
rtp_error_t install_receiver_hook(std::function< void(std::unique_ptr< uvgrtp::frame::rtcp_receiver_report >)> rr_handler)
Install an RTCP Receiver Report hook.
rtp_error_t send_bye_packet(std::vector< uint32_t > ssrcs)
Send an RTCP BYE packet.
rtp_error_t install_sdes_hook(std::function< void(std::unique_ptr< uvgrtp::frame::rtcp_sdes_packet >)> sdes_handler)
Install an RTCP SDES packet hook.
rtp_error_t install_sender_hook(void(*hook)(uvgrtp::frame::rtcp_sender_report *))
Install an RTCP Sender Report hook.
void set_ts_info(uint64_t clock_start, uint32_t clock_rate, uint32_t rtp_ts_start)
Provide timestamping information for RTCP.
rtp_error_t send_sdes_packet(const std::vector< uvgrtp::frame::rtcp_sdes_item > &items)
Send an RTCP SDES packet.
rtp_error_t install_app_hook(std::function< void(std::unique_ptr< uvgrtp::frame::rtcp_app_packet >)> app_handler)
Install an RTCP APP packet hook.
rtp_error_t install_sender_hook(std::function< void(std::unique_ptr< uvgrtp::frame::rtcp_sender_report >)> sr_handler)
Install an RTCP Sender Report hook.
rtp_error_t remove_all_hooks()
Remove all installed hooks for RTCP.
rtp_error_t install_app_hook(void(*hook)(uvgrtp::frame::rtcp_app_packet *))
Install an RTCP APP packet hook.
rtp_error_t install_send_app_hook(std::string app_name, std::function< std::unique_ptr< uint8_t[]>(uint8_t &subtype, uint32_t &payload_len)> app_sending_func)
Install hook for one type of APP packets.
rtp_error_t install_sdes_hook(void(*hook)(uvgrtp::frame::rtcp_sdes_packet *))
Install an RTCP SDES packet hook.
See RFC 3550 section 6.7
Definition: frame.hh:151
Header of for all RTCP packets defined in RFC 3550 section 6
Definition: frame.hh:74
See RFC 3550 section 6.4.2
Definition: frame.hh:117
See RFC 3550 section 6.5
Definition: frame.hh:132
See RFC 3550 section 6.5
Definition: frame.hh:145
See RFC 3550 section 6.4.1
Definition: frame.hh:124
See RFC 3550 section 5
Definition: frame.hh:53