|
|
|
@ -35,13 +35,14 @@ Configuration::Configuration() {
|
|
|
|
vdev_format = "";
|
|
|
|
vdev_format = "";
|
|
|
|
vdev_dumpfile = "";
|
|
|
|
vdev_dumpfile = "";
|
|
|
|
vdev_dumppath = "";
|
|
|
|
vdev_dumppath = "";
|
|
|
|
|
|
|
|
vdev_cdevice = "";
|
|
|
|
ssl_key = DEFAULT_SSL_KEY;
|
|
|
|
ssl_key = DEFAULT_SSL_KEY;
|
|
|
|
ssl_cert = DEFAULT_SSL_CERT;
|
|
|
|
ssl_cert = DEFAULT_SSL_CERT;
|
|
|
|
initflags = 0;
|
|
|
|
initflags = 0;
|
|
|
|
vdev_height = DEFAULT_VDEV_HEIGHT;
|
|
|
|
vdev_height = DEFAULT_VDEV_HEIGHT;
|
|
|
|
vdev_width = DEFAULT_VDEV_WIDTH;
|
|
|
|
vdev_width = DEFAULT_VDEV_WIDTH;
|
|
|
|
web_height = DEFAULT_WEB_HEIGHT;
|
|
|
|
web_height = -1;
|
|
|
|
web_width = DEFAULT_WEB_WIDTH;
|
|
|
|
web_width = -1;
|
|
|
|
web_imagerefresh = 250;
|
|
|
|
web_imagerefresh = 250;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@ -66,6 +67,7 @@ int Configuration::PrintConfig() {
|
|
|
|
jp.AddObject("ssl-cert-file", ssl_cert);
|
|
|
|
jp.AddObject("ssl-cert-file", ssl_cert);
|
|
|
|
jp.AddObject("vdev-iomode", vdev_iomode);
|
|
|
|
jp.AddObject("vdev-iomode", vdev_iomode);
|
|
|
|
jp.AddObject("vdev-device", vdev_device);
|
|
|
|
jp.AddObject("vdev-device", vdev_device);
|
|
|
|
|
|
|
|
jp.AddObject("vdev-cdevice", vdev_cdevice);
|
|
|
|
jp.AddObject("vdev-size", to_string(vdev_width) + "x" + to_string(vdev_height));
|
|
|
|
jp.AddObject("vdev-size", to_string(vdev_width) + "x" + to_string(vdev_height));
|
|
|
|
jp.AddObject("vdev-format", vdev_format);
|
|
|
|
jp.AddObject("vdev-format", vdev_format);
|
|
|
|
jp.AddObject("web-size" , to_string(web_width) + "x" + to_string(web_height));
|
|
|
|
jp.AddObject("web-size" , to_string(web_width) + "x" + to_string(web_height));
|
|
|
|
@ -112,6 +114,7 @@ int Configuration::LoadFile(std::string fn) {
|
|
|
|
if (jp.GetValueInt("web-refresh", &i)) web_imagerefresh = i;
|
|
|
|
if (jp.GetValueInt("web-refresh", &i)) web_imagerefresh = i;
|
|
|
|
|
|
|
|
|
|
|
|
if (jp.GetValueString("vdev-device", &s)) vdev_device = s;
|
|
|
|
if (jp.GetValueString("vdev-device", &s)) vdev_device = s;
|
|
|
|
|
|
|
|
if (jp.GetValueString("vdev-cdevice", &s)) vdev_cdevice = s;
|
|
|
|
if (jp.GetValueString("vdev-format", &s)) vdev_format = s;
|
|
|
|
if (jp.GetValueString("vdev-format", &s)) vdev_format = s;
|
|
|
|
if (jp.GetValueString("vdev-dumppath", &s)) vdev_dumppath = s;
|
|
|
|
if (jp.GetValueString("vdev-dumppath", &s)) vdev_dumppath = s;
|
|
|
|
if (jp.GetValueInt("vdev-iomode", &i)) vdev_iomode = i;
|
|
|
|
if (jp.GetValueInt("vdev-iomode", &i)) vdev_iomode = i;
|
|
|
|
@ -203,6 +206,13 @@ int Configuration::LoadArgs(int argc, char **argv) {
|
|
|
|
else
|
|
|
|
else
|
|
|
|
ErrorExit("missing device parameter", -1);
|
|
|
|
ErrorExit("missing device parameter", -1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (strcmp(argv[i], "-vdevcdevice") == 0) {
|
|
|
|
|
|
|
|
if (++i < argc) {
|
|
|
|
|
|
|
|
vdev_cdevice = argv[i];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
ErrorExit("missing ctrl (subdev) device parameter", -1);
|
|
|
|
|
|
|
|
}
|
|
|
|
if (strcmp(argv[i], "-vdevdumpfile") == 0) {
|
|
|
|
if (strcmp(argv[i], "-vdevdumpfile") == 0) {
|
|
|
|
if (++i < argc) {
|
|
|
|
if (++i < argc) {
|
|
|
|
vdev_dumpfile = argv[i];
|
|
|
|
vdev_dumpfile = argv[i];
|
|
|
|
@ -252,6 +262,7 @@ void Configuration::Help() {
|
|
|
|
printf ("\n");
|
|
|
|
printf ("\n");
|
|
|
|
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 (" -vdevcdevice FILE Device File i.e. /dev/v4l-subdev2\n");
|
|
|
|
printf (" -vdevsize INTxINT define video input resolution\n");
|
|
|
|
printf (" -vdevsize INTxINT define video input resolution\n");
|
|
|
|
printf (" -vdevformat FORMAT 4 Char Format code - see v4l2 documentation (videodev2.h)\n");
|
|
|
|
printf (" -vdevformat FORMAT 4 Char Format code - see v4l2 documentation (videodev2.h)\n");
|
|
|
|
printf (" -vdevdumpfile FILE file to read raw image data\n");
|
|
|
|
printf (" -vdevdumpfile FILE file to read raw image data\n");
|
|
|
|
|