12#include <unordered_map>
29 std::string sw_preset;
31 std::optional<int> svtav1_preset;
35 bool nv_realtime_hags;
36 bool nv_opengl_vulkan_on_dxgi;
37 bool nv_sunshine_high_power_mode;
44 int vbv_percentage_increase;
48 std::optional<int> qsv_preset;
49 std::optional<int> qsv_cavlc;
54 std::optional<int> amd_usage_h264;
55 std::optional<int> amd_usage_hevc;
56 std::optional<int> amd_usage_av1;
57 std::optional<int> amd_rc_h264;
58 std::optional<int> amd_rc_hevc;
59 std::optional<int> amd_rc_av1;
60 std::optional<int> amd_enforce_hrd;
61 std::optional<int> amd_quality_h264;
62 std::optional<int> amd_quality_hevc;
63 std::optional<int> amd_quality_av1;
64 std::optional<int> amd_preanalysis;
65 std::optional<int> amd_vbaq;
77 bool strict_rc_buffer;
82 std::string adapter_name;
83 std::string output_name;
116 std::string requested_resolution;
117 std::string requested_fps;
118 std::string final_resolution;
119 std::string final_refresh_rate;
123 std::vector<mode_remapping_entry_t>
mixed;
144 std::string virtual_sink;
145 bool install_steam_drivers;
148 constexpr int ENCRYPTION_MODE_NEVER = 0;
149 constexpr int ENCRYPTION_MODE_OPPORTUNISTIC = 1;
150 constexpr int ENCRYPTION_MODE_MANDATORY = 2;
153 std::chrono::milliseconds ping_timeout;
155 std::string file_apps;
160 int lan_encryption_mode;
161 int wan_encryption_mode;
167 std::string origin_web_ui_allowed;
172 std::string sunshine_name;
174 std::string file_state;
176 std::string external_ip;
180 std::unordered_map<int, int> keybindings;
182 std::chrono::milliseconds back_button_timeout;
183 std::chrono::milliseconds key_repeat_delay;
184 std::chrono::duration<double> key_repeat_period;
187 bool ds4_back_as_touchpad_click;
189 bool touchpad_as_ds4;
195 bool always_send_scancodes;
197 bool high_resolution_scrolling;
198 bool native_pen_touch;
213 prep_cmd_t(std::string &&do_cmd, std::string &&undo_cmd,
bool &&elevated):
214 do_cmd(std::move(do_cmd)),
215 undo_cmd(std::move(undo_cmd)),
216 elevated(std::move(elevated)) {
219 explicit prep_cmd_t(std::string &&do_cmd,
bool &&elevated):
220 do_cmd(std::move(do_cmd)),
221 elevated(std::move(elevated)) {
225 std::string undo_cmd;
232 std::bitset<flag::FLAG_SIZE> flags;
233 std::string credentials_file;
235 std::string username;
236 std::string password;
239 std::string config_file;
248 std::string address_family;
250 std::string log_file;
251 bool notify_pre_releases;
252 std::vector<prep_cmd_t> prep_cmds;
262 int parse(
int argc,
char *argv[]);
263 std::unordered_map<std::string, std::string> parse_config(
const std::string_view &file_content);
flag_e
Definition config.h:202
@ UPNP
Try Universal Plug 'n Play.
Definition config.h:206
@ FRESH_STATE
Do not load or save state.
Definition config.h:204
@ FLAG_SIZE
Number of flags.
Definition config.h:208
@ PIN_STDIN
Read PIN from stdin instead of http.
Definition config.h:203
@ FORCE_VIDEO_HEADER_REPLACE
force replacing headers inside video data
Definition config.h:205
@ CONST_PIN
Use "universal" pin.
Definition config.h:207
Contains all the functions and variables related to the nvhttp (GameStream) server.
Definition nvhttp.cpp:40
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:125
std::vector< mode_remapping_entry_t > mixed
To be used when resolution_option and refresh_rate_option is set to automatic.
Definition config.h:123
std::vector< mode_remapping_entry_t > resolution_only
To be use when only resolution_option is set to automatic.
Definition config.h:124
bool hdr_toggle
Specify whether to apply HDR high-contrast color workaround.
Definition config.h:87
std::string manual_resolution
Manual resolution in case resolution_option == resolution_option_e::manual.
Definition config.h:130
refresh_rate_option_e
Definition config.h:104
hdr_option_e
Definition config.h:110
std::chrono::milliseconds config_revert_delay
Time to wait until settings are reverted (after stream ends/app exists).
Definition config.h:134
std::string manual_refresh_rate
Manual refresh rate in case refresh_rate_option == refresh_rate_option_e::manual.
Definition config.h:132
config_option_e
Definition config.h:90
@ disabled
Disable the configuration for the device.
resolution_option_e
Definition config.h:98
@ 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