[PATCH v2 1/3] gstreamer: Remove auto-focus-mode property from device provider
Jaslo Ziska
jaslo at ziska.de
Tue Aug 27 12:24:01 CEST 2024
Hi Laurent,
thanks for the review.
Laurent Pinchart <laurent.pinchart at ideasonboard.com> writes:
> Hi Jaslo,
>
> Thank you for the patch.
>
> On Tue, Aug 13, 2024 at 02:25:05PM +0200, Jaslo Ziska wrote:
>> The device provider is not supposed to have control properties,
>> remove
>> the auto-focus-mode property which was introduced by accident.
>>
>> Fixes: 5a142438b025 ("gstreamer: Add enable_auto_focus option
>> to the GStreamer plugin")
>> Signed-off-by: Jaslo Ziska <jaslo at ziska.de>
>
> Reviewed-by: Laurent Pinchart
> <laurent.pinchart at ideasonboard.com>
>
> Can I merge this already separately from the rest of the series,
> or
> could it cause issues without 2/3 and 3/3 ?
I think this can be merged separately but maybe check with Nicolas
to be sure.
Best regards
Jaslo
>> ---
>> src/gstreamer/gstlibcameraprovider.cpp | 15 ---------------
>> 1 file changed, 15 deletions(-)
>>
>> diff --git a/src/gstreamer/gstlibcameraprovider.cpp
>> b/src/gstreamer/gstlibcameraprovider.cpp
>> index 4fb1b007..5da96ea3 100644
>> --- a/src/gstreamer/gstlibcameraprovider.cpp
>> +++ b/src/gstreamer/gstlibcameraprovider.cpp
>> @@ -33,7 +33,6 @@ GST_DEBUG_CATEGORY_STATIC(provider_debug);
>>
>> enum {
>> PROP_DEVICE_NAME = 1,
>> - PROP_AUTO_FOCUS_MODE = 2,
>> };
>>
>> #define GST_TYPE_LIBCAMERA_DEVICE
>> gst_libcamera_device_get_type()
>> @@ -43,7 +42,6 @@ G_DECLARE_FINAL_TYPE(GstLibcameraDevice,
>> gst_libcamera_device,
>> struct _GstLibcameraDevice {
>> GstDevice parent;
>> gchar *name;
>> - controls::AfModeEnum auto_focus_mode =
>> controls::AfModeManual;
>> };
>>
>> G_DEFINE_TYPE(GstLibcameraDevice, gst_libcamera_device,
>> GST_TYPE_DEVICE)
>> @@ -60,7 +58,6 @@ gst_libcamera_device_create_element(GstDevice
>> *device, const gchar *name)
>> g_assert(source);
>>
>> g_object_set(source, "camera-name",
>> GST_LIBCAMERA_DEVICE(device)->name, nullptr);
>> - g_object_set(source, "auto-focus-mode",
>> GST_LIBCAMERA_DEVICE(device)->auto_focus_mode, nullptr);
>>
>> return source;
>> }
>> @@ -87,9 +84,6 @@ gst_libcamera_device_set_property(GObject
>> *object, guint prop_id,
>> case PROP_DEVICE_NAME:
>> device->name = g_value_dup_string(value);
>> break;
>> - case PROP_AUTO_FOCUS_MODE:
>> - device->auto_focus_mode =
>> static_cast<controls::AfModeEnum>(g_value_get_enum(value));
>> - break;
>> default:
>> G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id,
>> pspec);
>> break;
>> @@ -129,15 +123,6 @@
>> gst_libcamera_device_class_init(GstLibcameraDeviceClass *klass)
>> (GParamFlags)(G_PARAM_STATIC_STRINGS |
>> G_PARAM_WRITABLE |
>> G_PARAM_CONSTRUCT_ONLY));
>> g_object_class_install_property(object_class,
>> PROP_DEVICE_NAME, pspec);
>> -
>> - pspec = g_param_spec_enum("auto-focus-mode",
>> - "Set auto-focus mode",
>> - "Available options: AfModeManual, "
>> - "AfModeAuto or AfModeContinuous.",
>> - gst_libcamera_auto_focus_get_type(),
>> - static_cast<gint>(controls::AfModeManual),
>> - G_PARAM_WRITABLE);
>> - g_object_class_install_property(object_class,
>> PROP_AUTO_FOCUS_MODE, pspec);
>> }
>>
>> static GstDevice *
More information about the libcamera-devel
mailing list