diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2018-06-24 00:17:26 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2018-06-24 00:17:26 +0200 |
commit | 6f46792f0f339abd33b9e0417f5d663d76e9610c (patch) | |
tree | f323ad63c618c6577d45510a145f4196f13124f7 /ext/webrtc/gstwebrtcice.c | |
parent | a992a3b48bcb91f9efecccc89da64eab41774cae (diff) | |
download | gstreamer-plugins-bad-6f46792f0f339abd33b9e0417f5d663d76e9610c.tar.gz |
webrtc: Update for g_type_class_add_private() deprecation in recent GLib
Diffstat (limited to 'ext/webrtc/gstwebrtcice.c')
-rw-r--r-- | ext/webrtc/gstwebrtcice.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/ext/webrtc/gstwebrtcice.c b/ext/webrtc/gstwebrtcice.c index ce30d3b44..195a7931a 100644 --- a/ext/webrtc/gstwebrtcice.c +++ b/ext/webrtc/gstwebrtcice.c @@ -35,12 +35,6 @@ #define GST_CAT_DEFAULT gst_webrtc_ice_debug GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT); -#define gst_webrtc_ice_parent_class parent_class -G_DEFINE_TYPE_WITH_CODE (GstWebRTCICE, gst_webrtc_ice, - GST_TYPE_OBJECT, - GST_DEBUG_CATEGORY_INIT (gst_webrtc_ice_debug, "webrtcice", 0, "webrtcice"); - ); - GQuark gst_webrtc_ice_error_quark (void) { @@ -80,6 +74,12 @@ struct _GstWebRTCICEPrivate GCond cond; }; +#define gst_webrtc_ice_parent_class parent_class +G_DEFINE_TYPE_WITH_CODE (GstWebRTCICE, gst_webrtc_ice, + GST_TYPE_OBJECT, G_ADD_PRIVATE (GstWebRTCICE) + GST_DEBUG_CATEGORY_INIT (gst_webrtc_ice_debug, "webrtcice", 0, "webrtcice"); + ); + static gboolean _unlock_pc_thread (GMutex * lock) { @@ -815,8 +815,6 @@ gst_webrtc_ice_class_init (GstWebRTCICEClass * klass) { GObjectClass *gobject_class = (GObjectClass *) klass; - g_type_class_add_private (klass, sizeof (GstWebRTCICEPrivate)); - gobject_class->get_property = gst_webrtc_ice_get_property; gobject_class->set_property = gst_webrtc_ice_set_property; gobject_class->finalize = gst_webrtc_ice_finalize; @@ -860,9 +858,7 @@ gst_webrtc_ice_class_init (GstWebRTCICEClass * klass) static void gst_webrtc_ice_init (GstWebRTCICE * ice) { - ice->priv = - G_TYPE_INSTANCE_GET_PRIVATE ((ice), GST_TYPE_WEBRTC_ICE, - GstWebRTCICEPrivate); + ice->priv = gst_webrtc_ice_get_instance_private (ice); g_mutex_init (&ice->priv->lock); g_cond_init (&ice->priv->cond); |