diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2018-06-23 17:01:09 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2018-06-24 12:49:14 +0200 |
commit | 2db8e3705fba5baf51c33baaeb16dd285c992fae (patch) | |
tree | e54e5d9dd17dd4d773d92031532c7ed8c2ea9d5d /libs/gst/base/gstcollectpads.c | |
parent | eeb30c2a9775798c5327ee8fd532ea7f76d1f520 (diff) |
Update for g_type_class_add_private() deprecation in recent GLib
https://gitlab.gnome.org/GNOME/glib/merge_requests/7
Diffstat (limited to 'libs/gst/base/gstcollectpads.c')
-rw-r--r-- | libs/gst/base/gstcollectpads.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libs/gst/base/gstcollectpads.c b/libs/gst/base/gstcollectpads.c index e27dce00d9..0c412aad3f 100644 --- a/libs/gst/base/gstcollectpads.c +++ b/libs/gst/base/gstcollectpads.c @@ -78,9 +78,6 @@ GST_DEBUG_CATEGORY_STATIC (collect_pads_debug); #define GST_CAT_DEFAULT collect_pads_debug -#define parent_class gst_collect_pads_parent_class -G_DEFINE_TYPE (GstCollectPads, gst_collect_pads, GST_TYPE_OBJECT); - struct _GstCollectDataPrivate { /* refcounting for struct, and destroy callback */ @@ -130,6 +127,9 @@ struct _GstCollectPadsPrivate gboolean pending_flush_stop; }; +#define parent_class gst_collect_pads_parent_class +G_DEFINE_TYPE_WITH_PRIVATE (GstCollectPads, gst_collect_pads, GST_TYPE_OBJECT); + static void gst_collect_pads_clear (GstCollectPads * pads, GstCollectData * data); static GstFlowReturn gst_collect_pads_chain (GstPad * pad, GstObject * parent, @@ -203,8 +203,6 @@ gst_collect_pads_class_init (GstCollectPadsClass * klass) { GObjectClass *gobject_class = (GObjectClass *) klass; - g_type_class_add_private (klass, sizeof (GstCollectPadsPrivate)); - GST_DEBUG_CATEGORY_INIT (collect_pads_debug, "collectpads", 0, "GstCollectPads"); @@ -214,9 +212,7 @@ gst_collect_pads_class_init (GstCollectPadsClass * klass) static void gst_collect_pads_init (GstCollectPads * pads) { - pads->priv = - G_TYPE_INSTANCE_GET_PRIVATE (pads, GST_TYPE_COLLECT_PADS, - GstCollectPadsPrivate); + pads->priv = gst_collect_pads_get_instance_private (pads); pads->data = NULL; pads->priv->cookie = 0; |