Skip to content

Commit

Permalink
Add support for utv007 / Linux (#423)
Browse files Browse the repository at this point in the history
  • Loading branch information
awawa-dev committed Nov 29, 2022
1 parent 750b35a commit 21c69c1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/base/schema/schema-color.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"options" : {
"enum_titles" : ["edt_conf_enum_multicolor_mean", "edt_conf_enum_unicolor_mean", "edt_conf_enum_unicolor_advanced", "edt_conf_enum_unicolor_weighted"]
},
"default" : "advanced",
"default" : "multicolor_mean",
"propertyOrder" : 1
},
"sparse_processing" :
Expand Down Expand Up @@ -60,7 +60,7 @@
"type" : "boolean",
"format": "checkbox",
"title" : "edt_conf_color_classic_config_title",
"default" : true,
"default" : false,
"required" : true,
"propertyOrder" : 3
},
Expand Down
12 changes: 12 additions & 0 deletions sources/grabber/v4l2/V4L2Grabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,18 @@ void V4L2Grabber::enumerateV4L2devices(bool silent)

devNameFile.close();
}

// UTV007 workaround
if (properties.valid.size() == 0 && realName.indexOf("usbtv ", 0, Qt::CaseInsensitive) == 0)
{
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");
{ 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); }
{ 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); }
{ 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); }
{ 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); }
{ 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); }
}

_deviceProperties.insert(realName, properties);

if (!silent)
Expand Down

0 comments on commit 21c69c1

Please sign in to comment.