diff --git a/docs/Doxyfile b/docs/Doxyfile index 19411f25..7c08c4f0 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -32,7 +32,6 @@ PROJECT_NAME = Sunshine # project specific settings DOT_GRAPH_MAX_NODES = 60 IMAGE_PATH = ../docs/images -INCLUDE_PATH = ../third-party/build-deps/ffmpeg/Linux-x86_64/include/ PREDEFINED += SUNSHINE_BUILD_WAYLAND PREDEFINED += SUNSHINE_TRAY=1 diff --git a/package.json b/package.json index 78d6994c..0775f146 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@lizardbyte/shared-web": "2024.921.191855", - "vue": "3.5.12", + "vue": "3.5.13", "vue-i18n": "9.14.0" }, "devDependencies": { diff --git a/packaging/linux/fedora/Sunshine.spec b/packaging/linux/fedora/Sunshine.spec index c19ddf78..ca08f480 100644 --- a/packaging/linux/fedora/Sunshine.spec +++ b/packaging/linux/fedora/Sunshine.spec @@ -95,14 +95,12 @@ fedora_version=%{fedora} cuda_supported_architectures=("x86_64" "aarch64") # set cuda_version based on Fedora version -# these are the same right now, but leave this structure to make it easier to set different versions -if [ "$fedora_version" == 39 ]; then - cuda_version="12.6.2" - cuda_build="560.35.03" -else - cuda_version="12.6.2" - cuda_build="560.35.03" -fi +case "$fedora_version" in + *) + cuda_version="12.6.3" + cuda_build="560.35.05" + ;; +esac # prepare CMAKE args cmake_args=( @@ -132,7 +130,7 @@ function install_cuda() { if [ "$fedora_version" -ge 40 ]; then # update environment variables for CUDA, necessary when using cuda-gcc-c++ - export NVCC_PREPEND_FLAGS='-ccbin /usr/bin/cuda' + export NVCC_PREPEND_FLAGS='-ccbin /usr/bin/g++-13' export PATH=/usr/bin/cuda:"%{_builddir}/cuda/bin:${PATH}" export LD_LIBRARY_PATH="%{_builddir}/cuda/lib64:${LD_LIBRARY_PATH}" fi @@ -169,6 +167,8 @@ export CXXFLAGS="" export FFLAGS="" export FCFLAGS="" export LDFLAGS="" +export CC=gcc-13 +export CXX=g++-13 if [ -n "$cuda_version" ] && [[ " ${cuda_supported_architectures[@]} " =~ " ${architecture} " ]]; then install_cuda diff --git a/src/config.cpp b/src/config.cpp index 28dce0c4..1ab4eb8d 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -60,7 +60,7 @@ namespace config { } // namespace nv namespace amd { -#ifndef _WIN32 +#if !defined(_WIN32) || defined(DOXYGEN) // values accurate as of 27/12/2022, but aren't strictly necessary for MacOS build #define AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_SPEED 100 #define AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_QUALITY 30 diff --git a/src/nvenc/nvenc_base.cpp b/src/nvenc/nvenc_base.cpp index b2fa8ad3..d9fbdcc0 100644 --- a/src/nvenc/nvenc_base.cpp +++ b/src/nvenc/nvenc_base.cpp @@ -321,14 +321,22 @@ namespace nvenc { set_ref_frames(format_config.maxNumRefFramesInDPB, format_config.numRefL0, 5); set_minqp_if_enabled(config.min_qp_hevc); fill_h264_hevc_vui(format_config.hevcVUIParameters); - - if (config.intra_refresh) { - format_config.enableIntraRefresh = 1; - format_config.singleSliceIntraRefresh = 1; - format_config.intraRefreshPeriod = 300; - format_config.intraRefreshCnt = 299; + if (client_config.enableIntraRefresh == 1 || config.intra_refresh) { + if (get_encoder_cap(NV_ENC_CAPS_SUPPORT_INTRA_REFRESH)) { + format_config.enableIntraRefresh = 1; + format_config.intraRefreshPeriod = 300; + format_config.intraRefreshCnt = 299; + if (get_encoder_cap(NV_ENC_CAPS_SINGLE_SLICE_INTRA_REFRESH)) { + format_config.singleSliceIntraRefresh = 1; + } + else { + BOOST_LOG(warning) << "NvEnc: Single Slice Intra Refresh not supported"; + } + } + else { + BOOST_LOG(error) << "NvEnc: Client asked for intra-refresh but the encoder does not support intra-refresh"; + } } - break; } diff --git a/src/nvhttp.cpp b/src/nvhttp.cpp index 9b01a3cc..d7507a1c 100644 --- a/src/nvhttp.cpp +++ b/src/nvhttp.cpp @@ -64,8 +64,8 @@ namespace nvhttp { class SunshineHTTPS: public SimpleWeb::HTTPS { public: - SunshineHTTPS(boost::asio::io_service &io_service, boost::asio::ssl::context &ctx): - SimpleWeb::HTTPS(io_service, ctx) {} + SunshineHTTPS(boost::asio::io_context &io_context, boost::asio::ssl::context &ctx): + SimpleWeb::HTTPS(io_context, ctx) {} virtual ~SunshineHTTPS() { // Gracefully shutdown the TLS connection diff --git a/src/rtsp.cpp b/src/rtsp.cpp index 69c16794..2ea2c967 100644 --- a/src/rtsp.cpp +++ b/src/rtsp.cpp @@ -92,8 +92,8 @@ namespace rtsp_stream { class socket_t: public std::enable_shared_from_this { public: - socket_t(boost::asio::io_service &ios, std::function &&handle_data_fn): - handle_data_fn { std::move(handle_data_fn) }, sock { ios } {} + socket_t(boost::asio::io_context &io_context, std::function &&handle_data_fn): + handle_data_fn { std::move(handle_data_fn) }, sock { io_context } {} /** * @brief Queue an asynchronous read to begin the next message. @@ -435,7 +435,7 @@ namespace rtsp_stream { return -1; } - next_socket = std::make_shared(ios, [this](tcp::socket &sock, launch_session_t &session, msg_t &&msg) { + next_socket = std::make_shared(io_context, [this](tcp::socket &sock, launch_session_t &session, msg_t &&msg) { handle_msg(sock, session, std::move(msg)); }); @@ -449,7 +449,7 @@ namespace rtsp_stream { template void iterate(std::chrono::duration timeout) { - ios.run_one_for(timeout); + io_context.run_one_for(timeout); } void @@ -494,7 +494,7 @@ namespace rtsp_stream { } // Queue another asynchronous accept for the next incoming connection - next_socket = std::make_shared(ios, [this](tcp::socket &sock, launch_session_t &session, msg_t &&msg) { + next_socket = std::make_shared(io_context, [this](tcp::socket &sock, launch_session_t &session, msg_t &&msg) { handle_msg(sock, session, std::move(msg)); }); acceptor.async_accept(next_socket->sock, [this](const auto &ec) { @@ -643,8 +643,8 @@ namespace rtsp_stream { std::chrono::steady_clock::time_point raised_timeout; - boost::asio::io_service ios; - tcp::acceptor acceptor { ios }; + boost::asio::io_context io_context; + tcp::acceptor acceptor { io_context }; std::shared_ptr next_socket; }; @@ -1011,6 +1011,7 @@ namespace rtsp_stream { args.try_emplace("x-ml-video.configuredBitrateKbps"sv, "0"sv); args.try_emplace("x-ss-general.encryptionEnabled"sv, "0"sv); args.try_emplace("x-ss-video[0].chromaSamplingType"sv, "0"sv); + args.try_emplace("x-ss-video[0].intraRefresh"sv, "0"sv); stream::config_t config; @@ -1047,6 +1048,7 @@ namespace rtsp_stream { config.monitor.videoFormat = util::from_view(args.at("x-nv-vqos[0].bitStreamFormat"sv)); config.monitor.dynamicRange = util::from_view(args.at("x-nv-video[0].dynamicRangeMode"sv)); config.monitor.chromaSamplingType = util::from_view(args.at("x-ss-video[0].chromaSamplingType"sv)); + config.monitor.enableIntraRefresh = util::from_view(args.at("x-ss-video[0].intraRefresh"sv)); configuredBitrateKbps = util::from_view(args.at("x-ml-video.configuredBitrateKbps"sv)); } diff --git a/src/stream.cpp b/src/stream.cpp index 0a2b6066..06466bac 100644 --- a/src/stream.cpp +++ b/src/stream.cpp @@ -331,10 +331,10 @@ namespace stream { std::thread audio_thread; std::thread control_thread; - asio::io_service io; + asio::io_context io_context; - udp::socket video_sock { io }; - udp::socket audio_sock { io }; + udp::socket video_sock { io_context }; + udp::socket audio_sock { io_context }; control_server_t control_server; }; @@ -1244,7 +1244,7 @@ namespace stream { auto &message_queue_queue = ctx.message_queue_queue; auto broadcast_shutdown_event = mail::man->event(mail::broadcast_shutdown); - auto &io = ctx.io; + auto &io = ctx.io_context; udp::endpoint peer; @@ -1838,7 +1838,7 @@ namespace stream { audio_packets->stop(); ctx.message_queue_queue->stop(); - ctx.io.stop(); + ctx.io_context.stop(); ctx.video_sock.close(); ctx.audio_sock.close(); diff --git a/src/video.h b/src/video.h index 1f397648..3e253cc2 100644 --- a/src/video.h +++ b/src/video.h @@ -38,6 +38,8 @@ namespace video { int dynamicRange; int chromaSamplingType; // 0 - 4:2:0, 1 - 4:4:4 + + int enableIntraRefresh; // 0 - disabled, 1 - enabled }; platf::mem_type_e diff --git a/src_assets/common/assets/web/index.html b/src_assets/common/assets/web/index.html index 905ebda9..1dc94d60 100644 --- a/src_assets/common/assets/web/index.html +++ b/src_assets/common/assets/web/index.html @@ -19,7 +19,7 @@
  • {{v.value}}
- View Logs + View Logs
diff --git a/src_assets/windows/assets/shaders/directx/include/base_vs.hlsl b/src_assets/windows/assets/shaders/directx/include/base_vs.hlsl index 1d12ddcc..7fd3e7b3 100644 --- a/src_assets/windows/assets/shaders/directx/include/base_vs.hlsl +++ b/src_assets/windows/assets/shaders/directx/include/base_vs.hlsl @@ -25,6 +25,7 @@ vertex_t generate_fullscreen_triangle_vertex(uint vertex_id, float2 subsample_of float2 rotation_center = { 0.5, 0.5 }; tex_coord = round(rotation_center + mul(rotation_matrix, tex_coord - rotation_center)); + // Swap the xy offset coordinates if the texture is rotated an odd number of times. if (rotate_texture_steps & 1) { subsample_offset.xy = subsample_offset.yx; }