From 0a637b2272611c8354e0147f380a7154b92051b5 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 3 Jul 2021 23:38:45 -0500 Subject: [PATCH] Parse additional SDP options --- sunshine/rtsp.cpp | 8 +++++++- sunshine/stream.h | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sunshine/rtsp.cpp b/sunshine/rtsp.cpp index 8dc7dde9..85825973 100644 --- a/sunshine/rtsp.cpp +++ b/sunshine/rtsp.cpp @@ -441,6 +441,9 @@ void cmd_announce(rtsp_server_t *server, net::peer_t peer, msg_t &&req) { args.try_emplace("x-nv-vqos[0].bitStreamFormat"sv, "0"sv); args.try_emplace("x-nv-video[0].dynamicRangeMode"sv, "0"sv); args.try_emplace("x-nv-aqos.packetDuration"sv, "5"sv); + args.try_emplace("x-nv-general.useReliableUdp"sv, "1"sv); + args.try_emplace("x-nv-vqos[0].fec.minRequiredFecPackets"sv, "0"sv); + args.try_emplace("x-nv-general.featureFlags"sv, "135"sv); config_t config; @@ -453,7 +456,10 @@ void cmd_announce(rtsp_server_t *server, net::peer_t peer, msg_t &&req) { config.audio.flags[audio::config_t::HIGH_QUALITY] = util::from_view(args.at("x-nv-audio.surround.AudioQuality"sv)); - config.packetsize = util::from_view(args.at("x-nv-video[0].packetSize"sv)); + config.controlProtocolType = util::from_view(args.at("x-nv-general.useReliableUdp"sv)); + config.packetsize = util::from_view(args.at("x-nv-video[0].packetSize"sv)); + config.minRequiredFecPackets = util::from_view(args.at("x-nv-vqos[0].fec.minRequiredFecPackets"sv)); + config.featureFlags = util::from_view(args.at("x-nv-general.featureFlags"sv)); config.monitor.height = util::from_view(args.at("x-nv-video[0].clientViewportHt"sv)); config.monitor.width = util::from_view(args.at("x-nv-video[0].clientViewportWd"sv)); diff --git a/sunshine/stream.h b/sunshine/stream.h index 226929a6..b1e17b0f 100644 --- a/sunshine/stream.h +++ b/sunshine/stream.h @@ -20,7 +20,11 @@ struct session_t; struct config_t { audio::config_t audio; video::config_t monitor; + int packetsize; + int minRequiredFecPackets; + int featureFlags; + int controlProtocolType; std::optional gcmap; };