Create RTCP getter

Used to install hooking functions for RTCP packets
This commit is contained in:
Aaro Altonen 2019-10-24 07:49:17 +03:00
parent 931fb74521
commit 1c33e6a0a2
4 changed files with 13 additions and 2 deletions

View File

@ -248,3 +248,8 @@ void kvz_rtp::connection::install_dealloc_hook(void (*dealloc_hook)(void *))
fqueue_->install_dealloc_hook(dealloc_hook);
}
kvz_rtp::rtcp *kvz_rtp::connection::get_rtcp()
{
return rtcp_;
}

View File

@ -93,6 +93,12 @@ namespace kvz_rtp {
* in deinit_transaction(), it will calls this hook if it has been set. */
void install_dealloc_hook(void (*dealloc_hook)(void *));
/* Return pointer to RTCP object if RTCP has been enabled
* Otherwise return nullptr
*
* TODO make this const */
kvz_rtp::rtcp *get_rtcp();
protected:
void *config_;
uint32_t id_;

View File

@ -625,7 +625,7 @@ kvz_rtp::frame::rtcp_sender_frame *kvz_rtp::rtcp::get_sender_packet(uint32_t ssr
return frame;
}
kvz_rtp::frame::rtcp_receiver_frame *kvz_rtp::rtcp::get_receiver_paket(uint32_t ssrc)
kvz_rtp::frame::rtcp_receiver_frame *kvz_rtp::rtcp::get_receiver_packet(uint32_t ssrc)
{
if (participants_.find(ssrc) == participants_.end())
return nullptr;

View File

@ -86,7 +86,7 @@ namespace kvz_rtp {
*
* NOTE: Caller is responsible for deallocating the memory */
kvz_rtp::frame::rtcp_sender_frame *get_sender_packet(uint32_t ssrc);
kvz_rtp::frame::rtcp_receiver_frame *get_receiver_paket(uint32_t ssrc);
kvz_rtp::frame::rtcp_receiver_frame *get_receiver_packet(uint32_t ssrc);
kvz_rtp::frame::rtcp_sdes_frame *get_sdes_packet(uint32_t ssrc);
kvz_rtp::frame::rtcp_app_frame *get_app_packet(uint32_t ssrc);