linux-v4l2: Add function to enum video standards

Add a helper function to enumerate video standards supported by the
selected input and add them to a property.
This commit is contained in:
fryshorts
2015-02-23 20:34:44 +01:00
parent 96b994afb2
commit cc57222aa9
+18
View File
@@ -379,6 +379,24 @@ static void v4l2_format_list(int dev, obs_property_t *prop)
dstr_free(&buffer);
}
/*
* List video standards for the device
*/
static void v4l2_standard_list(int dev, obs_property_t *prop)
{
struct v4l2_standard std;
std.index = 0;
obs_property_list_clear(prop);
obs_property_list_add_int(prop, obs_module_text("LeaveUnchanged"), -1);
while (v4l2_ioctl(dev, VIDIOC_ENUMSTD, &std) == 0) {
obs_property_list_add_int(prop, (char *) std.name, std.id);
std.index++;
}
}
/*
* List resolutions for device and format
*/