11#include <unordered_map>
26 std::string sw_preset;
28 std::optional<int> svtav1_preset;
32 bool nv_realtime_hags;
33 bool nv_opengl_vulkan_on_dxgi;
34 bool nv_sunshine_high_power_mode;
41 int vbv_percentage_increase;
45 std::optional<int> qsv_preset;
46 std::optional<int> qsv_cavlc;
51 std::optional<int> amd_usage_h264;
52 std::optional<int> amd_usage_hevc;
53 std::optional<int> amd_usage_av1;
54 std::optional<int> amd_rc_h264;
55 std::optional<int> amd_rc_hevc;
56 std::optional<int> amd_rc_av1;
57 std::optional<int> amd_enforce_hrd;
58 std::optional<int> amd_quality_h264;
59 std::optional<int> amd_quality_hevc;
60 std::optional<int> amd_quality_av1;
61 std::optional<int> amd_preanalysis;
62 std::optional<int> amd_vbaq;
74 bool strict_rc_buffer;
79 std::string adapter_name;
80 std::string output_name;
113 std::string requested_resolution;
114 std::string requested_fps;
115 std::string final_resolution;
116 std::string final_refresh_rate;
120 std::vector<mode_remapping_entry_t>
mixed;
141 std::string virtual_sink;
142 bool install_steam_drivers;
145 constexpr int ENCRYPTION_MODE_NEVER = 0;
146 constexpr int ENCRYPTION_MODE_OPPORTUNISTIC = 1;
147 constexpr int ENCRYPTION_MODE_MANDATORY = 2;
150 std::chrono::milliseconds ping_timeout;
152 std::string file_apps;
157 int lan_encryption_mode;
158 int wan_encryption_mode;
164 std::string origin_web_ui_allowed;
169 std::string sunshine_name;
171 std::string file_state;
173 std::string external_ip;
177 std::unordered_map<int, int> keybindings;
179 std::chrono::milliseconds back_button_timeout;
180 std::chrono::milliseconds key_repeat_delay;
181 std::chrono::duration<double> key_repeat_period;
184 bool ds4_back_as_touchpad_click;
186 bool touchpad_as_ds4;
192 bool always_send_scancodes;
194 bool high_resolution_scrolling;
195 bool native_pen_touch;
210 prep_cmd_t(std::string &&do_cmd, std::string &&undo_cmd,
bool &&elevated):
211 do_cmd(std::move(do_cmd)), undo_cmd(std::move(undo_cmd)), elevated(std::move(elevated)) {}
212 explicit prep_cmd_t(std::string &&do_cmd,
bool &&elevated):
213 do_cmd(std::move(do_cmd)), elevated(std::move(elevated)) {}
215 std::string undo_cmd;
221 std::bitset<flag::FLAG_SIZE> flags;
222 std::string credentials_file;
224 std::string username;
225 std::string password;
228 std::string config_file;
237 std::string address_family;
239 std::string log_file;
240 bool notify_pre_releases;
241 std::vector<prep_cmd_t> prep_cmds;
252 parse(
int argc,
char *argv[]);
253 std::unordered_map<std::string, std::string>
254 parse_config(
const std::string_view &file_content);
flag_e
Definition config.h:199
@ UPNP
Try Universal Plug 'n Play.
Definition config.h:203
@ FRESH_STATE
Do not load or save state.
Definition config.h:201
@ FLAG_SIZE
Number of flags.
Definition config.h:205
@ PIN_STDIN
Read PIN from stdin instead of http.
Definition config.h:200
@ FORCE_VIDEO_HEADER_REPLACE
force replacing headers inside video data
Definition config.h:202
@ CONST_PIN
Use "universal" pin.
Definition config.h:204
Contains all the functions and variables related to the nvhttp (GameStream) server.
Definition nvhttp.cpp:39
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.
Definition config.h:122
std::vector< mode_remapping_entry_t > mixed
To be used when resolution_option and refresh_rate_option is set to automatic.
Definition config.h:120
std::vector< mode_remapping_entry_t > resolution_only
To be use when only resolution_option is set to automatic.
Definition config.h:121
bool hdr_toggle
Specify whether to apply HDR high-contrast color workaround.
Definition config.h:84
std::string manual_resolution
Manual resolution in case resolution_option == resolution_option_e::manual.
Definition config.h:127
refresh_rate_option_e
Definition config.h:101
hdr_option_e
Definition config.h:107
std::chrono::milliseconds config_revert_delay
Time to wait until settings are reverted (after stream ends/app exists).
Definition config.h:131
std::string manual_refresh_rate
Manual refresh rate in case refresh_rate_option == refresh_rate_option_e::manual.
Definition config.h:129
config_option_e
Definition config.h:87
@ disabled
Disable the configuration for the device.
resolution_option_e
Definition config.h:95
@ automatic
Change resolution and use the one received from Moonlight.
@ manual
Change resolution and use the manually provided one.
NVENC encoder configuration.
Definition nvenc_config.h:18