]> git.0d.be Git - empathy.git/blobdiff - src/empathy-call-window.c
roster-window: fix crash if empathy_chatroom_manager_find() failed
[empathy.git] / src / empathy-call-window.c
index 7fe365f304e3926be117bb1daac5a29684b22187..a54346c6de9d87b451a7c26ef0354dfab267ad2b 100644 (file)
@@ -30,6 +30,7 @@
 #include <tp-account-widgets/tpaw-images.h>
 #include <tp-account-widgets/tpaw-pixbuf-utils.h>
 #include <tp-account-widgets/tpaw-utils.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
 
 #include "empathy-about-dialog.h"
 #include "empathy-audio-sink.h"
@@ -1509,8 +1510,9 @@ empathy_call_window_incoming_call_response_cb (GtkDialog *dialog,
   switch (response_id)
     {
       case GTK_RESPONSE_ACCEPT:
-        tp_channel_dispatch_operation_handle_with_async (
-            self->priv->pending_cdo, EMPATHY_CALL_BUS_NAME, NULL, NULL);
+        tp_channel_dispatch_operation_handle_with_time_async (
+            self->priv->pending_cdo, EMPATHY_CALL_TP_BUS_NAME,
+            empathy_get_current_action_time (), NULL, NULL);
 
         tp_clear_object (&self->priv->pending_cdo);
         tp_clear_object (&self->priv->pending_channel);
@@ -2817,11 +2819,7 @@ empathy_call_window_get_video_sink_pad (EmpathyCallWindow *self)
   if (priv->funnel == NULL)
     {
       output = priv->video_output_sink;
-#ifdef HAVE_GST1
       priv->funnel = gst_element_factory_make ("funnel", NULL);
-#else
-      priv->funnel = gst_element_factory_make ("fsfunnel", NULL);
-#endif
 
       if (!priv->funnel)
         {
@@ -2861,11 +2859,7 @@ empathy_call_window_get_video_sink_pad (EmpathyCallWindow *self)
           goto error_output_added;
         }
     }
-#ifdef HAVE_GST1
   pad = gst_element_get_request_pad (priv->funnel, "sink_%u");
-#else
-  pad = gst_element_get_request_pad (priv->funnel, "sink%d");
-#endif
 
   if (!pad)
     g_warning ("Could not get request pad from funnel");
@@ -3346,7 +3340,6 @@ empathy_call_window_check_video_cb (gpointer data)
 }
 
 /* Called from the streaming thread */
-#ifdef HAVE_GST1
 static GstPadProbeReturn
 empathy_call_window_video_probe_cb (GstPad *pad,
     GstPadProbeInfo *info,
@@ -3366,29 +3359,6 @@ empathy_call_window_video_probe_cb (GstPad *pad,
 
   return GST_PAD_PROBE_OK;
 }
-#else
-static gboolean
-empathy_call_window_video_probe_cb (GstPad *pad,
-    GstMiniObject *mini_obj,
-    EmpathyCallWindow *self)
-{
-  /* Ignore events */
-  if (GST_IS_EVENT (mini_obj))
-    return TRUE;
-
-  if (G_UNLIKELY (!self->priv->got_video))
-    {
-      /* show the remote video */
-      g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
-          empathy_call_window_show_video_output_cb,
-          g_object_ref (self), g_object_unref);
-
-      self->priv->got_video = TRUE;
-    }
-
-  return TRUE;
-}
-#endif
 
 /* Called from the streaming thread */
 static gboolean
@@ -3415,14 +3385,10 @@ empathy_call_window_src_added_cb (EmpathyCallHandler *handler,
         g_idle_add (empathy_call_window_show_video_output_cb, self);
         pad = empathy_call_window_get_video_sink_pad (self);
 
-#ifdef HAVE_GST1
         gst_pad_add_probe (src,
             GST_PAD_PROBE_TYPE_BUFFER | GST_PAD_PROBE_TYPE_BUFFER_LIST,
             empathy_call_window_video_probe_cb, self, NULL);
-#else
-        gst_pad_add_data_probe (src,
-            G_CALLBACK (empathy_call_window_video_probe_cb), self);
-#endif
+
         if (priv->got_video_src > 0)
           g_source_remove (priv->got_video_src);
         priv->got_video_src = g_timeout_add_seconds (1,
@@ -3601,11 +3567,7 @@ empathy_call_window_content_added_cb (EmpathyCallHandler *handler,
       case FS_MEDIA_TYPE_VIDEO:
         if (priv->video_tee != NULL)
           {
-#ifdef HAVE_GST1
             pad = gst_element_get_request_pad (priv->video_tee, "src_%u");
-#else
-            pad = gst_element_get_request_pad (priv->video_tee, "src%d");
-#endif
             if (GST_PAD_LINK_FAILED (gst_pad_link (pad, sink)))
               {
                 g_warning ("Could not link video source input pipeline");