mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-21 04:37:09 +08:00
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:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user