multiplex: Remove another unnecessary helper function from RTCP

This commit is contained in:
Heikki Tampio 2023-07-24 12:58:57 +03:00
parent 3adc6d41d6
commit dbe4287076
3 changed files with 6 additions and 13 deletions

View File

@ -415,9 +415,8 @@ namespace uvgrtp {
void set_socket(std::shared_ptr<uvgrtp::socket> socket);
/* Update RTCP-related receiver statistics */
static rtp_error_t recv_packet_handler(void *arg, int rce_flags, frame::rtp_frame **out);
rtp_error_t new_recv_packet_handler_common(void* args, int rce_flags, uint8_t* read_ptr, size_t size, frame::rtp_frame** out);
/* Update RTCP-related receiver statistics from RTP packets */
rtp_error_t recv_packet_handler_common(void *arg, int rce_flags, uint8_t* read_ptr, size_t size, frame::rtp_frame **out);
/* Update RTCP-related sender statistics */
static rtp_error_t send_packet_handler_vec(void *arg, uvgrtp::buf_vec& buffers);

View File

@ -302,7 +302,7 @@ rtp_error_t uvgrtp::media_stream::install_packet_handlers()
if (rce_flags_ & RCE_RTCP) {
reception_flow_->install_handler(
6, remote_ssrc_,
std::bind(&uvgrtp::rtcp::new_recv_packet_handler_common, rtcp_, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3,
std::bind(&uvgrtp::rtcp::recv_packet_handler_common, rtcp_, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3,
std::placeholders::_4, std::placeholders::_5), rtcp_.get());
}
if (rce_flags_ & RCE_RTCP_MUX) {

View File

@ -1033,13 +1033,6 @@ void uvgrtp::rtcp::update_session_statistics(const uvgrtp::frame::rtp_frame *fra
((double)trans_difference - participants_[frame->header.ssrc]->stats.jitter);
}
rtp_error_t uvgrtp::rtcp::new_recv_packet_handler_common(void* args, int rce_flags, uint8_t* read_ptr, size_t size, frame::rtp_frame** out)
{
(void)size;
(void)read_ptr;
return recv_packet_handler(args, rce_flags, out);
}
/* RTCP packet handler is responsible for doing two things:
*
* - it checks whether the packet is coming from an existing user and if so,
@ -1048,10 +1041,11 @@ rtp_error_t uvgrtp::rtcp::new_recv_packet_handler_common(void* args, int rce_fla
* have been received.
* - it keeps track of participants' SSRCs and if a collision
* is detected, the RTP context is updated */
rtp_error_t uvgrtp::rtcp::recv_packet_handler(void *arg, int rce_flags, frame::rtp_frame **out)
rtp_error_t uvgrtp::rtcp::recv_packet_handler_common(void *arg, int rce_flags, uint8_t* read_ptr, size_t size, frame::rtp_frame **out)
{
(void)rce_flags;
(void)size;
(void)read_ptr;
// The validity of the header has been checked by previous handlers
uvgrtp::frame::rtp_frame *frame = *out;