uvch264: fix werror build with clang
authorMatthew Waters <matthew@centricular.com>
Mon, 26 Aug 2019 12:19:13 +0000 (22:19 +1000)
committerMatthew Waters <matthew@centricular.com>
Wed, 28 Aug 2019 02:47:18 +0000 (02:47 +0000)
../subprojects/gst-plugins-bad/sys/uvch264/gstuvch264deviceprovider.c:48:1: warning: unused function 'GST__UVC_H264_DEVICE' [-Wunused-function]
G_DECLARE_FINAL_TYPE (GstUvcH264Device, gst_uvc_h264_device, GST_,
^
/usr/include/glib-2.0/gobject/gtype.h:1405:33: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
  static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) {                                     \
                                ^
<scratch space>:75:1: note: expanded from here
GST__UVC_H264_DEVICE
^
../subprojects/gst-plugins-bad/sys/uvch264/gstuvch264deviceprovider.c:48:1: warning: unused function 'GST__IS_UVC_H264_DEVICE' [-Wunused-function]
/usr/include/glib-2.0/gobject/gtype.h:1407:26: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
  static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) {                                         \
                         ^
<scratch space>:78:1: note: expanded from here
GST__IS_UVC_H264_DEVICE
^
../subprojects/gst-plugins-bad/sys/uvch264/gstuvch264deviceprovider.c:139:1: warning: unused function 'GST_UVC_H264_DEVICE_PROVIDER' [-Wunused-function]
G_DECLARE_FINAL_TYPE (GstUvcH264DeviceProvider, gst_uvc_h264_device_provider, GST, UVC_H264_DEVICE_PROVIDER, GstDeviceProvider)
^
/usr/include/glib-2.0/gobject/gtype.h:1405:33: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
  static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) {                                     \
                                ^
<scratch space>:137:1: note: expanded from here
GST_UVC_H264_DEVICE_PROVIDER
^
../subprojects/gst-plugins-bad/sys/uvch264/gstuvch264deviceprovider.c:139:1: warning: unused function 'GST_IS_UVC_H264_DEVICE_PROVIDER' [-Wunused-function]
/usr/include/glib-2.0/gobject/gtype.h:1407:26: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
  static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) {                                         \
                         ^
<scratch space>:140:1: note: expanded from here
GST_IS_UVC_H264_DEVICE_PROVIDER
^

sys/uvch264/gstuvch264deviceprovider.c
sys/uvch264/gstuvch264deviceprovider.h [new file with mode: 0644]

index f457670..f27a72b 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "uvc_h264.h"
 #include <gst/gst.h>
+#include "gstuvch264deviceprovider.h"
 
 enum
 {
@@ -45,9 +46,6 @@ enum
 
 /* *INDENT-OFF* */
 
-G_DECLARE_FINAL_TYPE (GstUvcH264Device, gst_uvc_h264_device, GST_,
-    UVC_H264_DEVICE, GstDevice)
-
 struct _GstUvcH264Device
 {
   GstDevice parent;
@@ -134,10 +132,7 @@ gst_uvc_h264_device_init (GstUvcH264Device * device)
 {
 }
 
-
 /* *INDENT-OFF* */
-G_DECLARE_FINAL_TYPE (GstUvcH264DeviceProvider, gst_uvc_h264_device_provider, GST, UVC_H264_DEVICE_PROVIDER, GstDeviceProvider)
-
 struct _GstUvcH264DeviceProvider
 {
   GstDeviceProvider parent;
diff --git a/sys/uvch264/gstuvch264deviceprovider.h b/sys/uvch264/gstuvch264deviceprovider.h
new file mode 100644 (file)
index 0000000..599dad7
--- /dev/null
@@ -0,0 +1,30 @@
+/* GStreamer
+ * Copyright (C) 2019 Thibault Saunier <tsaunier@igalia.com>
+ *
+ * gstuvc_h264deviceprovider.c: UvcH264 device probing and monitoring
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/gst.h>
+
+G_BEGIN_DECLS
+
+G_DECLARE_FINAL_TYPE (GstUvcH264Device, gst_uvc_h264_device, GST, UVC_H264_DEVICE, GstDevice)
+
+G_DECLARE_FINAL_TYPE (GstUvcH264DeviceProvider, gst_uvc_h264_device_provider, GST, UVC_H264_DEVICE_PROVIDER, GstDeviceProvider)
+
+G_END_DECLS