2019-12-03 19:23:33 +00:00
|
|
|
#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
|
2019-12-06 19:52:08 +00:00
|
|
|
|
2020-01-21 01:23:57 +00:00
|
|
|
int min_threads; // Minimum number of threads/slices for CPU encoding
|
2019-12-06 20:41:30 +00:00
|
|
|
|
2020-01-20 03:46:45 +00:00
|
|
|
int hevc_mode;
|
2019-12-06 19:52:08 +00:00
|
|
|
std::string preset;
|
|
|
|
std::string tune;
|
2020-01-24 00:05:43 +00:00
|
|
|
|
|
|
|
std::string adapter_name;
|
|
|
|
std::string output_name;
|
2019-12-03 19:23:33 +00:00
|
|
|
};
|
|
|
|
|
2020-01-17 23:58:27 +00:00
|
|
|
struct audio_t {
|
|
|
|
std::string sink;
|
|
|
|
};
|
|
|
|
|
2019-12-03 19:23:33 +00:00
|
|
|
struct stream_t {
|
|
|
|
std::chrono::milliseconds ping_timeout;
|
2019-12-11 22:37:20 +00:00
|
|
|
|
2019-12-16 21:02:21 +00:00
|
|
|
std::string file_apps;
|
|
|
|
|
2019-12-11 22:37:20 +00:00
|
|
|
int fec_percentage;
|
2020-02-08 15:26:38 +00:00
|
|
|
|
|
|
|
// max unique instances of video and audio streams
|
|
|
|
int channels;
|
2019-12-03 19:23:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct nvhttp_t {
|
2019-12-27 15:04:18 +00:00
|
|
|
// Could be any of the following values:
|
|
|
|
// pc|lan|wan
|
|
|
|
std::string origin_pin_allowed;
|
|
|
|
|
2019-12-03 19:23:33 +00:00
|
|
|
std::string pkey; // must be 2048 bits
|
|
|
|
std::string cert; // must be signed with a key of 2048 bits
|
|
|
|
|
2019-12-25 23:01:06 +00:00
|
|
|
std::string sunshine_name;
|
|
|
|
|
2020-01-20 22:08:44 +00:00
|
|
|
std::string file_state;
|
2019-12-03 19:23:33 +00:00
|
|
|
|
|
|
|
std::string external_ip;
|
|
|
|
};
|
|
|
|
|
2019-12-22 22:34:12 +00:00
|
|
|
struct input_t {
|
|
|
|
std::chrono::milliseconds back_button_timeout;
|
|
|
|
};
|
|
|
|
|
2020-01-09 21:02:01 +00:00
|
|
|
struct sunshine_t {
|
|
|
|
int min_log_level;
|
|
|
|
};
|
|
|
|
|
2019-12-03 19:23:33 +00:00
|
|
|
extern video_t video;
|
2020-01-17 23:58:27 +00:00
|
|
|
extern audio_t audio;
|
2019-12-03 19:23:33 +00:00
|
|
|
extern stream_t stream;
|
|
|
|
extern nvhttp_t nvhttp;
|
2019-12-22 22:34:12 +00:00
|
|
|
extern input_t input;
|
2020-01-09 21:02:01 +00:00
|
|
|
extern sunshine_t sunshine;
|
2019-12-03 22:19:00 +00:00
|
|
|
|
|
|
|
void parse_file(const char *file);
|
2019-12-03 19:23:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|