summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2018-06-24 00:17:26 +0200
committerTim-Philipp Müller <tim@centricular.com>2018-06-24 12:27:09 +0200
commit22b885fd02a0f9a7ceb3cdd866d9827e1ff190ef (patch)
treef0e6b88f9f1eafe4d6df3f0f585a374b1d8d2942 /sys
parent65c5b9a4f6f76d4e30576856c38fada47d7f502c (diff)
winks: Update for g_type_class_add_private() deprecation in recent GLib
Untested
Diffstat (limited to 'sys')
-rw-r--r--sys/winks/gstksclock.c7
-rw-r--r--sys/winks/gstksvideodevice.c8
-rw-r--r--sys/winks/gstksvideosrc.c7
3 files changed, 7 insertions, 15 deletions
diff --git a/sys/winks/gstksclock.c b/sys/winks/gstksclock.c
index 8d46905b7..f8b15d6d7 100644
--- a/sys/winks/gstksclock.c
+++ b/sys/winks/gstksclock.c
@@ -51,7 +51,7 @@ struct _GstKsClockPrivate
static void gst_ks_clock_dispose (GObject * object);
static void gst_ks_clock_finalize (GObject * object);
-G_DEFINE_TYPE (GstKsClock, gst_ks_clock, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (GstKsClock, gst_ks_clock, G_TYPE_OBJECT);
static GstKsClockClass *parent_class = NULL;
@@ -63,8 +63,6 @@ gst_ks_clock_class_init (GstKsClockClass * klass)
parent_class = g_type_class_peek_parent (klass);
- g_type_class_add_private (klass, sizeof (GstKsClockPrivate));
-
gobject_class->dispose = gst_ks_clock_dispose;
gobject_class->finalize = gst_ks_clock_finalize;
}
@@ -74,8 +72,7 @@ gst_ks_clock_init (GstKsClock * self)
{
GstKsClockPrivate *priv;
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GST_TYPE_KS_CLOCK,
- GstKsClockPrivate);
+ self->priv = gst_ks_clock_get_instance_private (self);
priv = GST_KS_CLOCK_GET_PRIVATE (self);
diff --git a/sys/winks/gstksvideodevice.c b/sys/winks/gstksvideodevice.c
index ff1164385..964aed672 100644
--- a/sys/winks/gstksvideodevice.c
+++ b/sys/winks/gstksvideodevice.c
@@ -106,7 +106,8 @@ static void gst_ks_video_device_set_property (GObject * object, guint prop_id,
static void gst_ks_video_device_reset_caps (GstKsVideoDevice * self);
static guint gst_ks_video_device_get_frame_size (GstKsVideoDevice * self);
-G_DEFINE_TYPE (GstKsVideoDevice, gst_ks_video_device, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (GstKsVideoDevice, gst_ks_video_device,
+ G_TYPE_OBJECT);
static GstKsVideoDeviceClass *parent_class = NULL;
@@ -117,8 +118,6 @@ gst_ks_video_device_class_init (GstKsVideoDeviceClass * klass)
parent_class = g_type_class_peek_parent (klass);
- g_type_class_add_private (klass, sizeof (GstKsVideoDevicePrivate));
-
gobject_class->dispose = gst_ks_video_device_dispose;
gobject_class->get_property = gst_ks_video_device_get_property;
gobject_class->set_property = gst_ks_video_device_set_property;
@@ -139,8 +138,7 @@ gst_ks_video_device_init (GstKsVideoDevice * self)
{
GstKsVideoDevicePrivate *priv;
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GST_TYPE_KS_VIDEO_DEVICE,
- GstKsVideoDevicePrivate);
+ self->priv = gst_ks_video_device_get_instance_private (self);
priv = GST_KS_VIDEO_DEVICE_GET_PRIVATE (self);
priv->open = FALSE;
diff --git a/sys/winks/gstksvideosrc.c b/sys/winks/gstksvideosrc.c
index f1fc9738a..6ef0ba968 100644
--- a/sys/winks/gstksvideosrc.c
+++ b/sys/winks/gstksvideosrc.c
@@ -152,7 +152,7 @@ static GstFlowReturn gst_ks_video_src_create (GstPushSrc * pushsrc,
static GstBuffer *gst_ks_video_src_alloc_buffer (guint size, guint alignment,
gpointer user_data);
-G_DEFINE_TYPE (GstKsVideoSrc, gst_ks_video_src, GST_TYPE_PUSH_SRC);
+G_DEFINE_TYPE_WITH_PRIVATE (GstKsVideoSrc, gst_ks_video_src, GST_TYPE_PUSH_SRC);
static GstKsVideoSrcClass *parent_class = NULL;
@@ -164,8 +164,6 @@ gst_ks_video_src_class_init (GstKsVideoSrcClass * klass)
GstBaseSrcClass *gstbasesrc_class = GST_BASE_SRC_CLASS (klass);
GstPushSrcClass *gstpushsrc_class = GST_PUSH_SRC_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GstKsVideoSrcPrivate));
-
parent_class = g_type_class_peek_parent (klass);
gst_element_class_set_static_metadata (gstelement_class, "KsVideoSrc",
@@ -229,8 +227,7 @@ gst_ks_video_src_init (GstKsVideoSrc * self)
GstBaseSrc *basesrc = GST_BASE_SRC (self);
GstKsVideoSrcPrivate *priv;
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GST_TYPE_KS_VIDEO_SRC,
- GstKsVideoSrcPrivate);
+ self->priv = gst_ks_video_src_get_instance_private (self);
priv = GST_KS_VIDEO_SRC_GET_PRIVATE (self);
gst_base_src_set_live (basesrc, TRUE);