diff --git a/include/uvgrtp/rtcp.hh b/include/uvgrtp/rtcp.hh index d2f800e..6025c02 100644 --- a/include/uvgrtp/rtcp.hh +++ b/include/uvgrtp/rtcp.hh @@ -415,9 +415,8 @@ namespace uvgrtp { void set_socket(std::shared_ptr 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); diff --git a/src/media_stream.cc b/src/media_stream.cc index 3f23e4c..41a657c 100644 --- a/src/media_stream.cc +++ b/src/media_stream.cc @@ -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) { diff --git a/src/rtcp.cc b/src/rtcp.cc index 1c2030c..fda6ccf 100644 --- a/src/rtcp.cc +++ b/src/rtcp.cc @@ -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;