summaryrefslogtreecommitdiff
path: root/gst/gstpad.c
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2018-06-23 17:01:09 +0200
committerTim-Philipp Müller <tim@centricular.com>2018-06-24 12:49:14 +0200
commit2db8e3705fba5baf51c33baaeb16dd285c992fae (patch)
treee54e5d9dd17dd4d773d92031532c7ed8c2ea9d5d /gst/gstpad.c
parenteeb30c2a9775798c5327ee8fd532ea7f76d1f520 (diff)
downloadgstreamer-2db8e3705fba5baf51c33baaeb16dd285c992fae.tar.gz
Update for g_type_class_add_private() deprecation in recent GLib
https://gitlab.gnome.org/GNOME/glib/merge_requests/7
Diffstat (limited to 'gst/gstpad.c')
-rw-r--r--gst/gstpad.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gst/gstpad.c b/gst/gstpad.c
index 1297afcfac..5007c4c0ec 100644
--- a/gst/gstpad.c
+++ b/gst/gstpad.c
@@ -121,9 +121,6 @@ enum
/* FILL ME */
};
-#define GST_PAD_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_PAD, GstPadPrivate))
-
#define _PAD_PROBE_TYPE_ALL_BOTH_AND_FLUSH (GST_PAD_PROBE_TYPE_ALL_BOTH | GST_PAD_PROBE_TYPE_EVENT_FLUSH)
/* we have a pending and an active event on the pad. On source pads only the
@@ -320,7 +317,8 @@ gst_pad_link_get_name (GstPadLinkReturn ret)
}
#define gst_pad_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (GstPad, gst_pad, GST_TYPE_OBJECT, _do_init);
+G_DEFINE_TYPE_WITH_CODE (GstPad, gst_pad, GST_TYPE_OBJECT,
+ G_ADD_PRIVATE (GstPad) _do_init);
static void
gst_pad_class_init (GstPadClass * klass)
@@ -331,8 +329,6 @@ gst_pad_class_init (GstPadClass * klass)
gobject_class = G_OBJECT_CLASS (klass);
gstobject_class = GST_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GstPadPrivate));
-
gobject_class->dispose = gst_pad_dispose;
gobject_class->finalize = gst_pad_finalize;
gobject_class->set_property = gst_pad_set_property;
@@ -402,7 +398,7 @@ gst_pad_class_init (GstPadClass * klass)
static void
gst_pad_init (GstPad * pad)
{
- pad->priv = GST_PAD_GET_PRIVATE (pad);
+ pad->priv = gst_pad_get_instance_private (pad);
GST_PAD_DIRECTION (pad) = GST_PAD_UNKNOWN;