13#include <unordered_map>
21 inline std::unordered_map<std::string, std::string> modified_config_settings;
26 bool double_refreshrate;
34 int default_scale_factor;
37 std::string sw_preset;
39 std::optional<int> svtav1_preset;
49 int vbv_percentage_increase;
53 bool strict_rc_buffer;
60 std::string adapter_name;
61 std::string output_name;
62 std::string virtual_display_backend;
63 bool hermes_kms_multi_output;
64 bool hermes_kms_isolated_sessions;
65 std::string gamescope_backend;
66 std::string hermes_kms_session_compositor;
67 std::string isolation_method;
100 std::string requested_resolution;
101 std::string requested_fps;
102 std::string final_resolution;
103 std::string final_refresh_rate;
107 std::vector<mode_remapping_entry_t>
mixed;
127 std::string fallback_mode;
128 bool isolated_virtual_display_option;
129 bool ignore_encoder_probe_failure;
141 constexpr int ENCRYPTION_MODE_NEVER = 0;
142 constexpr int ENCRYPTION_MODE_OPPORTUNISTIC = 1;
143 constexpr int ENCRYPTION_MODE_MANDATORY = 2;
146 std::chrono::milliseconds ping_timeout;
148 std::string file_apps;
155 int adaptive_fec_max_percentage;
158 int lan_encryption_mode;
159 int wan_encryption_mode;
165 std::string origin_web_ui_allowed;
170 std::string sunshine_name;
172 std::string file_state;
174 std::string external_ip;
178 std::unordered_map<int, int> keybindings;
180 std::chrono::milliseconds back_button_timeout;
181 std::chrono::milliseconds key_repeat_delay;
182 std::chrono::duration<double> key_repeat_period;
185 std::string linux_gamepad_backend;
186 bool ds4_back_as_touchpad_click;
188 bool touchpad_as_ds4;
189 bool virtualhid_randomize_mac;
196 bool high_resolution_scrolling;
197 bool native_pen_touch;
198 bool isolated_ignore_mouse_wiggle;
199 bool isolated_hide_hid_gamepads;
200 bool virtualhid_stable_mac;
202 bool enable_input_only_mode;
218 prep_cmd_t(std::string &&do_cmd, std::string &&undo_cmd,
bool &&elevated):
219 do_cmd(std::move(do_cmd)),
220 undo_cmd(std::move(undo_cmd)),
221 elevated(std::move(elevated)) {
224 explicit prep_cmd_t(std::string &&do_cmd,
bool &&elevated):
225 do_cmd(std::move(do_cmd)),
226 elevated(std::move(elevated)) {
230 std::string undo_cmd;
234 struct server_cmd_t {
235 server_cmd_t(std::string &&cmd_name, std::string &&cmd_val,
bool &&elevated):
236 cmd_name(std::move(cmd_name)),
237 cmd_val(std::move(cmd_val)),
238 elevated(std::move(elevated)) {
240 std::string cmd_name;
246 bool hide_tray_controls;
248 bool enable_discovery;
249 bool envvar_compatibility_mode;
258 std::bitset<flag::FLAG_SIZE> flags;
259 std::string credentials_file;
261 std::string username;
262 std::string password;
265 std::string config_file;
274 std::string address_family;
276 std::string log_file;
277 bool notify_pre_releases;
282 bool legacy_ordering;
284 std::vector<prep_cmd_t> prep_cmds;
285 std::vector<prep_cmd_t> state_cmds;
286 std::vector<server_cmd_t> server_cmds;
301 int parse(
int argc,
char *argv[]);
302 std::unordered_map<std::string, std::string> parse_config(
const std::string_view &file_content);
const std::set< std::string > & server_computed_keys()
Keys the Web UI's config response carries but that are never configuration: server-computed status,...
@ UPNP
Try Universal Plug 'n Play.
@ FRESH_STATE
Do not load or save state.
@ FLAG_SIZE
Number of flags.
@ PIN_STDIN
Read PIN from stdin instead of http.
@ FORCE_VIDEO_HEADER_REPLACE
force replacing headers inside video data
@ CONST_PIN
Use "universal" pin.
Contains all the functions and variables related to the nvhttp (GameStream) server.
Handles the system tray icon and notification system.
Declarations for NVENC encoder configuration.
std::vector< mode_remapping_entry_t > refresh_rate_only
To be use when only refresh_rate_option is set to automatic.
std::vector< mode_remapping_entry_t > mixed
To be used when resolution_option and refresh_rate_option is set to automatic.
std::vector< mode_remapping_entry_t > resolution_only
To be use when only resolution_option is set to automatic.
std::chrono::milliseconds hdr_toggle_delay
Specify whether to apply HDR high-contrast color workaround and what delay to use.
std::string manual_resolution
Manual resolution in case resolution_option == resolution_option_e::manual.
bool config_revert_on_disconnect
Specify whether to revert display configuration on client disconnect.
std::chrono::milliseconds config_revert_delay
Time to wait until settings are reverted (after stream ends/app exists).
std::string manual_refresh_rate
Manual refresh rate in case refresh_rate_option == refresh_rate_option_e::manual.
double minimum_fps_target
Lowest framerate that will be used when streaming. Range 0-1000, 0 = half of client's requested frame...
NVENC encoder configuration.