aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-25 00:58:43 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-28 00:33:43 +0800
commit76a44dbf5a997548cc5e2377041d5081369a4c8a (patch)
treef372c9eba2233725146f1f6dc834c44cd5e94cbb
parentfe97bdb9c202f40f57b1438df9d0045fad8f40c8 (diff)
downloadgsoc2013-empathy-76a44dbf5a997548cc5e2377041d5081369a4c8a.tar
gsoc2013-empathy-76a44dbf5a997548cc5e2377041d5081369a4c8a.tar.gz
gsoc2013-empathy-76a44dbf5a997548cc5e2377041d5081369a4c8a.tar.bz2
gsoc2013-empathy-76a44dbf5a997548cc5e2377041d5081369a4c8a.tar.lz
gsoc2013-empathy-76a44dbf5a997548cc5e2377041d5081369a4c8a.tar.xz
gsoc2013-empathy-76a44dbf5a997548cc5e2377041d5081369a4c8a.tar.zst
gsoc2013-empathy-76a44dbf5a997548cc5e2377041d5081369a4c8a.zip
stop sending video when 'camera off' or 'preview' is enabled
-rw-r--r--src/empathy-call-window.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index eda10f131..02509a564 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -740,8 +740,8 @@ disable_camera (EmpathyCallWindow *self)
{
EmpathyCallWindowPriv *priv = GET_PRIV (self);
- priv->camera_state = CAMERA_STATE_OFF;
display_video_preview (self, FALSE);
+ empathy_call_window_set_send_video (self, FALSE);
block_camera_control_signals (self);
gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (
@@ -749,6 +749,8 @@ disable_camera (EmpathyCallWindow *self)
gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (
priv->tool_button_camera_preview), FALSE);
unblock_camera_control_signals (self);
+
+ priv->camera_state = CAMERA_STATE_OFF;
}
static void
@@ -782,7 +784,10 @@ enable_preview (EmpathyCallWindow *self)
{
EmpathyCallWindowPriv *priv = GET_PRIV (self);
- priv->camera_state = CAMERA_STATE_PREVIEW;
+ if (priv->camera_state == CAMERA_STATE_ON)
+ /* preview is already displayed so we just have to stop sending */
+ empathy_call_window_set_send_video (self, FALSE);
+
display_video_preview (self, TRUE);
block_camera_control_signals (self);
@@ -791,6 +796,8 @@ enable_preview (EmpathyCallWindow *self)
gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (
priv->tool_button_camera_on), FALSE);
unblock_camera_control_signals (self);
+
+ priv->camera_state = CAMERA_STATE_PREVIEW;
}
static void
@@ -824,7 +831,6 @@ enable_camera (EmpathyCallWindow *self)
{
EmpathyCallWindowPriv *priv = GET_PRIV (self);
- priv->camera_state = CAMERA_STATE_ON;
empathy_call_window_set_send_video (self, TRUE);
block_camera_control_signals (self);
@@ -833,6 +839,8 @@ enable_camera (EmpathyCallWindow *self)
gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (
priv->tool_button_camera_preview), FALSE);
unblock_camera_control_signals (self);
+
+ priv->camera_state = CAMERA_STATE_ON;
}
static void