multiplex: Fix compiler warnings
This commit is contained in:
parent
d2d29685b7
commit
7cbf304d3a
|
@ -336,7 +336,7 @@ rtp_error_t uvgrtp::reception_flow::new_install_getter(std::shared_ptr<std::atom
|
|||
|
||||
rtp_error_t uvgrtp::reception_flow::new_remove_handlers(std::shared_ptr<std::atomic<std::uint32_t>> remote_ssrc)
|
||||
{
|
||||
int removed = packet_handlers_.erase(remote_ssrc);
|
||||
size_t removed = packet_handlers_.erase(remote_ssrc);
|
||||
if (removed == 1) {
|
||||
return RTP_OK;
|
||||
}
|
||||
|
@ -515,8 +515,6 @@ void uvgrtp::reception_flow::process_packet(int rce_flags)
|
|||
|
||||
if (ring_buffer_[ring_read_index_].read > 0)
|
||||
{
|
||||
rtp_error_t ret = RTP_OK;
|
||||
|
||||
/* When processing a packet, the following checks are done
|
||||
* 1. Check the SSRC of the packets. This field is in the same place for RTP, RTCP and ZRTP. (+ SRTP/SRTCP)
|
||||
* 2. If there is no SSRC match, this is a user packet.
|
||||
|
@ -555,10 +553,10 @@ void uvgrtp::reception_flow::process_packet(int rce_flags)
|
|||
//
|
||||
// TODO: User packet hook
|
||||
UVG_LOG_DEBUG("Unidentified (user?) packet received");
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
// Handler set is found
|
||||
handler_new* handlers = &p.second;
|
||||
handler* handlers = &p.second;
|
||||
/* -------------------- Protocol checks -------------------- */
|
||||
/* Checks in the following order:
|
||||
* 1. If RCE_RTCP_MUX && packet type is 200 - 204 -> RTCP packet (or SRTCP)
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace uvgrtp {
|
|||
std::function<rtp_error_t(void*, int, uint8_t*, size_t, frame::rtp_frame** out)> handler;
|
||||
void* args = nullptr;
|
||||
};
|
||||
struct handler_new {
|
||||
struct handler {
|
||||
packet_handler rtp;
|
||||
packet_handler rtcp;
|
||||
packet_handler zrtp;
|
||||
|
@ -66,7 +66,7 @@ namespace uvgrtp {
|
|||
* When processing packets, reception flow looks at the source SSRC in the packet header
|
||||
* and sends it to the handlers that want to receive from this remote source.
|
||||
* Various checks are done on the packet, and the packet is determined to be either a
|
||||
* 1. RTCP packet
|
||||
* 1. RTCP packet (if RCE_RTCP_MUX is enabled, otherwise RTCP uses its own socket)
|
||||
* 2. ZRTP packet
|
||||
* 3. SRTP packet
|
||||
* 4. RTP packet
|
||||
|
@ -206,7 +206,7 @@ namespace uvgrtp {
|
|||
//void (*user_hook_)(void* arg, uint8_t* payload);
|
||||
|
||||
// Map different types of handlers by remote SSRC
|
||||
std::map<std::shared_ptr<std::atomic<std::uint32_t>>, handler_new> packet_handlers_;
|
||||
std::map<std::shared_ptr<std::atomic<std::uint32_t>>, handler> packet_handlers_;
|
||||
|
||||
std::vector<Buffer> ring_buffer_;
|
||||
std::mutex ring_mutex_;
|
||||
|
|
|
@ -1033,12 +1033,17 @@ void uvgrtp::rtcp::update_session_statistics(const uvgrtp::frame::rtp_frame *fra
|
|||
|
||||
rtp_error_t uvgrtp::rtcp::new_recv_packet_handler(void* args, int rce_flags, uint8_t* read_ptr, size_t size, frame::rtp_frame** out)
|
||||
{
|
||||
UVG_LOG_INFO("RTCP packet handled from %u", remote_ssrc_.get()->load());
|
||||
//UVG_LOG_DEBUG("RTCP packet handled from %u", remote_ssrc_.get()->load());
|
||||
(void)args;
|
||||
(void)rce_flags;
|
||||
(void)out;
|
||||
return handle_incoming_packet(read_ptr, size);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue