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 max_b_frames;
|
|
|
|
int gop_size;
|
|
|
|
int crf; // higher == more compression and less quality
|
2019-12-06 19:52:08 +00:00
|
|
|
|
2019-12-06 20:41:30 +00:00
|
|
|
int threads; // Number threads used by ffmpeg
|
|
|
|
|
2019-12-06 19:52:08 +00:00
|
|
|
std::string profile;
|
|
|
|
std::string preset;
|
|
|
|
std::string tune;
|
2019-12-03 19:23:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct stream_t {
|
|
|
|
std::chrono::milliseconds ping_timeout;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct nvhttp_t {
|
|
|
|
std::string pkey; // must be 2048 bits
|
|
|
|
std::string cert; // must be signed with a key of 2048 bits
|
|
|
|
|
|
|
|
std::string unique_id; //UUID
|
|
|
|
std::string file_devices;
|
|
|
|
|
|
|
|
std::string external_ip;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern video_t video;
|
|
|
|
extern stream_t stream;
|
|
|
|
extern nvhttp_t nvhttp;
|
2019-12-03 22:19:00 +00:00
|
|
|
|
|
|
|
void parse_file(const char *file);
|
2019-12-03 19:23:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|