mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Add SECAM video standard to v4l2
This commit is contained in:
parent
6f443a48dd
commit
59ec767373
@ -416,6 +416,7 @@
|
||||
"edt_conf_enum_linear" : "Linear",
|
||||
"edt_conf_enum_PAL" : "PAL",
|
||||
"edt_conf_enum_NTSC" : "NTSC",
|
||||
"edt_conf_enum_SECAM" : "SECAM",
|
||||
"edt_conf_enum_logsilent" : "Stille",
|
||||
"edt_conf_enum_logwarn" : "Warnung",
|
||||
"edt_conf_enum_logverbose" : "Ausführlich",
|
||||
|
@ -417,6 +417,7 @@
|
||||
"edt_conf_enum_linear" : "Linear",
|
||||
"edt_conf_enum_PAL" : "PAL",
|
||||
"edt_conf_enum_NTSC" : "NTSC",
|
||||
"edt_conf_enum_SECAM" : "SECAM",
|
||||
"edt_conf_enum_logsilent" : "Silent",
|
||||
"edt_conf_enum_logwarn" : "Warning",
|
||||
"edt_conf_enum_logverbose" : "Verbose",
|
||||
|
@ -102,7 +102,7 @@
|
||||
/// * enable : Enable or disable the v4lgrabber (true/false)
|
||||
/// * device : V4L2 Device to use [default="/dev/video0"]
|
||||
/// * input : V4L2 input to use [default=0]
|
||||
/// * standard : Video standard (no-change/PAL/NTSC) [default="no-change"]
|
||||
/// * standard : Video standard (PAL/NTSC/SECAM) [default="PAL"]
|
||||
/// * width : V4L2 width to set [default=-1]
|
||||
/// * height : V4L2 height to set [default=-1]
|
||||
/// * frameDecimation : Frame decimation factor [default=2]
|
||||
|
@ -6,6 +6,7 @@
|
||||
enum VideoStandard {
|
||||
VIDEOSTANDARD_PAL,
|
||||
VIDEOSTANDARD_NTSC,
|
||||
VIDEOSTANDARD_SECAM,
|
||||
VIDEOSTANDARD_NO_CHANGE
|
||||
};
|
||||
|
||||
@ -22,6 +23,10 @@ inline VideoStandard parseVideoStandard(QString videoStandard)
|
||||
{
|
||||
return VIDEOSTANDARD_NTSC;
|
||||
}
|
||||
else if (videoStandard == "secam")
|
||||
{
|
||||
return VIDEOSTANDARD_SECAM;
|
||||
}
|
||||
|
||||
// return the default NO_CHANGE
|
||||
return VIDEOSTANDARD_NO_CHANGE;
|
||||
|
@ -462,6 +462,15 @@ void V4L2Grabber::init_device(VideoStandard videoStandard, int input)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case VIDEOSTANDARD_SECAM:
|
||||
{
|
||||
v4l2_std_id std_id = V4L2_STD_SECAM;
|
||||
if (-1 == xioctl(VIDIOC_S_STD, &std_id))
|
||||
{
|
||||
throw_errno_exception("VIDIOC_S_STD");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case VIDEOSTANDARD_NO_CHANGE:
|
||||
default:
|
||||
// No change to device settings
|
||||
|
@ -40,10 +40,10 @@
|
||||
{
|
||||
"type" : "string",
|
||||
"title" : "edt_conf_v4l2_standard_title",
|
||||
"enum" : ["PAL","NTSC"],
|
||||
"enum" : ["PAL","NTSC","SECAM"],
|
||||
"default" : "PAL",
|
||||
"options" : {
|
||||
"enum_titles" : ["edt_conf_enum_PAL", "edt_conf_enum_NTSC"]
|
||||
"enum_titles" : ["edt_conf_enum_PAL", "edt_conf_enum_NTSC", "edt_conf_enum_SECAM"]
|
||||
},
|
||||
"required" : true,
|
||||
"propertyOrder" : 4
|
||||
|
@ -57,7 +57,7 @@ int main(int argc, char** argv)
|
||||
Parser parser("V4L capture application for Hyperion");
|
||||
|
||||
Option & argDevice = parser.add<Option> ('d', "device", "The device to use [default: %1]", "auto");
|
||||
SwitchOption<VideoStandard> & argVideoStandard= parser.add<SwitchOption<VideoStandard>>('v', "video-standard", "The used video standard. Valid values are PAL, NTSC or no-change. [default: %1]", "no-change");
|
||||
SwitchOption<VideoStandard> & argVideoStandard= parser.add<SwitchOption<VideoStandard>>('v', "video-standard", "The used video standard. Valid values are PAL, NTSC, SECAM or no-change. [default: %1]", "no-change");
|
||||
SwitchOption<PixelFormat> & argPixelFormat = parser.add<SwitchOption<PixelFormat>> (0x0, "pixel-format", "The use pixel format. Valid values are YUYV, UYVY, RGB32 or no-change. [default: %1]", "no-change");
|
||||
IntOption & argInput = parser.add<IntOption> (0x0, "input", "Input channel (optional)", "-1");
|
||||
IntOption & argWidth = parser.add<IntOption> (0x0, "width", "Try to set the width of the video input [default: %1]", "-1");
|
||||
@ -92,6 +92,7 @@ int main(int argc, char** argv)
|
||||
|
||||
argVideoStandard.addSwitch("pal", VIDEOSTANDARD_PAL);
|
||||
argVideoStandard.addSwitch("ntsc", VIDEOSTANDARD_NTSC);
|
||||
argVideoStandard.addSwitch("secam", VIDEOSTANDARD_SECAM);
|
||||
argVideoStandard.addSwitch("no-change", VIDEOSTANDARD_NO_CHANGE);
|
||||
|
||||
argPixelFormat.addSwitch("yuyv", PIXELFORMAT_YUYV);
|
||||
|
Loading…
Reference in New Issue
Block a user