From c2b6b6a6dcba0de83e8a76aa81ee70c7821f26ce Mon Sep 17 00:00:00 2001 From: pigeatgarlic Date: Mon, 19 Feb 2024 21:17:20 +0700 Subject: [PATCH] remove launch session raise --- src/main.cpp | 14 -------------- src/rtsp.cpp | 14 ++++---------- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 0cc1b23d..d9ad4118 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -743,20 +743,6 @@ main(int argc, char *argv[]) { - rtsp_stream::launch_session_raise(rtsp_stream::launch_session_t{ - util::from_hex("", true), - util::from_hex("", true), - true, - "unique_id", - 1920, - 1080, - 60, - 0, - 0, - 0, - false, - true - }); rtsp_stream::rtpThread(); diff --git a/src/rtsp.cpp b/src/rtsp.cpp index 5a12253d..27065d0e 100644 --- a/src/rtsp.cpp +++ b/src/rtsp.cpp @@ -598,14 +598,6 @@ namespace rtsp_stream { auto seqn_str = std::to_string(req->sequenceNumber); option.content = const_cast(seqn_str.c_str()); - if (!server->launch_event.peek()) { - // /launch has not been used - - respond(sock, &option, 503, "Service Unavailable", req->sequenceNumber, {}); - return; - } - auto launch_session { server->launch_event.pop() }; - std::string_view payload { req->payload, (size_t) req->payloadLength }; std::vector lines; @@ -661,7 +653,7 @@ namespace rtsp_stream { stream::config_t config; - config.audio.flags[audio::config_t::HOST_AUDIO] = launch_session->host_audio; + config.audio.flags[audio::config_t::HOST_AUDIO] = true; try { config.audio.channels = util::from_view(args.at("x-nv-audio.surround.numChannels"sv)); config.audio.mask = util::from_view(args.at("x-nv-audio.surround.channelMask"sv)); @@ -719,7 +711,9 @@ namespace rtsp_stream { return; } - auto session = stream::session::alloc(config, launch_session->gcm_key, launch_session->iv); + auto a = util::from_hex("", true); + auto b = util::from_hex("", true); + auto session = stream::session::alloc(config, a,b); auto slot = server->accept(session); if (!slot) {