Browse Source

linux-v4l2: Add video standard property

Add the video standard property and hide it by default.
fryshorts 10 years ago
parent
commit
bab2aa24d5
2 changed files with 7 additions and 0 deletions
  1. 1 0
      plugins/linux-v4l2/data/locale/en-US.ini
  2. 6 0
      plugins/linux-v4l2/v4l2-input.c

+ 1 - 0
plugins/linux-v4l2/data/locale/en-US.ini

@@ -2,6 +2,7 @@ V4L2Input="Video Capture Device (V4L2)"
 Device="Device"
 Input="Input"
 ImageFormat="Video Format"
+VideoStandard="Video Standard"
 Resolution="Resolution"
 FrameRate="Frame Rate"
 LeaveUnchanged="Leave Unchanged"

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

@@ -214,6 +214,7 @@ static void v4l2_defaults(obs_data_t *settings)
 {
 	obs_data_set_default_int(settings, "input", -1);
 	obs_data_set_default_int(settings, "pixelformat", -1);
+	obs_data_set_default_int(settings, "standard", -1);
 	obs_data_set_default_int(settings, "resolution", -1);
 	obs_data_set_default_int(settings, "framerate", -1);
 	obs_data_set_default_bool(settings, "system_timing", false);
@@ -644,6 +645,11 @@ static obs_properties_t *v4l2_properties(void *vptr)
 			"pixelformat", obs_module_text("VideoFormat"),
 			OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT);
 
+	obs_property_t *standard_list = obs_properties_add_list(props,
+			"standard", obs_module_text("VideoStandard"),
+			OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT);
+	obs_property_set_visible(standard_list, false);
+
 	obs_property_t *resolution_list = obs_properties_add_list(props,
 			"resolution", obs_module_text("Resolution"),
 			OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT);