|
|
|
@ -20,6 +20,7 @@ Configuration::Configuration() {
|
|
|
|
runasdaemon = 0;
|
|
|
|
runasdaemon = 0;
|
|
|
|
vdev_iomode = DEFAULT_VDEV_IOMODE;
|
|
|
|
vdev_iomode = DEFAULT_VDEV_IOMODE;
|
|
|
|
vdev_device = DEFAULT_VDEV_DEVICE;
|
|
|
|
vdev_device = DEFAULT_VDEV_DEVICE;
|
|
|
|
|
|
|
|
vdev_format = "";
|
|
|
|
ssl_key = DEFAULT_SSL_KEY;
|
|
|
|
ssl_key = DEFAULT_SSL_KEY;
|
|
|
|
ssl_cert = DEFAULT_SSL_CERT;
|
|
|
|
ssl_cert = DEFAULT_SSL_CERT;
|
|
|
|
initflags = 0;
|
|
|
|
initflags = 0;
|
|
|
|
@ -52,6 +53,7 @@ int Configuration::PrintConfig() {
|
|
|
|
jp.AddObject("vdev-device", vdev_device);
|
|
|
|
jp.AddObject("vdev-device", vdev_device);
|
|
|
|
jp.AddObject("vdev-height", vdev_height);
|
|
|
|
jp.AddObject("vdev-height", vdev_height);
|
|
|
|
jp.AddObject("vdev-width", vdev_width);
|
|
|
|
jp.AddObject("vdev-width", vdev_width);
|
|
|
|
|
|
|
|
jp.AddObject("vdev-format", vdev_format);
|
|
|
|
jp.AddObject("web-height", web_height);
|
|
|
|
jp.AddObject("web-height", web_height);
|
|
|
|
jp.AddObject("web-width", web_width);
|
|
|
|
jp.AddObject("web-width", web_width);
|
|
|
|
|
|
|
|
|
|
|
|
@ -91,6 +93,7 @@ int Configuration::LoadFile(std::string fn) {
|
|
|
|
if (jp.GetValueInt("web-width", &i)) web_width = i;
|
|
|
|
if (jp.GetValueInt("web-width", &i)) web_width = i;
|
|
|
|
|
|
|
|
|
|
|
|
if (jp.GetValueString("vdev-device", &s)) vdev_device = s;
|
|
|
|
if (jp.GetValueString("vdev-device", &s)) vdev_device = s;
|
|
|
|
|
|
|
|
if (jp.GetValueString("vdev-format", &s)) vdev_format = s;
|
|
|
|
if (jp.GetValueInt("vdev-iomode", &i)) vdev_iomode = i;
|
|
|
|
if (jp.GetValueInt("vdev-iomode", &i)) vdev_iomode = i;
|
|
|
|
if (jp.GetValueInt("vdev-height", &i)) vdev_height = i;
|
|
|
|
if (jp.GetValueInt("vdev-height", &i)) vdev_height = i;
|
|
|
|
if (jp.GetValueInt("vdev-width", &i)) vdev_width = i;
|
|
|
|
if (jp.GetValueInt("vdev-width", &i)) vdev_width = i;
|
|
|
|
@ -157,6 +160,13 @@ int Configuration::LoadArgs(int argc, char **argv) {
|
|
|
|
else
|
|
|
|
else
|
|
|
|
ErrorExit("missing iomode parameter", -1);
|
|
|
|
ErrorExit("missing iomode parameter", -1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (strcmp(argv[i], "-vdevformat") == 0) {
|
|
|
|
|
|
|
|
if (++i < argc) {
|
|
|
|
|
|
|
|
vdev_format = argv[i];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
ErrorExit("missing device parameter", -1);
|
|
|
|
|
|
|
|
}
|
|
|
|
if (strcmp(argv[i], "-vdevdevice") == 0) {
|
|
|
|
if (strcmp(argv[i], "-vdevdevice") == 0) {
|
|
|
|
if (++i < argc) {
|
|
|
|
if (++i < argc) {
|
|
|
|
vdev_device = argv[i];
|
|
|
|
vdev_device = argv[i];
|
|
|
|
@ -199,6 +209,7 @@ void Configuration::Help() {
|
|
|
|
printf (" -vdeviomode INT IOMode to read the video data, 0-read, 1-MMap\n");
|
|
|
|
printf (" -vdeviomode INT IOMode to read the video data, 0-read, 1-MMap\n");
|
|
|
|
printf (" -vdevdevice FILE Device File i.e. /dev/video2\n");
|
|
|
|
printf (" -vdevdevice FILE Device File i.e. /dev/video2\n");
|
|
|
|
printf (" -vdevsize INT INT define video input resolution\n");
|
|
|
|
printf (" -vdevsize INT INT define video input resolution\n");
|
|
|
|
|
|
|
|
printf (" -vdevformat FORMAT 4 Char Format code - see v4l2 documentation (videodev2.h)\n");
|
|
|
|
printf ("\n");
|
|
|
|
printf ("\n");
|
|
|
|
printf (" -config FILE load this configfile\n");
|
|
|
|
printf (" -config FILE load this configfile\n");
|
|
|
|
printf (" -dump_config print the config file\n");
|
|
|
|
printf (" -dump_config print the config file\n");
|
|
|
|
|