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

Robert Mader robert.mader at collabora.com
Tue Jun 13 12:34:49 CEST 2023


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