From 8e519cedaeb5e944e21a2d59a36af49ee840fa6f Mon Sep 17 00:00:00 2001 From: winlin Date: Wed, 3 Jun 2020 09:16:11 +0800 Subject: [PATCH] RTSP: Show engine and alloc ports --- trunk/src/app/srs_app_rtsp.cpp | 5 +++-- trunk/src/app/srs_app_rtsp.hpp | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/trunk/src/app/srs_app_rtsp.cpp b/trunk/src/app/srs_app_rtsp.cpp index ed2638b47..d4764b259 100644 --- a/trunk/src/app/srs_app_rtsp.cpp +++ b/trunk/src/app/srs_app_rtsp.cpp @@ -697,6 +697,7 @@ void SrsRtspConn::close() SrsRtspCaster::SrsRtspCaster(SrsConfDirective* c) { // TODO: FIXME: support reload. + engine = _srs_config->get_stream_caster_engine(c); output = _srs_config->get_stream_caster_output(c); local_port_min = _srs_config->get_stream_caster_rtp_port_min(c); local_port_max = _srs_config->get_stream_caster_rtp_port_max(c); @@ -738,7 +739,7 @@ srs_error_t SrsRtspCaster::alloc_port(int* pport) break; } } - srs_info("rtsp: alloc port=%d-%d", *pport, *pport + 1); + srs_trace("rtsp: %s alloc port=%d-%d", engine.c_str(), *pport, *pport + 1); return err; } @@ -748,7 +749,7 @@ void SrsRtspCaster::free_port(int lpmin, int lpmax) for (int i = lpmin; i < lpmax; i++) { used_ports[i] = false; } - srs_trace("rtsp: free rtp port=%d-%d", lpmin, lpmax); + srs_trace("rtsp: %s free rtp port=%d-%d", engine.c_str(), lpmin, lpmax); } srs_error_t SrsRtspCaster::on_tcp_client(srs_netfd_t stfd) diff --git a/trunk/src/app/srs_app_rtsp.hpp b/trunk/src/app/srs_app_rtsp.hpp index 0ca748535..6fac84dae 100644 --- a/trunk/src/app/srs_app_rtsp.hpp +++ b/trunk/src/app/srs_app_rtsp.hpp @@ -173,6 +173,7 @@ private: class SrsRtspCaster : public ISrsTcpHandler { private: + std::string engine; std::string output; int local_port_min; int local_port_max;