|
uvgRTP 4.0.0
An open-source library for RTP/SRTP media delivery
|
RTCP instance handles all incoming and outgoing RTCP traffic, including report generation. More...
#include <rtcp.hh>
Public Member Functions | |
| 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 | add_sdes_item (const uvgrtp::frame::rtcp_sdes_item &item) |
| Add an SDES item that will be included in all future RTCP SDES packets. | |
| rtp_error_t | clear_sdes_items () |
| Remove all SDES items previously added with add_sdes_item() | |
| 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_send_app_hook (const char *app_name, uint8_t *(*send_hook)(uint8_t *subtype, uint32_t *payload_len, void *user_arg), void *user_arg) |
| Install a hook for generating RTCP APP packets during RTCP reporting. | |
| rtp_error_t | remove_send_app_hook (const char *app_name) |
| Remove a previously installed APP sending hook. | |
| rtp_error_t | send_bye_packet (const uint32_t *ssrcs, size_t count) |
| Send an RTCP BYE packet to indicate stream end. | |
| rtp_error_t | install_sender_hook (void(*handler)(uvgrtp::frame::rtcp_sr *)) |
| Install a callback for incoming RTCP Sender Reports. | |
| rtp_error_t | install_receiver_hook (void(*handler)(uvgrtp::frame::rtcp_rr *)) |
| Install a callback for incoming RTCP Receiver Reports. | |
| rtp_error_t | install_sdes_hook (void(*handler)(uvgrtp::frame::rtcp_sdes *)) |
| Install a callback for incoming RTCP SDES packets. | |
| rtp_error_t | install_app_hook (void(*handler)(uvgrtp::frame::rtcp_app_packet *)) |
| Install a callback for incoming RTCP APP packets. | |
| rtp_error_t | remove_all_hooks () |
| Remove all installed reception RTCP packet hook, but not app send hook. | |
| uvgrtp::frame::rtcp_sr * | get_sr (uint32_t ssrc) |
| Get sender report for given SSRC. | |
| uvgrtp::frame::rtcp_rr * | get_rr (uint32_t ssrc) |
| Get receiver report for given SSRC. | |
| uvgrtp::frame::rtcp_sdes * | get_sdes (uint32_t ssrc) |
| Get SDES packet for given SSRC. | |
| uvgrtp::frame::rtcp_app_packet * | get_app_packet (uint32_t ssrc) |
| Get APP packet for given SSRC. | |
| rtp_error_t | send_sdes_packet (const std::vector< uvgrtp::frame::rtcp_sdes_item > &items) |
| Send an RTCP SDES packet with full SDES items. | |
| rtp_error_t | send_bye_packet (const std::vector< uint32_t > &ssrcs) |
| Send an RTCP BYE packet. | |
| rtp_error_t | install_sender_hook (std::function< void(std::unique_ptr< uvgrtp::frame::rtcp_sender_report >)> sr_handler) |
| Install a C++ callback for incoming RTCP Sender Reports. | |
| rtp_error_t | install_receiver_hook (std::function< void(std::unique_ptr< uvgrtp::frame::rtcp_receiver_report >)> rr_handler) |
| Install a C++ callback for incoming RTCP Receiver Reports. | |
| rtp_error_t | install_sdes_hook (std::function< void(std::unique_ptr< uvgrtp::frame::rtcp_sdes_packet >)> sdes_handler) |
| Install a C++ callback for incoming RTCP SDES packets. | |
| rtp_error_t | install_app_hook (std::function< void(std::unique_ptr< uvgrtp::frame::rtcp_app_packet >)> app_handler) |
| Install a C++ callback for incoming RTCP APP packets. | |
| rtp_error_t | install_roundtrip_time_hook (std::function< void(uint32_t, uint32_t, double)> rtt_handler) |
| Install an Round Trip Time hook. | |
| rtp_error_t | install_send_app_hook (const std::string &app_name, std::function< std::unique_ptr< uint8_t[]>(uint8_t &subtype, uint32_t &payload_len)> app_sending_func) |
| Install a C++ hook for sending RTCP APP packets during compound report generation. | |
| rtp_error_t | remove_send_app_hook (const std::string &app_name) |
| rtp_error_t | install_sender_hook (std::function< void(std::shared_ptr< uvgrtp::frame::rtcp_sender_report >)> sr_handler) |
| rtp_error_t | install_receiver_hook (std::function< void(std::shared_ptr< uvgrtp::frame::rtcp_receiver_report >)> rr_handler) |
| rtp_error_t | install_sdes_hook (std::function< void(std::shared_ptr< uvgrtp::frame::rtcp_sdes_packet >)> sdes_handler) |
| rtp_error_t | install_app_hook (std::function< void(std::shared_ptr< uvgrtp::frame::rtcp_app_packet >)> app_handler) |
| rtp_error_t | install_sender_hook (void(*hook)(uvgrtp::frame::rtcp_sender_report *)) |
| rtp_error_t | install_receiver_hook (void(*hook)(uvgrtp::frame::rtcp_receiver_report *)) |
| rtp_error_t | install_sdes_hook (void(*hook)(uvgrtp::frame::rtcp_sdes_packet *)) |
| uvgrtp::frame::rtcp_sender_report * | get_sender_packet (uint32_t ssrc) |
| uvgrtp::frame::rtcp_receiver_report * | get_receiver_packet (uint32_t ssrc) |
| uvgrtp::frame::rtcp_sdes_packet * | get_sdes_packet (uint32_t ssrc) |
RTCP instance handles all incoming and outgoing RTCP traffic, including report generation.
If media_stream was created with RCE_RTCP flag, RTCP is enabled. RTCP periodically sends compound RTCP packets. The bit rate of RTP session influences the reporting interval, but changing this has not yet been implemented.
The compound RTCP packet begins with either Sender Reports if we sent RTP packets recently or Receiver Report if we didn't send RTP packets recently. Both of these report types include report blocks for all the RTP sources we have received packets from during reporting period. The compound packets also always have an SDES packet and calling send_sdes_packet()-function will modify the contents of this SDES packet.
You can use the APP packet to test new RTCP packet types using the send_app_packet()-function. The APP packets are added to these periodically sent compound packets.
See RFC 3550 section 6 for more details.