aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-12-03 01:15:27 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-04-01 16:15:38 +0800
commit688514d4d5cca5ad23d6b9c54506252089ac5b49 (patch)
treede2c9351976743b8fbd04c81ee0c7b27dab6765e /src
parente274163d0c1adafbf989096a3637d57867e19e23 (diff)
downloadgsoc2013-empathy-688514d4d5cca5ad23d6b9c54506252089ac5b49.tar
gsoc2013-empathy-688514d4d5cca5ad23d6b9c54506252089ac5b49.tar.gz
gsoc2013-empathy-688514d4d5cca5ad23d6b9c54506252089ac5b49.tar.bz2
gsoc2013-empathy-688514d4d5cca5ad23d6b9c54506252089ac5b49.tar.lz
gsoc2013-empathy-688514d4d5cca5ad23d6b9c54506252089ac5b49.tar.xz
gsoc2013-empathy-688514d4d5cca5ad23d6b9c54506252089ac5b49.tar.zst
gsoc2013-empathy-688514d4d5cca5ad23d6b9c54506252089ac5b49.zip
recycle the audio output gst element
There is no point to create a new one for each call.
Diffstat (limited to 'src')
-rw-r--r--src/empathy-call-window.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 4a6301766..f1d3e7be3 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -608,7 +608,14 @@ initialize_output_elements (GstBus *bus, EmpathyCallWindow *self)
GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK);
g_signal_connect (G_OBJECT (priv->video_output), "button-press-event",
G_CALLBACK (empathy_call_window_video_button_press_cb), self);
+}
+
+static void
+create_audio_output (EmpathyCallWindow *self)
+{
+ EmpathyCallWindowPriv *priv = GET_PRIV (self);
+ g_assert (priv->audio_output == NULL);
priv->audio_output = empathy_audio_sink_new ();
gst_object_ref (priv->audio_output);
gst_object_sink (priv->audio_output);
@@ -1008,6 +1015,7 @@ empathy_call_window_init (EmpathyCallWindow *self)
priv->self_user_output_hbox);
create_pipeline (self);
+ create_audio_output (self);
priv->fsnotifier = fs_element_added_notifier_new ();
fs_element_added_notifier_add (priv->fsnotifier, GST_BIN (priv->pipeline));
@@ -1497,10 +1505,6 @@ empathy_call_window_reset_pipeline (EmpathyCallWindow *self)
g_signal_handlers_disconnect_by_func (priv->audio_input_adj,
empathy_call_window_mic_volume_changed_cb, self);
- if (priv->audio_output != NULL)
- g_object_unref (priv->audio_output);
- priv->audio_output = NULL;
-
if (priv->video_tee != NULL)
g_object_unref (priv->video_tee);
priv->video_tee = NULL;