From 68740944db78ac5a71d395e4b31c45cdfe4b456a Mon Sep 17 00:00:00 2001 From: pigeatgarlic Date: Tue, 20 Feb 2024 09:38:51 +0700 Subject: [PATCH] remove rtsp session --- src/nvhttp.cpp | 4 ---- src/rtsp.cpp | 16 ++-------------- src/rtsp.h | 5 ----- src/stream.cpp | 5 ----- 4 files changed, 2 insertions(+), 28 deletions(-) diff --git a/src/nvhttp.cpp b/src/nvhttp.cpp index 5bde7b07..813b8feb 100644 --- a/src/nvhttp.cpp +++ b/src/nvhttp.cpp @@ -789,8 +789,6 @@ namespace nvhttp { } } - rtsp_stream::launch_session_raise(launch_session); - tree.put("root..status_code", 200); tree.put("root.sessionUrl0", "rtsp://"s + net::addr_to_url_escaped_string(request->local_endpoint().address()) + ':' + std::to_string(map_port(rtsp_stream::RTSP_SETUP_PORT))); tree.put("root.gamesession", 1); @@ -860,8 +858,6 @@ namespace nvhttp { } } - rtsp_stream::launch_session_raise(make_launch_session(host_audio, args)); - tree.put("root..status_code", 200); tree.put("root.sessionUrl0", "rtsp://"s + net::addr_to_url_escaped_string(request->local_endpoint().address()) + ':' + std::to_string(map_port(rtsp_stream::RTSP_SETUP_PORT))); tree.put("root.resume", 1); diff --git a/src/rtsp.cpp b/src/rtsp.cpp index 27065d0e..aded3533 100644 --- a/src/rtsp.cpp +++ b/src/rtsp.cpp @@ -395,18 +395,6 @@ namespace rtsp_stream { rtsp_server_t server {}; - void - launch_session_raise(rtsp_stream::launch_session_t launch_session) { - server.session_raise(launch_session); - } - - int - session_count() { - // Ensure session_count is up-to-date - server.clear(false); - - return server.session_count(); - } int send(tcp::socket &sock, const std::string_view &sv) { @@ -711,8 +699,8 @@ namespace rtsp_stream { return; } - auto a = util::from_hex("", true); - auto b = util::from_hex("", true); + auto a = util::from_hex("0", true); + auto b = util::from_hex("0", true); auto session = stream::session::alloc(config, a,b); auto slot = server->accept(session); diff --git a/src/rtsp.h b/src/rtsp.h index 4d426070..79044ae7 100644 --- a/src/rtsp.h +++ b/src/rtsp.h @@ -28,11 +28,6 @@ namespace rtsp_stream { bool enable_sops; }; - void - launch_session_raise(launch_session_t launch_session); - int - session_count(); - void rtpThread(); diff --git a/src/stream.cpp b/src/stream.cpp index c212b255..9aa432d1 100644 --- a/src/stream.cpp +++ b/src/stream.cpp @@ -987,11 +987,6 @@ namespace stream { } // Don't break until any pending sessions either expire or connect - if (proc::proc.running() == 0 && !has_session_awaiting_peer) { - BOOST_LOG(info) << "Process terminated"sv; - break; - } - server->iterate(150ms); }