Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
config.h File Reference

Declarations for the configuration of Sunshine. More...

#include <bitset>
#include <chrono>
#include <optional>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
#include "nvenc/nvenc_config.h"
Include dependency graph for config.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  config::video_t
struct  config::video_t::dd_t
struct  config::video_t::dd_t::workarounds_t
struct  config::video_t::dd_t::mode_remapping_entry_t
struct  config::video_t::dd_t::mode_remapping_t
struct  config::audio_t
struct  config::stream_t
struct  config::nvhttp_t
struct  config::input_t
struct  config::prep_cmd_t
struct  config::server_cmd_t
struct  config::sunshine_t
struct  config::sunshine_t::cmd_t

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
}

Functions

int config::parse (int argc, char *argv[])
std::unordered_map< std::string, std::string > config::parse_config (const ::std::string_view &file_content)
const std::set< std::string > & config::server_computed_keys ()
 Keys the Web UI's config response carries but that are never configuration: server-computed status, platform and version fields.

Variables

std::unordered_map< std::string, std::string > config::modified_config_settings
constexpr int config::ENCRYPTION_MODE_NEVER = 0
constexpr int config::ENCRYPTION_MODE_OPPORTUNISTIC = 1
constexpr int config::ENCRYPTION_MODE_MANDATORY = 2

Detailed Description

Declarations for the configuration of Sunshine.

Definition in file config.h.

Enumeration Type Documentation

◆ flag_e

enum config::flag::flag_e : std::size_t
Enumerator
PIN_STDIN 

Read PIN from stdin instead of http.

FRESH_STATE 

Do not load or save state.

FORCE_VIDEO_HEADER_REPLACE 

force replacing headers inside video data

UPNP 

Try Universal Plug 'n Play.

CONST_PIN 

Use "universal" pin.

FLAG_SIZE 

Number of flags.

Definition at line 207 of file config.h.

Function Documentation

◆ parse()

int config::parse ( int argc,
char * argv[] )

Definition at line 1138 of file config.cpp.

◆ parse_config()

std::unordered_map< std::string, std::string > config::parse_config ( const ::std::string_view & file_content)

Definition at line 437 of file config.cpp.

◆ server_computed_keys()

const std::set< std::string > & config::server_computed_keys ( )

Keys the Web UI's config response carries but that are never configuration: server-computed status, platform and version fields.

They end up in a real hermes.conf, because saveConfig() persists whatever the Web UI posts and the config page posts the whole response back. Two places have to know about them and used to disagree: the parser, which would otherwise report each as an unrecognized option, and the config response, where a parsed value - always a string - replaced the structured field of the same name and left the home page calling an array method on "[]". One list, so the two cannot drift apart again.

Definition at line 407 of file config.cpp.

Variable Documentation

◆ ENCRYPTION_MODE_MANDATORY

int config::ENCRYPTION_MODE_MANDATORY = 2
constexpr

Definition at line 143 of file config.h.

◆ ENCRYPTION_MODE_NEVER

int config::ENCRYPTION_MODE_NEVER = 0
constexpr

Definition at line 141 of file config.h.

◆ ENCRYPTION_MODE_OPPORTUNISTIC

int config::ENCRYPTION_MODE_OPPORTUNISTIC = 1
constexpr

Definition at line 142 of file config.h.

◆ modified_config_settings

std::unordered_map<std::string, std::string> config::modified_config_settings
inline

Definition at line 21 of file config.h.