diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-12-03 01:39:22 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-04-01 16:15:38 +0800 |
commit | cbf57d8ce685d1c959f4c207157dd327155d636f (patch) | |
tree | fe854cfd6292990e96ebebdfe142ca5917671113 /src/empathy-call-window.c | |
parent | cd06c1463688a3684fc17d474bf227f1a984b665 (diff) | |
download | gsoc2013-empathy-cbf57d8ce685d1c959f4c207157dd327155d636f.tar gsoc2013-empathy-cbf57d8ce685d1c959f4c207157dd327155d636f.tar.gz gsoc2013-empathy-cbf57d8ce685d1c959f4c207157dd327155d636f.tar.bz2 gsoc2013-empathy-cbf57d8ce685d1c959f4c207157dd327155d636f.tar.lz gsoc2013-empathy-cbf57d8ce685d1c959f4c207157dd327155d636f.tar.xz gsoc2013-empathy-cbf57d8ce685d1c959f4c207157dd327155d636f.tar.zst gsoc2013-empathy-cbf57d8ce685d1c959f4c207157dd327155d636f.zip |
recycle the audio input gst element
Diffstat (limited to 'src/empathy-call-window.c')
-rw-r--r-- | src/empathy-call-window.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index a1c7c625e..381646f1d 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -520,9 +520,6 @@ empathy_call_window_mic_volume_changed_cb (GtkAdjustment *adj, EmpathyCallWindowPriv *priv = GET_PRIV (self); gdouble volume; - if (priv->audio_input == NULL) - return; - volume = gtk_adjustment_get_value (adj)/100.0; /* Don't store the volume because of muting */ @@ -633,17 +630,15 @@ create_video_input (EmpathyCallWindow *self) } static void -initialize_input_elements (GstBus *bus, EmpathyCallWindow *self) +create_audio_input (EmpathyCallWindow *self) { EmpathyCallWindowPriv *priv = GET_PRIV (self); + g_assert (priv->audio_input == NULL); priv->audio_input = empathy_audio_src_new (); gst_object_ref (priv->audio_input); gst_object_sink (priv->audio_input); - /* The preview widget is initialized when the "video preview" button - * is activated */ - empathy_signal_connect_weak (priv->audio_input, "peak-level-changed", G_CALLBACK (empathy_call_window_audio_input_level_changed_cb), G_OBJECT (self)); @@ -928,7 +923,6 @@ create_pipeline (EmpathyCallWindow *self) empathy_call_window_bus_message, self); create_video_output_widget (bus, self); - initialize_input_elements (bus, self); g_object_unref (bus); } @@ -1022,6 +1016,7 @@ empathy_call_window_init (EmpathyCallWindow *self) priv->self_user_output_hbox); create_pipeline (self); + create_audio_input (self); create_audio_output (self); create_video_input (self); @@ -1502,10 +1497,6 @@ empathy_call_window_reset_pipeline (EmpathyCallWindow *self) g_object_unref (priv->pipeline); priv->pipeline = NULL; - if (priv->audio_input != NULL) - g_object_unref (priv->audio_input); - priv->audio_input = NULL; - g_signal_handlers_disconnect_by_func (priv->audio_input_adj, empathy_call_window_mic_volume_changed_cb, self); @@ -2649,9 +2640,6 @@ empathy_call_window_mic_toggled_cb (GtkToggleToolButton *toggle, EmpathyCallWindowPriv *priv = GET_PRIV (window); gboolean active; - if (priv->audio_input == NULL) - return; - active = (gtk_toggle_tool_button_get_active (toggle)); if (active) |