]> git.0d.be Git - empathy.git/commitdiff
Wait that the pipeline has been started before enabling camera
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 11 Jan 2010 14:58:59 +0000 (14:58 +0000)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 11 Jan 2010 15:23:56 +0000 (15:23 +0000)
The v4l2src element doesn't work properly if the pipeline has not been started
(#605549).

src/empathy-call-window.c

index 564d904caf0121cf8e6137d67ed4b175e32feafd..6b372d78a5aace9851ea7120ea4477bd0325042f 100644 (file)
@@ -1231,17 +1231,13 @@ empathy_call_window_constructed (GObject *object)
   empathy_call_window_setup_avatars (self, priv->handler);
   empathy_call_window_set_state_connecting (self);
 
-  if (empathy_call_handler_has_initial_video (priv->handler))
-    {
-      /* Enable 'send video' buttons and display the preview */
-      gtk_toggle_tool_button_set_active (
-          GTK_TOGGLE_TOOL_BUTTON (priv->tool_button_camera_on), TRUE);
-    }
-  else
+  if (!empathy_call_handler_has_initial_video (priv->handler))
     {
       gtk_toggle_tool_button_set_active (
           GTK_TOGGLE_TOOL_BUTTON (priv->tool_button_camera_off), TRUE);
     }
+  /* If call has InitialVideo, the preview will be started once the call has
+   * been started (start_call()). */
 }
 
 static void empathy_call_window_dispose (GObject *object);
@@ -2060,6 +2056,13 @@ start_call (EmpathyCallWindow *self)
   priv->call_started = TRUE;
   empathy_call_handler_start_call (priv->handler);
   gst_element_set_state (priv->pipeline, GST_STATE_PLAYING);
+
+  if (empathy_call_handler_has_initial_video (priv->handler))
+    {
+      /* Enable 'send video' buttons and display the preview */
+      gtk_toggle_tool_button_set_active (
+          GTK_TOGGLE_TOOL_BUTTON (priv->tool_button_camera_on), TRUE);
+    }
 }
 
 static gboolean