aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-02-17 20:57:05 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-04-01 16:15:39 +0800
commit1cf5eb7686a37fad462ecfc1ddd0afb9f59afaf1 (patch)
tree0f9c33c1f573ce7a467e1783bf92a0e4150bdc76 /src
parent93fdc771e51c327cad047b39a9be05f66d58fa21 (diff)
downloadgsoc2013-empathy-1cf5eb7686a37fad462ecfc1ddd0afb9f59afaf1.tar
gsoc2013-empathy-1cf5eb7686a37fad462ecfc1ddd0afb9f59afaf1.tar.gz
gsoc2013-empathy-1cf5eb7686a37fad462ecfc1ddd0afb9f59afaf1.tar.bz2
gsoc2013-empathy-1cf5eb7686a37fad462ecfc1ddd0afb9f59afaf1.tar.lz
gsoc2013-empathy-1cf5eb7686a37fad462ecfc1ddd0afb9f59afaf1.tar.xz
gsoc2013-empathy-1cf5eb7686a37fad462ecfc1ddd0afb9f59afaf1.tar.zst
gsoc2013-empathy-1cf5eb7686a37fad462ecfc1ddd0afb9f59afaf1.zip
empathy_call_window_reset_pipeline: start the new pipeline right away
This will allow us to display the video preview before the call is restarted.
Diffstat (limited to 'src')
-rw-r--r--src/empathy-call-window.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index a1ada3eff..ee0a74d5e 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -197,6 +197,9 @@ struct _EmpathyCallWindowPriv
gboolean sidebar_was_visible_before_fs;
gint original_width_before_fs;
gint original_height_before_fs;
+
+ /* TRUE if the call should be started when the pipeline is playing */
+ gboolean start_call_when_playing;
};
#define GET_PRIV(o) \
@@ -1056,6 +1059,9 @@ empathy_call_window_init (EmpathyCallWindow *self)
priv->fsnotifier = fs_element_added_notifier_new ();
fs_element_added_notifier_add (priv->fsnotifier, GST_BIN (priv->pipeline));
+ /* The call will be started as soon the pipeline is playing */
+ priv->start_call_when_playing = TRUE;
+
keyfile = g_key_file_new ();
filename = empathy_file_lookup ("element-properties", "data");
if (g_key_file_load_from_file (keyfile, filename, G_KEY_FILE_NONE, &error))
@@ -1545,6 +1551,9 @@ empathy_call_window_reset_pipeline (EmpathyCallWindow *self)
priv->funnel = NULL;
create_pipeline (self);
+ /* Call will be started when user will hit the 'redial' button */
+ priv->start_call_when_playing = FALSE;
+ gst_element_set_state (priv->pipeline, GST_STATE_PAUSED);
return TRUE;
}
@@ -2318,7 +2327,6 @@ 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))
{
@@ -2353,7 +2361,10 @@ empathy_call_window_bus_message (GstBus *bus, GstMessage *message,
gst_message_parse_state_changed (message, NULL, &newstate, NULL);
if (newstate == GST_STATE_PAUSED)
{
- start_call (self);
+ gst_element_set_state (priv->pipeline, GST_STATE_PLAYING);
+
+ if (priv->start_call_when_playing)
+ start_call (self);
}
}
break;