mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
webrtc: Update for g_type_class_add_private() deprecation in recent GLib
This commit is contained in:
parent
a992a3b48b
commit
6f46792f0f
4 changed files with 24 additions and 39 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 *
|
||||
|
|
|
@ -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 *
|
||||
|
|
Loading…
Reference in a new issue