From 691fdb85c0a6726a0f411dafa9bb9c2ff6849e3f Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Fri, 10 Apr 2020 21:03:04 +0200 Subject: [PATCH] v4l2codecs: fix v4l2codecdevice get type Currently the GType of v4l2codecdevice is hardcoded to zero, but it rather should be delivered by the GType system. --- sys/v4l2codecs/gstv4l2codecdevice.c | 4 +--- sys/v4l2codecs/gstv4l2codecdevice.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/v4l2codecs/gstv4l2codecdevice.c b/sys/v4l2codecs/gstv4l2codecdevice.c index eff61fa..b1e74b8 100644 --- a/sys/v4l2codecs/gstv4l2codecdevice.c +++ b/sys/v4l2codecs/gstv4l2codecdevice.c @@ -31,8 +31,6 @@ #define GST_CAT_DEFAULT gstv4l2codecs_debug GST_DEBUG_CATEGORY_EXTERN (gstv4l2codecs_debug); -GType _gst_v4l2_codec_device_type = 0; - GST_DEFINE_MINI_OBJECT_TYPE (GstV4l2CodecDevice, gst_v4l2_codec_device); static void @@ -51,7 +49,7 @@ gst_v4l2_codec_device_new (const gchar * name, guint32 function, GstV4l2CodecDevice *device = g_new0 (GstV4l2CodecDevice, 1); gst_mini_object_init (GST_MINI_OBJECT_CAST (device), - 0, _gst_v4l2_codec_device_type, NULL, NULL, + 0, GST_TYPE_V4L2_CODEC_DEVICE, NULL, NULL, (GstMiniObjectFreeFunction) gst_v4l2_codec_device_free); device->name = g_strdup (name); diff --git a/sys/v4l2codecs/gstv4l2codecdevice.h b/sys/v4l2codecs/gstv4l2codecdevice.h index 65f4a8f..a48088c 100644 --- a/sys/v4l2codecs/gstv4l2codecdevice.h +++ b/sys/v4l2codecs/gstv4l2codecdevice.h @@ -23,7 +23,7 @@ #include -#define GST_TYPE_V4L2_CODEC_DEVICE (_gst_v4l2_codec_device_type) +#define GST_TYPE_V4L2_CODEC_DEVICE (gst_v4l2_codec_device_get_type()) #define GST_IS_V4L2_CODEC_DEVICE(obj) (GST_IS_MINI_OBJECT_TYPE(obj, GST_TYPE_V4L2_CODEC_DEVICE)) #define GST_V4L2_CODEC_DEVICE(obj) ((GstV4l2CodecDevice *)(obj)) -- 2.7.4