[libcamera-devel] [PATCH 1/2] gstreamer: src: Style change

Kieran Bingham kieran.bingham at ideasonboard.com
Tue Jun 13 13:34:05 CEST 2023


Hi Robert,

Quoting Robert Mader via libcamera-devel (2023-06-13 11:34:49)
> Get rid of a variable and use a more common style in Gstreamer in
> preparation for more properties.
> 
> Signed-off-by: Robert Mader <robert.mader at collabora.com>
> ---
>  src/gstreamer/gstlibcamerasrc.cpp | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp
> index a10cbd4f..721b35c2 100644
> --- a/src/gstreamer/gstlibcamerasrc.cpp
> +++ b/src/gstreamer/gstlibcamerasrc.cpp
> @@ -837,11 +837,12 @@ gst_libcamera_src_class_init(GstLibcameraSrcClass *klass)
>                                                              &request_src_template,
>                                                              GST_TYPE_LIBCAMERA_PAD);
>  
> -       GParamSpec *spec = g_param_spec_string("camera-name", "Camera Name",
> -                                              "Select by name which camera to use.", nullptr,
> -                                              (GParamFlags)(GST_PARAM_MUTABLE_READY
> -                                                            | G_PARAM_CONSTRUCT
> -                                                            | G_PARAM_READWRITE
> -                                                            | G_PARAM_STATIC_STRINGS));
> -       g_object_class_install_property(object_class, PROP_CAMERA_NAME, spec);
> +       g_object_class_install_property(object_class, PROP_CAMERA_NAME,
> +               g_param_spec_string("camera-name", "Camera Name",

This sounds fine to me - but the indentation is going to drive our
clang-format crazy which means this generates a fair bit of checkstyle
noise.

In this instance, I think it's fine - as we probably expect in the
future that this component could get moved into the gstreamer project so
should be more closely aligned to styles there perhaps.

I don't think I can make clang-format/checkstyle have per file rules ;-(

Anyway, that's just checker noise. For the change:


Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

> +                                   "Select by name which camera to use.",
> +                                   nullptr,
> +                                   (GParamFlags)(GST_PARAM_MUTABLE_READY
> +                                                 | G_PARAM_CONSTRUCT
> +                                                 | G_PARAM_READWRITE
> +                                                 | G_PARAM_STATIC_STRINGS)));
>  }
> -- 
> 2.41.0
>


More information about the libcamera-devel mailing list