summaryrefslogtreecommitdiff
path: root/ext
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 00:17:26 +0200
commit6f46792f0f339abd33b9e0417f5d663d76e9610c (patch)
treef323ad63c618c6577d45510a145f4196f13124f7 /ext
parenta992a3b48bcb91f9efecccc89da64eab41774cae (diff)
downloadgstreamer-plugins-bad-6f46792f0f339abd33b9e0417f5d663d76e9610c.tar.gz
webrtc: Update for g_type_class_add_private() deprecation in recent GLib
Diffstat (limited to 'ext')
-rw-r--r--ext/webrtc/gstwebrtcbin.c7
-rw-r--r--ext/webrtc/gstwebrtcice.c18
-rw-r--r--ext/webrtc/icestream.c18
-rw-r--r--ext/webrtc/nicetransport.c20
4 files changed, 24 insertions, 39 deletions
diff --git a/ext/webrtc/gstwebrtcbin.c b/ext/webrtc/gstwebrtcbin.c
index 233cb99cb..95e6c962a 100644
--- a/ext/webrtc/gstwebrtcbin.c
+++ b/ext/webrtc/gstwebrtcbin.c
@@ -219,6 +219,7 @@ gst_webrtc_bin_pad_new (const gchar * name, GstPadDirection direction)
#define gst_webrtc_bin_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstWebRTCBin, gst_webrtc_bin, GST_TYPE_BIN,
+ G_ADD_PRIVATE (GstWebRTCBin)
GST_DEBUG_CATEGORY_INIT (gst_webrtc_bin_debug, "webrtcbin", 0,
"webrtcbin element"););
@@ -4025,8 +4026,6 @@ gst_webrtc_bin_class_init (GstWebRTCBinClass * klass)
GObjectClass *gobject_class = (GObjectClass *) klass;
GstElementClass *element_class = (GstElementClass *) klass;
- g_type_class_add_private (klass, sizeof (GstWebRTCBinPrivate));
-
element_class->request_new_pad = gst_webrtc_bin_request_new_pad;
element_class->release_pad = gst_webrtc_bin_release_pad;
element_class->change_state = gst_webrtc_bin_change_state;
@@ -4334,9 +4333,7 @@ _transport_free (GObject ** object)
static void
gst_webrtc_bin_init (GstWebRTCBin * webrtc)
{
- webrtc->priv =
- G_TYPE_INSTANCE_GET_PRIVATE ((webrtc), GST_TYPE_WEBRTC_BIN,
- GstWebRTCBinPrivate);
+ webrtc->priv = gst_webrtc_bin_get_instance_private (webrtc);
_start_thread (webrtc);
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);
diff --git a/ext/webrtc/icestream.c b/ext/webrtc/icestream.c
index dd4852468..e51af7044 100644
--- a/ext/webrtc/icestream.c
+++ b/ext/webrtc/icestream.c
@@ -27,12 +27,6 @@
#define GST_CAT_DEFAULT gst_webrtc_ice_stream_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
-#define gst_webrtc_ice_stream_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (GstWebRTCICEStream, gst_webrtc_ice_stream,
- GST_TYPE_OBJECT,
- GST_DEBUG_CATEGORY_INIT (gst_webrtc_ice_stream_debug,
- "webrtcicestream", 0, "webrtcicestream"););
-
enum
{
SIGNAL_0,
@@ -54,6 +48,12 @@ struct _GstWebRTCICEStreamPrivate
GList *transports;
};
+#define gst_webrtc_ice_stream_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstWebRTCICEStream, gst_webrtc_ice_stream,
+ GST_TYPE_OBJECT, G_ADD_PRIVATE (GstWebRTCICEStream)
+ GST_DEBUG_CATEGORY_INIT (gst_webrtc_ice_stream_debug,
+ "webrtcicestream", 0, "webrtcicestream"););
+
static void
gst_webrtc_ice_stream_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
@@ -201,8 +201,6 @@ gst_webrtc_ice_stream_class_init (GstWebRTCICEStreamClass * klass)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
- g_type_class_add_private (klass, sizeof (GstWebRTCICEStreamPrivate));
-
gobject_class->constructed = gst_webrtc_ice_stream_constructed;
gobject_class->get_property = gst_webrtc_ice_stream_get_property;
gobject_class->set_property = gst_webrtc_ice_stream_set_property;
@@ -226,9 +224,7 @@ gst_webrtc_ice_stream_class_init (GstWebRTCICEStreamClass * klass)
static void
gst_webrtc_ice_stream_init (GstWebRTCICEStream * ice)
{
- ice->priv =
- G_TYPE_INSTANCE_GET_PRIVATE ((ice), GST_TYPE_WEBRTC_ICE_STREAM,
- GstWebRTCICEStreamPrivate);
+ ice->priv = gst_webrtc_ice_stream_get_instance_private (ice);
}
GstWebRTCICEStream *
diff --git a/ext/webrtc/nicetransport.c b/ext/webrtc/nicetransport.c
index 2365cfd52..5e7f30e71 100644
--- a/ext/webrtc/nicetransport.c
+++ b/ext/webrtc/nicetransport.c
@@ -27,13 +27,6 @@
#define GST_CAT_DEFAULT gst_webrtc_nice_transport_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
-#define gst_webrtc_nice_transport_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (GstWebRTCNiceTransport, gst_webrtc_nice_transport,
- GST_TYPE_WEBRTC_ICE_TRANSPORT,
- GST_DEBUG_CATEGORY_INIT (gst_webrtc_nice_transport_debug,
- "webrtcnicetransport", 0, "webrtcnicetransport");
- );
-
enum
{
SIGNAL_0,
@@ -53,6 +46,13 @@ struct _GstWebRTCNiceTransportPrivate
gboolean running;
};
+#define gst_webrtc_nice_transport_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstWebRTCNiceTransport, gst_webrtc_nice_transport,
+ GST_TYPE_WEBRTC_ICE_TRANSPORT, G_ADD_PRIVATE (GstWebRTCNiceTransport)
+ GST_DEBUG_CATEGORY_INIT (gst_webrtc_nice_transport_debug,
+ "webrtcnicetransport", 0, "webrtcnicetransport");
+ );
+
static NiceComponentType
_gst_component_to_nice (GstWebRTCICEComponent component)
{
@@ -236,8 +236,6 @@ gst_webrtc_nice_transport_class_init (GstWebRTCNiceTransportClass * klass)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
- g_type_class_add_private (klass, sizeof (GstWebRTCNiceTransportPrivate));
-
gobject_class->constructed = gst_webrtc_nice_transport_constructed;
gobject_class->get_property = gst_webrtc_nice_transport_get_property;
gobject_class->set_property = gst_webrtc_nice_transport_set_property;
@@ -254,9 +252,7 @@ gst_webrtc_nice_transport_class_init (GstWebRTCNiceTransportClass * klass)
static void
gst_webrtc_nice_transport_init (GstWebRTCNiceTransport * nice)
{
- nice->priv =
- G_TYPE_INSTANCE_GET_PRIVATE ((nice), GST_TYPE_WEBRTC_NICE_TRANSPORT,
- GstWebRTCNiceTransportPrivate);
+ nice->priv = gst_webrtc_nice_transport_get_instance_private (nice);
}
GstWebRTCNiceTransport *