[libcamera-devel,3/8] gstreamer: Omit extra semicolons
diff mbox series

Message ID 20201020052905.89267-4-hiroh@chromium.org
State Accepted
Headers show
Series
  • [libcamera-devel,1/8] test: Omit extra semicolons
Related show

Commit Message

Hirokazu Honda Oct. 20, 2020, 5:29 a.m. UTC
Macros used in gstreamer (e.g. G_DEFINE_TYPE) is a function. The
end semicolons with the macros are unnecessary.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
---
 src/gstreamer/gstlibcamera.cpp          | 2 +-
 src/gstreamer/gstlibcameraallocator.cpp | 2 +-
 src/gstreamer/gstlibcamerapad.cpp       | 2 +-
 src/gstreamer/gstlibcamerapool.cpp      | 2 +-
 src/gstreamer/gstlibcameraprovider.cpp  | 6 +++---
 src/gstreamer/gstlibcamerasrc.cpp       | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

Comments

Laurent Pinchart Oct. 20, 2020, 7:42 a.m. UTC | #1
Hi Hiro-san,

Thank you for the patch.

On Tue, Oct 20, 2020 at 02:29:00PM +0900, Hirokazu Honda wrote:
> Macros used in gstreamer (e.g. G_DEFINE_TYPE) is a function. The

s/is a function/are functions/

> end semicolons with the macros are unnecessary.
> 
> Signed-off-by: Hirokazu Honda <hiroh@chromium.org>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  src/gstreamer/gstlibcamera.cpp          | 2 +-
>  src/gstreamer/gstlibcameraallocator.cpp | 2 +-
>  src/gstreamer/gstlibcamerapad.cpp       | 2 +-
>  src/gstreamer/gstlibcamerapool.cpp      | 2 +-
>  src/gstreamer/gstlibcameraprovider.cpp  | 6 +++---
>  src/gstreamer/gstlibcamerasrc.cpp       | 2 +-
>  6 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/src/gstreamer/gstlibcamera.cpp b/src/gstreamer/gstlibcamera.cpp
> index 81c7bb1..52388b5 100644
> --- a/src/gstreamer/gstlibcamera.cpp
> +++ b/src/gstreamer/gstlibcamera.cpp
> @@ -24,4 +24,4 @@ plugin_init(GstPlugin *plugin)
>  
>  GST_PLUGIN_DEFINE(GST_VERSION_MAJOR, GST_VERSION_MINOR,
>  		  libcamera, "libcamera capture plugin",
> -		  plugin_init, VERSION, "LGPL", PACKAGE, "https://libcamera.org");
> +		  plugin_init, VERSION, "LGPL", PACKAGE, "https://libcamera.org")
> diff --git a/src/gstreamer/gstlibcameraallocator.cpp b/src/gstreamer/gstlibcameraallocator.cpp
> index 78ded40..13c6b49 100644
> --- a/src/gstreamer/gstlibcameraallocator.cpp
> +++ b/src/gstreamer/gstlibcameraallocator.cpp
> @@ -101,7 +101,7 @@ struct _GstLibcameraAllocator {
>  };
>  
>  G_DEFINE_TYPE(GstLibcameraAllocator, gst_libcamera_allocator,
> -	      GST_TYPE_DMABUF_ALLOCATOR);
> +	      GST_TYPE_DMABUF_ALLOCATOR)
>  
>  static gboolean
>  gst_libcamera_allocator_release(GstMiniObject *mini_object)
> diff --git a/src/gstreamer/gstlibcamerapad.cpp b/src/gstreamer/gstlibcamerapad.cpp
> index 9f3e2be..c00e81c 100644
> --- a/src/gstreamer/gstlibcamerapad.cpp
> +++ b/src/gstreamer/gstlibcamerapad.cpp
> @@ -27,7 +27,7 @@ enum {
>  	PROP_STREAM_ROLE
>  };
>  
> -G_DEFINE_TYPE(GstLibcameraPad, gst_libcamera_pad, GST_TYPE_PAD);
> +G_DEFINE_TYPE(GstLibcameraPad, gst_libcamera_pad, GST_TYPE_PAD)
>  
>  static void
>  gst_libcamera_pad_set_property(GObject *object, guint prop_id,
> diff --git a/src/gstreamer/gstlibcamerapool.cpp b/src/gstreamer/gstlibcamerapool.cpp
> index b756ee3..62db184 100644
> --- a/src/gstreamer/gstlibcamerapool.cpp
> +++ b/src/gstreamer/gstlibcamerapool.cpp
> @@ -29,7 +29,7 @@ struct _GstLibcameraPool {
>  	Stream *stream;
>  };
>  
> -G_DEFINE_TYPE(GstLibcameraPool, gst_libcamera_pool, GST_TYPE_BUFFER_POOL);
> +G_DEFINE_TYPE(GstLibcameraPool, gst_libcamera_pool, GST_TYPE_BUFFER_POOL)
>  
>  static GstFlowReturn
>  gst_libcamera_pool_acquire_buffer(GstBufferPool *pool, GstBuffer **buffer,
> diff --git a/src/gstreamer/gstlibcameraprovider.cpp b/src/gstreamer/gstlibcameraprovider.cpp
> index cd850d8..ee44dc7 100644
> --- a/src/gstreamer/gstlibcameraprovider.cpp
> +++ b/src/gstreamer/gstlibcameraprovider.cpp
> @@ -35,14 +35,14 @@ enum {
>  
>  #define GST_TYPE_LIBCAMERA_DEVICE gst_libcamera_device_get_type()
>  G_DECLARE_FINAL_TYPE(GstLibcameraDevice, gst_libcamera_device,
> -		     GST_LIBCAMERA, DEVICE, GstDevice);
> +		     GST_LIBCAMERA, DEVICE, GstDevice)
>  
>  struct _GstLibcameraDevice {
>  	GstDevice parent;
>  	gchar *name;
>  };
>  
> -G_DEFINE_TYPE(GstLibcameraDevice, gst_libcamera_device, GST_TYPE_DEVICE);
> +G_DEFINE_TYPE(GstLibcameraDevice, gst_libcamera_device, GST_TYPE_DEVICE)
>  
>  static GstElement *
>  gst_libcamera_device_create_element(GstDevice *device, const gchar *name)
> @@ -164,7 +164,7 @@ struct _GstLibcameraProvider {
>  G_DEFINE_TYPE_WITH_CODE(GstLibcameraProvider, gst_libcamera_provider,
>  			GST_TYPE_DEVICE_PROVIDER,
>  			GST_DEBUG_CATEGORY_INIT(provider_debug, "libcamera-provider", 0,
> -						"libcamera Device Provider"));
> +						"libcamera Device Provider"))
>  
>  static GList *
>  gst_libcamera_provider_probe(GstDeviceProvider *provider)
> diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp
> index 5001083..a099508 100644
> --- a/src/gstreamer/gstlibcamerasrc.cpp
> +++ b/src/gstreamer/gstlibcamerasrc.cpp
> @@ -140,7 +140,7 @@ enum {
>  
>  G_DEFINE_TYPE_WITH_CODE(GstLibcameraSrc, gst_libcamera_src, GST_TYPE_ELEMENT,
>  			GST_DEBUG_CATEGORY_INIT(source_debug, "libcamerasrc", 0,
> -						"libcamera Source"));
> +						"libcamera Source"))
>  
>  #define TEMPLATE_CAPS GST_STATIC_CAPS("video/x-raw; image/jpeg")
>

Patch
diff mbox series

diff --git a/src/gstreamer/gstlibcamera.cpp b/src/gstreamer/gstlibcamera.cpp
index 81c7bb1..52388b5 100644
--- a/src/gstreamer/gstlibcamera.cpp
+++ b/src/gstreamer/gstlibcamera.cpp
@@ -24,4 +24,4 @@  plugin_init(GstPlugin *plugin)
 
 GST_PLUGIN_DEFINE(GST_VERSION_MAJOR, GST_VERSION_MINOR,
 		  libcamera, "libcamera capture plugin",
-		  plugin_init, VERSION, "LGPL", PACKAGE, "https://libcamera.org");
+		  plugin_init, VERSION, "LGPL", PACKAGE, "https://libcamera.org")
diff --git a/src/gstreamer/gstlibcameraallocator.cpp b/src/gstreamer/gstlibcameraallocator.cpp
index 78ded40..13c6b49 100644
--- a/src/gstreamer/gstlibcameraallocator.cpp
+++ b/src/gstreamer/gstlibcameraallocator.cpp
@@ -101,7 +101,7 @@  struct _GstLibcameraAllocator {
 };
 
 G_DEFINE_TYPE(GstLibcameraAllocator, gst_libcamera_allocator,
-	      GST_TYPE_DMABUF_ALLOCATOR);
+	      GST_TYPE_DMABUF_ALLOCATOR)
 
 static gboolean
 gst_libcamera_allocator_release(GstMiniObject *mini_object)
diff --git a/src/gstreamer/gstlibcamerapad.cpp b/src/gstreamer/gstlibcamerapad.cpp
index 9f3e2be..c00e81c 100644
--- a/src/gstreamer/gstlibcamerapad.cpp
+++ b/src/gstreamer/gstlibcamerapad.cpp
@@ -27,7 +27,7 @@  enum {
 	PROP_STREAM_ROLE
 };
 
-G_DEFINE_TYPE(GstLibcameraPad, gst_libcamera_pad, GST_TYPE_PAD);
+G_DEFINE_TYPE(GstLibcameraPad, gst_libcamera_pad, GST_TYPE_PAD)
 
 static void
 gst_libcamera_pad_set_property(GObject *object, guint prop_id,
diff --git a/src/gstreamer/gstlibcamerapool.cpp b/src/gstreamer/gstlibcamerapool.cpp
index b756ee3..62db184 100644
--- a/src/gstreamer/gstlibcamerapool.cpp
+++ b/src/gstreamer/gstlibcamerapool.cpp
@@ -29,7 +29,7 @@  struct _GstLibcameraPool {
 	Stream *stream;
 };
 
-G_DEFINE_TYPE(GstLibcameraPool, gst_libcamera_pool, GST_TYPE_BUFFER_POOL);
+G_DEFINE_TYPE(GstLibcameraPool, gst_libcamera_pool, GST_TYPE_BUFFER_POOL)
 
 static GstFlowReturn
 gst_libcamera_pool_acquire_buffer(GstBufferPool *pool, GstBuffer **buffer,
diff --git a/src/gstreamer/gstlibcameraprovider.cpp b/src/gstreamer/gstlibcameraprovider.cpp
index cd850d8..ee44dc7 100644
--- a/src/gstreamer/gstlibcameraprovider.cpp
+++ b/src/gstreamer/gstlibcameraprovider.cpp
@@ -35,14 +35,14 @@  enum {
 
 #define GST_TYPE_LIBCAMERA_DEVICE gst_libcamera_device_get_type()
 G_DECLARE_FINAL_TYPE(GstLibcameraDevice, gst_libcamera_device,
-		     GST_LIBCAMERA, DEVICE, GstDevice);
+		     GST_LIBCAMERA, DEVICE, GstDevice)
 
 struct _GstLibcameraDevice {
 	GstDevice parent;
 	gchar *name;
 };
 
-G_DEFINE_TYPE(GstLibcameraDevice, gst_libcamera_device, GST_TYPE_DEVICE);
+G_DEFINE_TYPE(GstLibcameraDevice, gst_libcamera_device, GST_TYPE_DEVICE)
 
 static GstElement *
 gst_libcamera_device_create_element(GstDevice *device, const gchar *name)
@@ -164,7 +164,7 @@  struct _GstLibcameraProvider {
 G_DEFINE_TYPE_WITH_CODE(GstLibcameraProvider, gst_libcamera_provider,
 			GST_TYPE_DEVICE_PROVIDER,
 			GST_DEBUG_CATEGORY_INIT(provider_debug, "libcamera-provider", 0,
-						"libcamera Device Provider"));
+						"libcamera Device Provider"))
 
 static GList *
 gst_libcamera_provider_probe(GstDeviceProvider *provider)
diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp
index 5001083..a099508 100644
--- a/src/gstreamer/gstlibcamerasrc.cpp
+++ b/src/gstreamer/gstlibcamerasrc.cpp
@@ -140,7 +140,7 @@  enum {
 
 G_DEFINE_TYPE_WITH_CODE(GstLibcameraSrc, gst_libcamera_src, GST_TYPE_ELEMENT,
 			GST_DEBUG_CATEGORY_INIT(source_debug, "libcamerasrc", 0,
-						"libcamera Source"));
+						"libcamera Source"))
 
 #define TEMPLATE_CAPS GST_STATIC_CAPS("video/x-raw; image/jpeg")