|
Sunshine latest
Self-hosted game stream host for Moonlight.
|
Declarations for the configuration of Sunshine. More...
#include <bitset>#include <chrono>#include <optional>#include <string>#include <string_view>#include <unordered_map>#include <vector>#include "nvenc/nvenc_config.h"Go to the source code of this file.
Classes | |
| struct | config::audio_t |
| Audio capture and encoder settings loaded from configuration. More... | |
| struct | config::sunshine_t::cmd_t |
| Command-line options parsed before configuration loading. More... | |
| struct | config::video_t::dd_t |
| Display-device integration settings. More... | |
| struct | config::input_t |
| Input emulation settings loaded from configuration. More... | |
| struct | config::video_t::dd_t::mode_remapping_entry_t |
| Single display mode remapping rule from configuration. More... | |
| struct | config::video_t::dd_t::mode_remapping_t |
| Collection of display mode remapping rules. More... | |
| struct | config::nvhttp_t |
| HTTP and HTTPS settings used by the GameStream pairing server. More... | |
| struct | config::prep_cmd_t |
| External preparation command plus its privilege requirement. More... | |
| struct | config::stream_t |
| Network stream settings shared by audio, video, and control channels. More... | |
| struct | config::sunshine_t |
| Top-level Sunshine configuration and credential state. More... | |
| struct | config::video_t |
| Video encoder, capture, and color settings loaded from configuration. More... | |
| struct | config::video_t::dd_t::workarounds_t |
| Compatibility workarounds for display-device control. More... | |
Enumerations | |
| enum | config::flag::flag_e : std::size_t { config::flag::PIN_STDIN = 0 , config::flag::FRESH_STATE , config::flag::FORCE_VIDEO_HEADER_REPLACE , config::flag::UPNP , config::flag::CONST_PIN , config::flag::FLAG_SIZE } |
| Enumerates supported flag options. More... | |
Functions | |
| std::string | config::nv::ffmpeg_preset_from_quality (int quality_preset) |
| Convert Sunshine's NVENC quality preset number to FFmpeg's stable symbolic name. | |
| void | config::log_config_settings (const std::unordered_map< std::string, std::string > &vars, bool save) |
| Log parsed configuration entries and optionally record them as modified. | |
| int | config::parse (int argc, char *argv[]) |
| Parse serialized text into the corresponding runtime representation. | |
| std::unordered_map< std::string, std::string > | config::parse_config (const std::string_view &file_content) |
| Parse Sunshine configuration text into key-value entries. | |
| bool | config::persist_config_option_if_missing (std::string_view name, std::string_view value) |
| Persist a configuration option when the active file does not already define it. | |
| bool | config::select_all_gamepad_drivers_if_licensed (bool virtualhid_licensed) |
| Select all available gamepad drivers when a licensed user has not made a choice. | |
Variables | |
| constexpr int | config::ENCRYPTION_MODE_MANDATORY = 2 |
| Encryption policy that rejects clients without video encryption support. | |
| constexpr int | config::ENCRYPTION_MODE_NEVER = 0 |
| Encryption policy that always sends unencrypted video. | |
| constexpr int | config::ENCRYPTION_MODE_OPPORTUNISTIC = 1 |
| Encryption policy that uses encrypted video only when the client supports it. | |
| constexpr std::string_view | config::GAMEPAD_DRIVER_ALL = "all" |
| Allow every available Windows virtual gamepad driver. | |
| constexpr std::string_view | config::GAMEPAD_DRIVER_VIGEMBUS = "vigembus" |
| Allow only ViGEmBus for Windows gamepads. | |
| constexpr std::string_view | config::GAMEPAD_DRIVER_VIRTUALHID = "virtualhid" |
| Allow only Virtual HID Driver for Windows gamepads. | |
| std::unordered_map< std::string, std::string > | config::modified_config_settings |
| Configuration keys changed during the current parse or UI update. | |
| constexpr int | config::PACKETSIZE_LARGE = 1456 |
| Default large packet size that avoids common MTU fragmentation. | |
| constexpr int | config::PACKETSIZE_MAX = 65535 |
| Highest accepted configured packet size in bytes. | |
| constexpr int | config::PACKETSIZE_MIN = 200 |
| Lowest accepted configured packet size in bytes. | |
| constexpr int | config::PACKETSIZE_SMALL = 500 |
| Conservative packet size used for low-MTU links. | |
| constexpr std::array | config::redacted_config |
| Configuration keys whose values must be hidden in logs. | |
Declarations for the configuration of Sunshine.
| enum config::flag::flag_e : std::size_t |
| std::string config::nv::ffmpeg_preset_from_quality | ( | int | quality_preset | ) |
Convert Sunshine's NVENC quality preset number to FFmpeg's stable symbolic name.
| quality_preset | Validated Sunshine quality preset in the range 1 through 7. |
| void config::log_config_settings | ( | const std::unordered_map< std::string, std::string > & | vars, |
| bool | save ) |
Log parsed configuration entries and optionally record them as modified.
Log configuration entries and optionally mark them for persistence.
| vars | Parsed configuration entries to log. |
| save | Whether modified configuration values should be written back to disk. |
| int config::parse | ( | int | argc, |
| char * | argv[] ) |
Parse serialized text into the corresponding runtime representation.
| argc | Number of command-line arguments. |
| argv | Command-line argument vector. |
| std::unordered_map< std::string, std::string > config::parse_config | ( | const std::string_view & | file_content | ) |
Parse Sunshine configuration text into key-value entries.
| file_content | Raw configuration file contents to parse. |
| bool config::persist_config_option_if_missing | ( | std::string_view | name, |
| std::string_view | value ) |
Persist a configuration option when the active file does not already define it.
Existing text and comments are retained because the new setting is appended rather than serializing the complete configuration again.
| name | Configuration option name. |
| value | Configuration option value. |
| bool config::select_all_gamepad_drivers_if_licensed | ( | bool | virtualhid_licensed | ) |
Select all available gamepad drivers when a licensed user has not made a choice.
| virtualhid_licensed | Whether Virtual HID Driver has an active machine license. |
|
inlineconstexpr |
Configuration keys whose values must be hidden in logs.