static void
gst_webrtc_nice_stream_constructed (GObject * object)
{
- GstWebRTCNiceStream *stream = GST_WEBRTC_NICE_STREAM (object);
+ GstWebRTCNiceStream *stream;
NiceAgent *agent;
- GstWebRTCNice *ice = g_weak_ref_get (&stream->priv->ice_weak);
+ GstWebRTCNice *ice;
+
+ G_OBJECT_CLASS (parent_class)->constructed (object);
+
+ stream = GST_WEBRTC_NICE_STREAM (object);
+ ice = g_weak_ref_get (&stream->priv->ice_weak);
+
g_assert (ice != NULL);
g_object_get (ice, "agent", &agent, NULL);
g_object_unref (agent);
gst_object_unref (ice);
-
- G_OBJECT_CLASS (parent_class)->constructed (object);
}
static gboolean
{
GstWebRTCNiceTransport *nice = GST_WEBRTC_NICE_TRANSPORT (object);
NiceAgent *agent;
- GstWebRTCNice *webrtc_ice;
+ GstWebRTCNice *webrtc_ice = NULL;
- GWeakRef ice_weak;
- g_object_get (GST_WEBRTC_NICE_STREAM (nice->stream), "ice", &ice_weak, NULL);
- webrtc_ice = g_weak_ref_get (&ice_weak);
+ g_object_get (nice->stream, "ice", &webrtc_ice, NULL);
if (webrtc_ice) {
g_object_get (webrtc_ice, "agent", &agent, NULL);
NiceAgent *agent = NULL;
GPtrArray *sockets;
guint i;
- GstWebRTCNice *webrtc_ice;
+ GstWebRTCNice *webrtc_ice = NULL;
- GWeakRef ice_weak;
- g_object_get (GST_WEBRTC_NICE_STREAM (nice->stream), "ice", &ice_weak, NULL);
- webrtc_ice = g_weak_ref_get (&ice_weak);
+ g_object_get (nice->stream, "ice", &webrtc_ice, NULL);
g_assert (webrtc_ice != NULL);
static void
gst_webrtc_nice_transport_constructed (GObject * object)
{
- GstWebRTCNiceTransport *nice = GST_WEBRTC_NICE_TRANSPORT (object);
- GstWebRTCICETransport *ice = GST_WEBRTC_ICE_TRANSPORT (object);
- NiceComponentType component = _gst_component_to_nice (ice->component);
+ GstWebRTCNiceTransport *nice;
+ GstWebRTCICETransport *ice;
+ NiceComponentType component;
gboolean controlling_mode;
guint our_stream_id;
NiceAgent *agent;
- GstWebRTCNice *webrtc_ice;
+ GstWebRTCNice *webrtc_ice = NULL;
+
+ G_OBJECT_CLASS (parent_class)->constructed (object);
- GWeakRef ice_weak;
- g_object_get (GST_WEBRTC_NICE_STREAM (nice->stream), "ice", &ice_weak, NULL);
- webrtc_ice = g_weak_ref_get (&ice_weak);
+ nice = GST_WEBRTC_NICE_TRANSPORT (object);
+ ice = GST_WEBRTC_ICE_TRANSPORT (object);
+ component = _gst_component_to_nice (ice->component);
+ g_object_get (nice->stream, "ice", &webrtc_ice, "stream-id", &our_stream_id,
+ NULL);
g_assert (webrtc_ice != NULL);
- g_object_get (nice->stream, "stream-id", &our_stream_id, NULL);
g_object_get (webrtc_ice, "agent", &agent, NULL);
g_object_get (agent, "controlling-mode", &controlling_mode, NULL);
g_object_unref (agent);
gst_object_unref (webrtc_ice);
-
- G_OBJECT_CLASS (parent_class)->constructed (object);
}
static void