|
|
|
|
@ -44,6 +44,7 @@ Configuration::Configuration() {
|
|
|
|
|
web_height = -1;
|
|
|
|
|
web_width = -1;
|
|
|
|
|
web_imagerefresh = 250;
|
|
|
|
|
debug = 0;
|
|
|
|
|
|
|
|
|
|
filter_ratio = 0.5;
|
|
|
|
|
};
|
|
|
|
|
@ -75,6 +76,7 @@ int Configuration::PrintConfig() {
|
|
|
|
|
jp.AddObject("web-size" , to_string(web_width) + "x" + to_string(web_height));
|
|
|
|
|
jp.AddObject("web-refresh", web_imagerefresh);
|
|
|
|
|
jp.AddObject("vdev-dumpath", vdev_dumppath);
|
|
|
|
|
jp.AddObject("debug", debug);
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// output the json string
|
|
|
|
|
@ -124,6 +126,7 @@ int Configuration::LoadFile(std::string fn) {
|
|
|
|
|
if (get_resolution(s.c_str(), &vdev_width, &vdev_height) == 0) {
|
|
|
|
|
debug ("Configfile: %s Wrong vdev-size: %s", fn.c_str(), s.c_str());
|
|
|
|
|
}
|
|
|
|
|
if (jp.GetValueInt("debug", &i)) debug = i;
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// restore language
|
|
|
|
|
@ -138,6 +141,9 @@ int Configuration::LoadArgs(int argc, char **argv) {
|
|
|
|
|
if (strcmp(argv[i], "-F") == 0) runasdaemon = 0;
|
|
|
|
|
if (strcmp(argv[i], "-D") == 0) runasdaemon = 1;
|
|
|
|
|
|
|
|
|
|
if (strcmp(argv[i], "-debug") == 0) debug = 1;
|
|
|
|
|
if (strcmp(argv[i], "-debug_off") == 0) debug = 0;
|
|
|
|
|
|
|
|
|
|
if (strcmp(argv[i], "-dump_config") == 0) initflags |= CONF_INITFLAGS_PRINT;
|
|
|
|
|
if (strcmp(argv[i], "-config") == 0) {
|
|
|
|
|
if (++i < argc) {
|
|
|
|
|
@ -253,6 +259,8 @@ void Configuration::Help() {
|
|
|
|
|
printf ("Parameters:\n");
|
|
|
|
|
printf (" -F run in foreground\n");
|
|
|
|
|
printf (" -D run as daemon\n");
|
|
|
|
|
printf (" -debug enable debug output\n");
|
|
|
|
|
printf (" -debug_off disable debug output\n");
|
|
|
|
|
printf ("\n");
|
|
|
|
|
printf (" -http_port INT port to listen for http connections\n");
|
|
|
|
|
printf (" -https_port INT port to listen for https connections\n");
|
|
|
|
|
|