Skip to content

Commit 21c69c1

Browse files
authored
Add support for utv007 / Linux (#423)
1 parent 750b35a commit 21c69c1

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Diff for: sources/base/schema/schema-color.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"options" : {
1414
"enum_titles" : ["edt_conf_enum_multicolor_mean", "edt_conf_enum_unicolor_mean", "edt_conf_enum_unicolor_advanced", "edt_conf_enum_unicolor_weighted"]
1515
},
16-
"default" : "advanced",
16+
"default" : "multicolor_mean",
1717
"propertyOrder" : 1
1818
},
1919
"sparse_processing" :
@@ -60,7 +60,7 @@
6060
"type" : "boolean",
6161
"format": "checkbox",
6262
"title" : "edt_conf_color_classic_config_title",
63-
"default" : true,
63+
"default" : false,
6464
"required" : true,
6565
"propertyOrder" : 3
6666
},

Diff for: sources/grabber/v4l2/V4L2Grabber.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,18 @@ void V4L2Grabber::enumerateV4L2devices(bool silent)
540540

541541
devNameFile.close();
542542
}
543+
544+
// UTV007 workaround
545+
if (properties.valid.size() == 0 && realName.indexOf("usbtv ", 0, Qt::CaseInsensitive) == 0)
546+
{
547+
Warning(_log, "To have proper colors when using UTV007 grabber, you may need to add 'sudo systemctl stop hyperhdr@pi && v4l2-ctl -s pal-B && sudo systemctl start hyperhdr@pi' to /etc/rc.local or run it manually to set the PAL standard");
548+
{ DevicePropertiesItem diL; diL.x = 320; diL.y = 240; diL.fps = 30; diL.pf = identifyFormat(V4L2_PIX_FMT_YUYV); diL.v4l2PixelFormat = V4L2_PIX_FMT_YUYV; diL.input = 0; properties.valid.append(diL); }
549+
{ DevicePropertiesItem diL; diL.x = 320; diL.y = 288; diL.fps = 25; diL.pf = identifyFormat(V4L2_PIX_FMT_YUYV); diL.v4l2PixelFormat = V4L2_PIX_FMT_YUYV; diL.input = 0; properties.valid.append(diL); }
550+
{ DevicePropertiesItem diL; diL.x = 360; diL.y = 240; diL.fps = 30; diL.pf = identifyFormat(V4L2_PIX_FMT_YUYV); diL.v4l2PixelFormat = V4L2_PIX_FMT_YUYV; diL.input = 0; properties.valid.append(diL); }
551+
{ DevicePropertiesItem diL; diL.x = 720; diL.y = 480; diL.fps = 30; diL.pf = identifyFormat(V4L2_PIX_FMT_YUYV); diL.v4l2PixelFormat = V4L2_PIX_FMT_YUYV; diL.input = 0; properties.valid.append(diL); }
552+
{ DevicePropertiesItem diL; diL.x = 720; diL.y = 576; diL.fps = 25; diL.pf = identifyFormat(V4L2_PIX_FMT_YUYV); diL.v4l2PixelFormat = V4L2_PIX_FMT_YUYV; diL.input = 0; properties.valid.append(diL); }
553+
}
554+
543555
_deviceProperties.insert(realName, properties);
544556

545557
if (!silent)

0 commit comments

Comments
 (0)