mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
Compare commits
14 Commits
build/dock
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fad21cf671 | ||
|
|
849ad1c176 | ||
|
|
782b3827d7 | ||
|
|
e45b0b95fe | ||
|
|
ffccc1af9b | ||
|
|
41d9a58560 | ||
|
|
4f62944a7c | ||
|
|
3a88ddc639 | ||
|
|
ff0ed25e47 | ||
|
|
ac2fc48288 | ||
|
|
d777b72421 | ||
|
|
f99d3af0a1 | ||
|
|
265a00793c | ||
|
|
dbba364ed7 |
6
.github/workflows/CI.yml
vendored
6
.github/workflows/CI.yml
vendored
@@ -554,12 +554,16 @@ jobs:
|
||||
rm '/usr/local/bin/2to3-3.12'
|
||||
rm '/usr/local/bin/idle3'
|
||||
rm '/usr/local/bin/idle3.12'
|
||||
rm '/usr/local/bin/idle3.13'
|
||||
rm '/usr/local/bin/pydoc3'
|
||||
rm '/usr/local/bin/pydoc3.12'
|
||||
rm '/usr/local/bin/pydoc3.13'
|
||||
rm '/usr/local/bin/python3'
|
||||
rm '/usr/local/bin/python3-config'
|
||||
rm '/usr/local/bin/python3.12'
|
||||
rm '/usr/local/bin/python3.13'
|
||||
rm '/usr/local/bin/python3-config'
|
||||
rm '/usr/local/bin/python3.12-config'
|
||||
rm '/usr/local/bin/python3.13-config'
|
||||
brew install python
|
||||
|
||||
- name: Setup python
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
# artifacts: true
|
||||
# platforms: linux/amd64,linux/arm64/v8
|
||||
# platforms_pr: linux/amd64,linux/arm64/v8
|
||||
# platforms_pr: linux/amd64
|
||||
# no-cache-filters: sunshine-base,artifacts,sunshine
|
||||
ARG BASE=debian
|
||||
ARG TAG=bookworm
|
||||
FROM ${BASE}:${TAG} AS sunshine-base
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
ARG BASE
|
||||
ARG TAG
|
||||
FROM --platform=$BUILDPLATFORM ${BASE}:${TAG} AS sunshine-build
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
FROM sunshine-base AS sunshine-build
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
ARG BRANCH
|
||||
ARG BUILD_VERSION
|
||||
ARG COMMIT
|
||||
@@ -33,33 +30,8 @@ COPY --link .. .
|
||||
RUN <<_BUILD
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [[ "${BUILDPLATFORM}" != "${TARGETPLATFORM}" ]]; then
|
||||
cross_compile="--cross-compile"
|
||||
else
|
||||
cross_compile=""
|
||||
fi
|
||||
|
||||
case "${TARGETPLATFORM}" in
|
||||
linux/amd64)
|
||||
cc_target_tuple="x86_64-linux-gnu"
|
||||
cc_target_arch="amd64"
|
||||
;;
|
||||
linux/arm64)
|
||||
cc_target_tuple="aarch64-linux-gnu"
|
||||
cc_target_arch="arm64"
|
||||
;;
|
||||
*)
|
||||
echo "unsupported platform: ${TARGETPLATFORM}";
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
chmod +x ./scripts/linux_build.sh
|
||||
./scripts/linux_build.sh \
|
||||
${cross_compile} \
|
||||
--cc-target-tuple="${cc_target_tuple}" \
|
||||
--cc-target-arch="${cc_target_arch}" \
|
||||
--publisher-name='LizardByte' \
|
||||
--publisher-website='https://app.lizardbyte.dev' \
|
||||
--publisher-issue-url='https://app.lizardbyte.dev/support' \
|
||||
|
||||
@@ -974,7 +974,9 @@ editing the `conf` file in a text editor. Use the examples as reference.
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Default</td>
|
||||
<td colspan="2">@code{}verify_only@endcode</td>
|
||||
<td colspan="2">@code{}
|
||||
disabled
|
||||
@endcode</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Example</td>
|
||||
@@ -1314,6 +1316,29 @@ editing the `conf` file in a text editor. Use the examples as reference.
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### max_bitrate
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td colspan="2">
|
||||
The maximum bitrate (in Kbps) that Sunshine will encode the stream at. If set to 0, it will always use the bitrate requested by Moonlight.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Default</td>
|
||||
<td colspan="2">@code{}
|
||||
0
|
||||
@endcode</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Example</td>
|
||||
<td colspan="2">@code{}
|
||||
max_bitrate = 5000
|
||||
@endcode</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### min_fps_factor
|
||||
|
||||
<table>
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
"dependencies": {
|
||||
"@lizardbyte/shared-web": "2024.921.191855",
|
||||
"vue": "3.5.13",
|
||||
"vue-i18n": "11.0.1"
|
||||
"vue-i18n": "11.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "4.6.2",
|
||||
"serve": "14.2.3",
|
||||
"vite": "4.5.2",
|
||||
"vite": "4.5.9",
|
||||
"vite-plugin-ejs": "1.6.4"
|
||||
}
|
||||
}
|
||||
|
||||
Submodule packaging/linux/flatpak/deps/flatpak-builder-tools updated: a1eb29c5f3...aac65cf44c
Submodule packaging/linux/flatpak/deps/shared-modules updated: 26def5f1d2...802d804161
@@ -3,10 +3,6 @@ set -e
|
||||
|
||||
# Default value for arguments
|
||||
appimage_build=0
|
||||
cc_install_root="/mnt/cross"
|
||||
cc_target_tuple="$(uname -m)-linux-gnu"
|
||||
cc_target_arch="$(dpkg --print-architecture || rpm --eval '%{_host}')"
|
||||
cross_compile=0
|
||||
num_processors=$(nproc)
|
||||
publisher_name="Third Party Publisher"
|
||||
publisher_website=""
|
||||
@@ -32,10 +28,6 @@ Options:
|
||||
-h, --help Display this help message.
|
||||
-s, --sudo-off Disable sudo command.
|
||||
--appimage-build Compile for AppImage, this will not create the AppImage, just the executable.
|
||||
--cc-install-root The root directory to install the cross compiler. Default is /mnt/cross. (Fedora only)
|
||||
--cc-target-tuple The target tuple for the cross compiler.
|
||||
--cc-target-arch The target architecture for the cross compiler.
|
||||
--cross-compile Enable cross compilation.
|
||||
--num-processors The number of processors to use for compilation. Default is the value of 'nproc'.
|
||||
--publisher-name The name of the publisher (not developer) of the application.
|
||||
--publisher-website The URL of the publisher's website.
|
||||
@@ -63,16 +55,6 @@ while getopts ":hs-:" opt; do
|
||||
appimage_build=1
|
||||
skip_libva=1
|
||||
;;
|
||||
cc-install-root=*)
|
||||
cc_install_root="${OPTARG#*=}"
|
||||
;;
|
||||
cc-target-tuple=*)
|
||||
cc_target_tuple="${OPTARG#*=}"
|
||||
;;
|
||||
cc-target-arch=*)
|
||||
cc_target_arch="${OPTARG#*=}"
|
||||
;;
|
||||
cross-compile) cross_compile=1 ;;
|
||||
num-processors=*)
|
||||
num_processors="${OPTARG#*=}"
|
||||
;;
|
||||
@@ -115,28 +97,28 @@ function add_debain_based_deps() {
|
||||
"cmake"
|
||||
"doxygen"
|
||||
"flex" # required if we need to compile doxygen
|
||||
"gcc-${gcc_version}:${cc_target_arch}"
|
||||
"g++-${gcc_version}:${cc_target_arch}"
|
||||
"gcc-${gcc_version}"
|
||||
"g++-${gcc_version}"
|
||||
"git"
|
||||
"graphviz"
|
||||
"libcap-dev:${cc_target_arch}" # KMS
|
||||
"libcurl4-openssl-dev:${cc_target_arch}"
|
||||
"libdrm-dev:${cc_target_arch}" # KMS
|
||||
"libevdev-dev:${cc_target_arch}"
|
||||
"libminiupnpc-dev:${cc_target_arch}"
|
||||
"libnotify-dev:${cc_target_arch}"
|
||||
"libnuma-dev:${cc_target_arch}"
|
||||
"libopus-dev:${cc_target_arch}"
|
||||
"libpulse-dev:${cc_target_arch}"
|
||||
"libssl-dev:${cc_target_arch}"
|
||||
"libwayland-dev:${cc_target_arch}" # Wayland
|
||||
"libx11-dev:${cc_target_arch}" # X11
|
||||
"libxcb-shm0-dev:${cc_target_arch}" # X11
|
||||
"libxcb-xfixes0-dev:${cc_target_arch}" # X11
|
||||
"libxcb1-dev:${cc_target_arch}" # X11
|
||||
"libxfixes-dev:${cc_target_arch}" # X11
|
||||
"libxrandr-dev:${cc_target_arch}" # X11
|
||||
"libxtst-dev:${cc_target_arch}" # X11
|
||||
"libcap-dev" # KMS
|
||||
"libcurl4-openssl-dev"
|
||||
"libdrm-dev" # KMS
|
||||
"libevdev-dev"
|
||||
"libminiupnpc-dev"
|
||||
"libnotify-dev"
|
||||
"libnuma-dev"
|
||||
"libopus-dev"
|
||||
"libpulse-dev"
|
||||
"libssl-dev"
|
||||
"libwayland-dev" # Wayland
|
||||
"libx11-dev" # X11
|
||||
"libxcb-shm0-dev" # X11
|
||||
"libxcb-xfixes0-dev" # X11
|
||||
"libxcb1-dev" # X11
|
||||
"libxfixes-dev" # X11
|
||||
"libxrandr-dev" # X11
|
||||
"libxtst-dev" # X11
|
||||
"ninja-build"
|
||||
"npm" # web-ui
|
||||
"udev"
|
||||
@@ -146,13 +128,7 @@ function add_debain_based_deps() {
|
||||
|
||||
if [ "$skip_libva" == 0 ]; then
|
||||
dependencies+=(
|
||||
"libva-dev:${cc_target_arch}" # VA-API
|
||||
)
|
||||
fi
|
||||
|
||||
if [ "$cross_compile" == 1 ]; then
|
||||
dependencies+=(
|
||||
"crossbuild-essential-${cc_target_arch}"
|
||||
"libva-dev" # VA-API
|
||||
)
|
||||
fi
|
||||
}
|
||||
@@ -160,7 +136,7 @@ function add_debain_based_deps() {
|
||||
function add_debain_deps() {
|
||||
add_debain_based_deps
|
||||
dependencies+=(
|
||||
"libayatana-appindicator3-dev:${cc_target_arch}"
|
||||
"libayatana-appindicator3-dev"
|
||||
)
|
||||
}
|
||||
|
||||
@@ -172,7 +148,7 @@ function add_ubuntu_deps() {
|
||||
|
||||
add_debain_based_deps
|
||||
dependencies+=(
|
||||
"libappindicator3-dev:${cc_target_arch}"
|
||||
"libappindicator3-dev"
|
||||
)
|
||||
}
|
||||
|
||||
@@ -180,19 +156,10 @@ function add_fedora_deps() {
|
||||
dependencies+=(
|
||||
"cmake"
|
||||
"doxygen"
|
||||
"git"
|
||||
"graphviz"
|
||||
"ninja-build"
|
||||
"npm"
|
||||
"rpm-build" # if you want to build an RPM binary package
|
||||
"wget" # necessary for cuda install with `run` file
|
||||
"which" # necessary for cuda install with `run` file
|
||||
"xorg-x11-server-Xvfb" # necessary for headless unit testing
|
||||
)
|
||||
|
||||
arch_dependencies=(
|
||||
"gcc"
|
||||
"g++"
|
||||
"git"
|
||||
"graphviz"
|
||||
"libappindicator-gtk3-devel"
|
||||
"libcap-devel"
|
||||
"libcurl-devel"
|
||||
@@ -209,14 +176,20 @@ function add_fedora_deps() {
|
||||
"libXtst-devel" # X11
|
||||
"mesa-libGL-devel"
|
||||
"miniupnpc-devel"
|
||||
"ninja-build"
|
||||
"npm"
|
||||
"numactl-devel"
|
||||
"openssl-devel"
|
||||
"opus-devel"
|
||||
"pulseaudio-libs-devel"
|
||||
"rpm-build" # if you want to build an RPM binary package
|
||||
"wget" # necessary for cuda install with `run` file
|
||||
"which" # necessary for cuda install with `run` file
|
||||
"xorg-x11-server-Xvfb" # necessary for headless unit testing
|
||||
)
|
||||
|
||||
if [ "$skip_libva" == 0 ]; then
|
||||
arch_dependencies+=(
|
||||
dependencies+=(
|
||||
"libva-devel" # VA-API
|
||||
)
|
||||
fi
|
||||
@@ -231,15 +204,15 @@ function install_cuda() {
|
||||
|
||||
local cuda_prefix="https://developer.download.nvidia.com/compute/cuda/"
|
||||
local cuda_suffix=""
|
||||
if [ "$cc_target_arch" == "aarch64" ]; then
|
||||
if [ "$architecture" == "aarch64" ]; then
|
||||
local cuda_suffix="_sbsa"
|
||||
fi
|
||||
|
||||
if [ "$cc_target_arch" == "aarch64" ]; then
|
||||
if [ "$architecture" == "aarch64" ]; then
|
||||
# we need to patch the math-vector.h file for aarch64 fedora
|
||||
# back up /usr/include/bits/math-vector.h
|
||||
math_vector_file=""
|
||||
if [ "$distro" == "ubuntu" ] && [ "$version" == "24.04" ]; then
|
||||
if [ "$distro" == "ubuntu" ] || [ "$version" == "24.04" ]; then
|
||||
math_vector_file="/usr/include/aarch64-linux-gnu/bits/math-vector.h"
|
||||
elif [ "$distro" == "fedora" ]; then
|
||||
math_vector_file="/usr/include/bits/math-vector.h"
|
||||
@@ -310,11 +283,6 @@ function run_install() {
|
||||
"-DSUNSHINE_ENABLE_DRM=ON"
|
||||
)
|
||||
|
||||
if [ "$cross_compile" == 1 ]; then
|
||||
cmake_args+=("-DCMAKE_C_COMPILER=${cc_target_tuple}-gcc")
|
||||
cmake_args+=("-DCMAKE_CXX_COMPILER=${cc_target_tuple}-g++")
|
||||
fi
|
||||
|
||||
if [ "$appimage_build" == 1 ]; then
|
||||
cmake_args+=("-DSUNSHINE_BUILD_APPIMAGE=ON")
|
||||
fi
|
||||
@@ -345,11 +313,6 @@ function run_install() {
|
||||
# Install the dependencies
|
||||
$package_install_command "${dependencies[@]}"
|
||||
|
||||
# Fedora has a special command for installing architecture specific packages
|
||||
if [ "$distro" == "fedora" ]; then
|
||||
$package_install_command_arch "${arch_dependencies[@]}"
|
||||
fi
|
||||
|
||||
# reload the environment
|
||||
# shellcheck source=/dev/null
|
||||
source ~/.bashrc
|
||||
@@ -485,11 +448,6 @@ elif grep -q "PLATFORM_ID=\"platform:f39\"" /etc/os-release; then
|
||||
version="39"
|
||||
package_update_command="${sudo_cmd} dnf update -y"
|
||||
package_install_command="${sudo_cmd} dnf install -y"
|
||||
if [ "$cross_compile" == 0 ]; then
|
||||
package_install_command_arch="${sudo_cmd} dnf -y --releasever=39 --forcearch=${cc_target_arch} install"
|
||||
else
|
||||
package_install_command_arch="${sudo_cmd} dnf -y --installroot=${cc_install_root} --releasever=39 --forcearch=${cc_target_arch} install"
|
||||
fi
|
||||
cuda_version="12.4.0"
|
||||
cuda_build="550.54.14"
|
||||
gcc_version="13"
|
||||
@@ -499,11 +457,6 @@ elif grep -q "PLATFORM_ID=\"platform:f40\"" /etc/os-release; then
|
||||
version="40"
|
||||
package_update_command="${sudo_cmd} dnf update -y"
|
||||
package_install_command="${sudo_cmd} dnf install -y"
|
||||
if [ "$cross_compile" == 0 ]; then
|
||||
package_install_command_arch="${sudo_cmd} dnf -y --releasever=39 --forcearch=${cc_target_arch} install"
|
||||
else
|
||||
package_install_command_arch="${sudo_cmd} dnf -y --installroot=${cc_install_root} --releasever=39 --forcearch=${cc_target_arch} install"
|
||||
fi
|
||||
cuda_version=
|
||||
cuda_build=
|
||||
gcc_version="13"
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Babel==2.16.0
|
||||
Babel==2.17.0
|
||||
clang-format
|
||||
|
||||
@@ -497,7 +497,7 @@ namespace config {
|
||||
{}, // output_name
|
||||
|
||||
{
|
||||
video_t::dd_t::config_option_e::verify_only, // configuration_option
|
||||
video_t::dd_t::config_option_e::disabled, // configuration_option
|
||||
video_t::dd_t::resolution_option_e::automatic, // resolution_option
|
||||
{}, // manual_resolution
|
||||
video_t::dd_t::refresh_rate_option_e::automatic, // refresh_rate_option
|
||||
@@ -509,7 +509,8 @@ namespace config {
|
||||
{} // wa
|
||||
}, // display_device
|
||||
|
||||
1 // min_fps_factor
|
||||
1, // min_fps_factor
|
||||
0 // max_bitrate
|
||||
};
|
||||
|
||||
audio_t audio {
|
||||
@@ -1138,6 +1139,7 @@ namespace config {
|
||||
bool_f(vars, "dd_wa_hdr_toggle", video.dd.wa.hdr_toggle);
|
||||
|
||||
int_between_f(vars, "min_fps_factor", video.min_fps_factor, {1, 3});
|
||||
int_f(vars, "max_bitrate", video.max_bitrate);
|
||||
|
||||
path_f(vars, "pkey", nvhttp.pkey);
|
||||
path_f(vars, "cert", nvhttp.cert);
|
||||
|
||||
@@ -138,6 +138,7 @@ namespace config {
|
||||
} dd;
|
||||
|
||||
int min_fps_factor; // Minimum fps target, determines minimum frame time
|
||||
int max_bitrate; // Maximum bitrate, sets ceiling in kbps for bitrate requested from client
|
||||
};
|
||||
|
||||
struct audio_t {
|
||||
|
||||
@@ -528,7 +528,7 @@ namespace nvenc {
|
||||
|
||||
NV_ENC_LOCK_BITSTREAM lock_bitstream = {min_struct_version(NV_ENC_LOCK_BITSTREAM_VER, 1, 2)};
|
||||
lock_bitstream.outputBitstream = output_bitstream;
|
||||
lock_bitstream.doNotWait = 0;
|
||||
lock_bitstream.doNotWait = async_event_handle ? 1 : 0;
|
||||
|
||||
if (async_event_handle && !wait_for_async_event(100)) {
|
||||
BOOST_LOG(error) << "NvEnc: frame " << frame_index << " encode wait timeout";
|
||||
|
||||
@@ -10,11 +10,19 @@
|
||||
|
||||
namespace nvenc {
|
||||
|
||||
nvenc_d3d11::nvenc_d3d11(NV_ENC_DEVICE_TYPE device_type):
|
||||
nvenc_base(device_type) {
|
||||
async_event_handle = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
}
|
||||
|
||||
nvenc_d3d11::~nvenc_d3d11() {
|
||||
if (dll) {
|
||||
FreeLibrary(dll);
|
||||
dll = NULL;
|
||||
}
|
||||
if (async_event_handle) {
|
||||
CloseHandle(async_event_handle);
|
||||
}
|
||||
}
|
||||
|
||||
bool nvenc_d3d11::init_library() {
|
||||
@@ -53,5 +61,9 @@ namespace nvenc {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool nvenc_d3d11::wait_for_async_event(uint32_t timeout_ms) {
|
||||
return WaitForSingleObject(async_event_handle, timeout_ms) == WAIT_OBJECT_0;
|
||||
}
|
||||
|
||||
} // namespace nvenc
|
||||
#endif
|
||||
|
||||
@@ -25,10 +25,7 @@ namespace nvenc {
|
||||
*/
|
||||
class nvenc_d3d11: public nvenc_base {
|
||||
public:
|
||||
explicit nvenc_d3d11(NV_ENC_DEVICE_TYPE device_type):
|
||||
nvenc_base(device_type) {
|
||||
}
|
||||
|
||||
explicit nvenc_d3d11(NV_ENC_DEVICE_TYPE device_type);
|
||||
~nvenc_d3d11();
|
||||
|
||||
/**
|
||||
@@ -39,6 +36,7 @@ namespace nvenc {
|
||||
|
||||
protected:
|
||||
bool init_library() override;
|
||||
bool wait_for_async_event(uint32_t timeout_ms) override;
|
||||
|
||||
private:
|
||||
HMODULE dll = NULL;
|
||||
|
||||
@@ -299,6 +299,7 @@ namespace video {
|
||||
REF_FRAMES_INVALIDATION = 1 << 8, ///< Support reference frames invalidation
|
||||
ALWAYS_REPROBE = 1 << 9, ///< This is an encoder of last resort and we want to aggressively probe for a better one
|
||||
YUV444_SUPPORT = 1 << 10, ///< Encoder may support 4:4:4 chroma sampling depending on hardware
|
||||
ASYNC_TEARDOWN = 1 << 11, ///< Encoder supports async teardown on a different thread
|
||||
};
|
||||
|
||||
class avcodec_encode_session_t: public encode_session_t {
|
||||
@@ -503,7 +504,7 @@ namespace video {
|
||||
{}, // Fallback options
|
||||
"h264_nvenc"s,
|
||||
},
|
||||
PARALLEL_ENCODING | REF_FRAMES_INVALIDATION | YUV444_SUPPORT // flags
|
||||
PARALLEL_ENCODING | REF_FRAMES_INVALIDATION | YUV444_SUPPORT | ASYNC_TEARDOWN // flags
|
||||
};
|
||||
#elif !defined(__APPLE__)
|
||||
encoder_t nvenc {
|
||||
@@ -1686,7 +1687,8 @@ namespace video {
|
||||
}
|
||||
}
|
||||
|
||||
auto bitrate = config.bitrate * 1000;
|
||||
auto bitrate = ((config::video.max_bitrate > 0) ? std::min(config.bitrate, config::video.max_bitrate) : config.bitrate) * 1000;
|
||||
BOOST_LOG(info) << "Streaming bitrate is " << bitrate;
|
||||
ctx->rc_max_rate = bitrate;
|
||||
ctx->bit_rate = bitrate;
|
||||
|
||||
@@ -1856,6 +1858,23 @@ namespace video {
|
||||
return;
|
||||
}
|
||||
|
||||
// As a workaround for NVENC hangs and to generally speed up encoder reinit,
|
||||
// we will complete the encoder teardown in a separate thread if supported.
|
||||
// This will move expensive processing off the encoder thread to allow us
|
||||
// to restart encoding as soon as possible. For cases where the NVENC driver
|
||||
// hang occurs, this thread may probably never exit, but it will allow
|
||||
// streaming to continue without requiring a full restart of Sunshine.
|
||||
auto fail_guard = util::fail_guard([&encoder, &session] {
|
||||
if (encoder.flags & ASYNC_TEARDOWN) {
|
||||
std::thread encoder_teardown_thread {[session = std::move(session)]() mutable {
|
||||
BOOST_LOG(info) << "Starting async encoder teardown";
|
||||
session.reset();
|
||||
BOOST_LOG(info) << "Async encoder teardown complete";
|
||||
}};
|
||||
encoder_teardown_thread.detach();
|
||||
}
|
||||
});
|
||||
|
||||
// set minimum frame time, avoiding violation of client-requested target framerate
|
||||
auto minimum_frame_time = std::chrono::milliseconds(1000 / std::min(config.framerate, (config::video.min_fps_factor * 10)));
|
||||
BOOST_LOG(debug) << "Minimum frame time set to "sv << minimum_frame_time.count() << "ms, based on min fps factor of "sv << config::video.min_fps_factor << "."sv;
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
"install_steam_audio_drivers": "enabled",
|
||||
"adapter_name": "",
|
||||
"output_name": "",
|
||||
"dd_configuration_option": "verify_only",
|
||||
"dd_configuration_option": "disabled",
|
||||
"dd_resolution_option": "auto",
|
||||
"dd_manual_resolution": "",
|
||||
"dd_refresh_rate_option": "auto",
|
||||
@@ -179,6 +179,7 @@
|
||||
"dd_mode_remapping": {"mixed": [], "resolution_only": [], "refresh_rate_only": []},
|
||||
"dd_wa_hdr_toggle": "disabled",
|
||||
"min_fps_factor": 1,
|
||||
"max_bitrate": 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -68,7 +68,7 @@ function addRemappingEntry() {
|
||||
{{ $t('config.dd_config_label') }}
|
||||
</label>
|
||||
<select id="dd_configuration_option" class="form-select" v-model="config.dd_configuration_option">
|
||||
<option value="disabled">{{ $t('_common.disabled') }}</option>
|
||||
<option value="disabled">{{ $t('_common.disabled_def') }}</option>
|
||||
<option value="verify_only">{{ $t('config.dd_config_verify_only') }}</option>
|
||||
<option value="ensure_active">{{ $t('config.dd_config_ensure_active') }}</option>
|
||||
<option value="ensure_primary">{{ $t('config.dd_config_ensure_primary') }}</option>
|
||||
|
||||
@@ -17,6 +17,13 @@ const config = ref(props.config)
|
||||
<input type="number" min="1" max="3" class="form-control" id="min_fps_factor" placeholder="1" v-model="config.min_fps_factor" />
|
||||
<div class="form-text">{{ $t('config.min_fps_factor_desc') }}</div>
|
||||
</div>
|
||||
|
||||
<!--max_bitrate-->
|
||||
<div class="mb-3">
|
||||
<label for="max_bitrate" class="form-label">{{ $t("config.max_bitrate") }}</label>
|
||||
<input type="number" class="form-control" id="max_bitrate" placeholder="0" v-model="config.max_bitrate" />
|
||||
<div class="form-text">{{ $t("config.max_bitrate_desc") }}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
"dd_config_revert_delay_desc": "Additional delay in milliseconds to wait before reverting configuration when the app has been closed or the last session terminated. Main purpose is to provide a smoother transition when quickly switching between apps.",
|
||||
"dd_config_revert_on_disconnect": "Config revert on disconnect",
|
||||
"dd_config_revert_on_disconnect_desc": "Revert configuration upon disconnect of all clients instead of app close or last session termination.",
|
||||
"dd_config_verify_only": "Verify that the display is enabled (default)",
|
||||
"dd_config_verify_only": "Verify that the display is enabled",
|
||||
"dd_hdr_option": "HDR",
|
||||
"dd_hdr_option_auto": "Switch on/off the HDR mode as requested by the client (default)",
|
||||
"dd_hdr_option_disabled": "Do not change HDR settings",
|
||||
@@ -252,6 +252,8 @@
|
||||
"log_level_desc": "The minimum log level printed to standard out",
|
||||
"log_path": "Logfile Path",
|
||||
"log_path_desc": "The file where the current logs of Sunshine are stored.",
|
||||
"max_bitrate": "Maximum Bitrate",
|
||||
"max_bitrate_desc": "The maximum bitrate (in Kbps) that Sunshine will encode the stream at. If set to 0, it will always use the bitrate requested by Moonlight.",
|
||||
"min_fps_factor": "Minimum FPS Factor",
|
||||
"min_fps_factor_desc": "Sunshine will use this factor to calculate the minimum time between frames. Increasing this value slightly may help when streaming mostly static content. Higher values will consume more bandwidth.",
|
||||
"min_threads": "Minimum CPU Thread Count",
|
||||
|
||||
2
third-party/googletest
vendored
2
third-party/googletest
vendored
Submodule third-party/googletest updated: b514bdc898...6910c9d916
2
third-party/inputtino
vendored
2
third-party/inputtino
vendored
Submodule third-party/inputtino updated: 8065aeb46e...311fd2deea
2
third-party/libdisplaydevice
vendored
2
third-party/libdisplaydevice
vendored
Submodule third-party/libdisplaydevice updated: 53a0ea5317...591387c584
2
third-party/nvapi-open-source-sdk
vendored
2
third-party/nvapi-open-source-sdk
vendored
Submodule third-party/nvapi-open-source-sdk updated: cce4e90b62...c873858214
Reference in New Issue
Block a user