瀏覽代碼

linux-v4l2: Remove camera constraint for inputs

Remove the constraint for device inputs to be of the type "CAMERA".
This was added under the false assumption that inputs of the type
"TUNER" are only used for control purposes.
fryshorts 10 年之前
父節點
當前提交
ff8ac210fb
共有 1 個文件被更改,包括 3 次插入6 次删除
  1. 3 6
      plugins/linux-v4l2/v4l2-input.c

+ 3 - 6
plugins/linux-v4l2/v4l2-input.c

@@ -336,12 +336,9 @@ static void v4l2_input_list(int_fast32_t dev, obs_property_t *prop)
 	obs_property_list_add_int(prop, obs_module_text("LeaveUnchanged"), -1);
 	obs_property_list_add_int(prop, obs_module_text("LeaveUnchanged"), -1);
 
 
 	while (v4l2_ioctl(dev, VIDIOC_ENUMINPUT, &in) == 0) {
 	while (v4l2_ioctl(dev, VIDIOC_ENUMINPUT, &in) == 0) {
-		if (in.type & V4L2_INPUT_TYPE_CAMERA) {
-			obs_property_list_add_int(prop, (char *) in.name,
-					in.index);
-			blog(LOG_INFO, "Found input '%s' (Index %d)", in.name,
-					in.index);
-		}
+		obs_property_list_add_int(prop, (char *) in.name, in.index);
+		blog(LOG_INFO, "Found input '%s' (Index %d)", in.name,
+				in.index);
 		in.index++;
 		in.index++;
 	}
 	}
 }
 }