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

Nicolas Dufresne nicolas at ndufresne.ca
Tue Jun 13 16:26:00 CEST 2023


Le mardi 13 juin 2023 à 12:34 +0100, Kieran Bingham via libcamera-devel a
écrit :
> 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>

p.s. I had this split like this to make the style check happy. Not sure it was
important enough to change it to something the checker does not like ?

> 
> > +                                   "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