From 7905197b7c08ece76d2bf4074f1bd8b2b07ced01 Mon Sep 17 00:00:00 2001 From: fryshorts Date: Tue, 10 Feb 2015 18:20:26 +0100 Subject: [PATCH] linux-v4l2: Remove "Leave Unchanged" option Remove the "Leave Unchanged" option for the input and video format select. This option was primarily added for cases in which the resolution and framerate are set by another program or the capture device itself and the values are not directly supported by the plugin. One major usecase here would be capture devices for tv signals which might be set to a spcific resolution and refresh rate, and might fail to initialize in case any other combination of those settings is forced. In case of the input this option did not make much sense, as the first input is probably the best default option in most cases. For the video format this default is even bad in some cases. If an format emulated by libv4l2 is selected for example, this will usually configure the device to use mjpeg with libv4l2 converting it to some format obs can use. When obs or the source is then restarted and the "Leave Unchanged" is enabled the plugin will fail, because it will only notice that the device is set to mjpeg, without any knowledge about the possibility of letting libv4l2 handle the conversion. Using the first available and supported format is not nescessarily the best choice, but still preferable to some random format that will cause the plugin to not capture at all. Forcing a choice here will hopefully also make the plugin behaviour more predicatable for the user. --- plugins/linux-v4l2/v4l2-input.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugins/linux-v4l2/v4l2-input.c b/plugins/linux-v4l2/v4l2-input.c index 7e0e6d1f7..18433cecf 100644 --- a/plugins/linux-v4l2/v4l2-input.c +++ b/plugins/linux-v4l2/v4l2-input.c @@ -337,8 +337,6 @@ static void v4l2_input_list(int_fast32_t dev, obs_property_t *prop) obs_property_list_clear(prop); - obs_property_list_add_int(prop, obs_module_text("LeaveUnchanged"), -1); - while (v4l2_ioctl(dev, VIDIOC_ENUMINPUT, &in) == 0) { obs_property_list_add_int(prop, (char *) in.name, in.index); blog(LOG_INFO, "Found input '%s' (Index %d)", in.name, @@ -360,8 +358,6 @@ static void v4l2_format_list(int dev, obs_property_t *prop) obs_property_list_clear(prop); - obs_property_list_add_int(prop, obs_module_text("LeaveUnchanged"), -1); - while (v4l2_ioctl(dev, VIDIOC_ENUM_FMT, &fmt) == 0) { dstr_copy(&buffer, (char *) fmt.description); if (fmt.flags & V4L2_FMT_FLAG_EMULATED)