aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-11-21 18:43:51 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-11-23 17:59:52 +0800
commitd15f750dcfb31415cb6d8d39122593863e7fcd37 (patch)
tree93f0239c67432c62c1867432e04abc359b85b4ea /src
parent24882e924af2c0d8576970440d92ac5b4eb25bc8 (diff)
downloadgsoc2013-empathy-d15f750dcfb31415cb6d8d39122593863e7fcd37.tar
gsoc2013-empathy-d15f750dcfb31415cb6d8d39122593863e7fcd37.tar.gz
gsoc2013-empathy-d15f750dcfb31415cb6d8d39122593863e7fcd37.tar.bz2
gsoc2013-empathy-d15f750dcfb31415cb6d8d39122593863e7fcd37.tar.lz
gsoc2013-empathy-d15f750dcfb31415cb6d8d39122593863e7fcd37.tar.xz
gsoc2013-empathy-d15f750dcfb31415cb6d8d39122593863e7fcd37.tar.zst
gsoc2013-empathy-d15f750dcfb31415cb6d8d39122593863e7fcd37.zip
factor out empathy_call_window_change_webcam()
https://bugzilla.gnome.org/show_bug.cgi?id=664459
Diffstat (limited to 'src')
-rw-r--r--src/empathy-call-window.c13
-rw-r--r--src/empathy-call-window.h3
-rw-r--r--src/empathy-camera-menu.c4
3 files changed, 17 insertions, 3 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 732f45e8a..6e2df7961 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -4175,3 +4175,16 @@ empathy_call_window_get_video_src (EmpathyCallWindow *self)
{
return EMPATHY_GST_VIDEO_SRC (self->priv->video_input);
}
+
+void
+empathy_call_window_change_webcam (EmpathyCallWindow *self,
+ const gchar *device)
+{
+ EmpathyGstVideoSrc *video;
+
+ video = empathy_call_window_get_video_src (self);
+
+ empathy_call_window_play_camera (self, FALSE);
+ empathy_video_src_change_device (video, device);
+ empathy_call_window_play_camera (self, TRUE);
+}
diff --git a/src/empathy-call-window.h b/src/empathy-call-window.h
index 81cf170ae..abaae2763 100644
--- a/src/empathy-call-window.h
+++ b/src/empathy-call-window.h
@@ -78,6 +78,9 @@ EmpathyGstVideoSrc *empathy_call_window_get_video_src (EmpathyCallWindow *window
void empathy_call_window_play_camera (EmpathyCallWindow *self,
gboolean play);
+void empathy_call_window_change_webcam (EmpathyCallWindow *self,
+ const gchar *device);
+
G_END_DECLS
#endif /* #ifndef __EMPATHY_CALL_WINDOW_H__*/
diff --git a/src/empathy-camera-menu.c b/src/empathy-camera-menu.c
index cee11d759..9633d84fa 100644
--- a/src/empathy-camera-menu.c
+++ b/src/empathy-camera-menu.c
@@ -146,9 +146,7 @@ empathy_camera_menu_activate_cb (GtkAction *action,
if (!tp_strdiff (device, current_device))
goto out;
- 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);
+ empathy_call_window_change_webcam (self->priv->window, device);
out:
g_free (current_device);