Sunshine/sunshine/config.h

69 lines
1.2 KiB
C
Raw Normal View History

#ifndef SUNSHINE_CONFIG_H
#define SUNSHINE_CONFIG_H
#include <chrono>
#include <string>
namespace config {
struct video_t {
// ffmpeg params
int crf; // higher == more compression and less quality
2019-12-12 12:13:10 +00:00
int qp; // higher == more compression and less quality, ignored if crf != 0
2020-01-21 01:23:57 +00:00
int min_threads; // Minimum number of threads/slices for CPU encoding
int hevc_mode;
std::string preset;
std::string tune;
std::string adapter_name;
std::string output_name;
};
struct audio_t {
std::string sink;
};
struct stream_t {
std::chrono::milliseconds ping_timeout;
std::string file_apps;
int fec_percentage;
};
struct nvhttp_t {
// Could be any of the following values:
// pc|lan|wan
std::string origin_pin_allowed;
std::string pkey; // must be 2048 bits
std::string cert; // must be signed with a key of 2048 bits
std::string sunshine_name;
2020-01-20 22:08:44 +00:00
std::string file_state;
std::string external_ip;
};
2019-12-22 22:34:12 +00:00
struct input_t {
std::chrono::milliseconds back_button_timeout;
};
struct sunshine_t {
int min_log_level;
};
extern video_t video;
extern audio_t audio;
extern stream_t stream;
extern nvhttp_t nvhttp;
2019-12-22 22:34:12 +00:00
extern input_t input;
extern sunshine_t sunshine;
2019-12-03 22:19:00 +00:00
void parse_file(const char *file);
}
#endif