[empathy] Reset all the necessary elements when switching cameras



commit 7684cbad9c0b6f0ac8b9640b1b74e0dafc058e84
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date:   Thu Aug 18 18:14:27 2011 +0100

    Reset all the necessary elements when switching cameras
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656579

 src/empathy-camera-menu.c |    2 ++
 src/empathy-video-src.c   |    4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/empathy-camera-menu.c b/src/empathy-camera-menu.c
index 6a7d20c..a572538 100644
--- a/src/empathy-camera-menu.c
+++ b/src/empathy-camera-menu.c
@@ -140,7 +140,9 @@ empathy_camera_menu_activate_cb (GtkAction *action,
 
   device = gtk_action_get_name (action);
 
+  empathy_call_window_play_camera (self->priv->window, FALSE);
   empathy_video_src_change_device (video, device);
+  empathy_call_window_play_camera (self->priv->window, TRUE);
 }
 
 static void
diff --git a/src/empathy-video-src.c b/src/empathy-video-src.c
index ceb3442..25d257f 100644
--- a/src/empathy-video-src.c
+++ b/src/empathy-video-src.c
@@ -370,9 +370,9 @@ empathy_video_src_change_device (EmpathyGstVideoSrc *self,
 
   gst_element_get_state (priv->src, &state, NULL, 0);
 
-  gst_element_set_state (priv->src, GST_STATE_NULL);
+  g_return_if_fail (state == GST_STATE_NULL);
+
   g_object_set (priv->src, "device", device, NULL);
-  gst_element_set_state (priv->src, state);
 }
 
 gchar *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]