diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-12-03 01:32:35 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-04-01 16:15:38 +0800 |
commit | cd06c1463688a3684fc17d474bf227f1a984b665 (patch) | |
tree | 0a20e0a34ed9cd1c017a9fad20307115e7a53ba9 /src/empathy-call-window.c | |
parent | bfa6966c0a677b418a14b5864326b175d926036c (diff) | |
download | gsoc2013-empathy-cd06c1463688a3684fc17d474bf227f1a984b665.tar gsoc2013-empathy-cd06c1463688a3684fc17d474bf227f1a984b665.tar.gz gsoc2013-empathy-cd06c1463688a3684fc17d474bf227f1a984b665.tar.bz2 gsoc2013-empathy-cd06c1463688a3684fc17d474bf227f1a984b665.tar.lz gsoc2013-empathy-cd06c1463688a3684fc17d474bf227f1a984b665.tar.xz gsoc2013-empathy-cd06c1463688a3684fc17d474bf227f1a984b665.tar.zst gsoc2013-empathy-cd06c1463688a3684fc17d474bf227f1a984b665.zip |
recycle the video input gst element
There is no point to recreate it for each call.
Diffstat (limited to 'src/empathy-call-window.c')
-rw-r--r-- | src/empathy-call-window.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 56d3ab285..a1c7c625e 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -622,13 +622,20 @@ create_audio_output (EmpathyCallWindow *self) } static void -initialize_input_elements (GstBus *bus, EmpathyCallWindow *self) +create_video_input (EmpathyCallWindow *self) { EmpathyCallWindowPriv *priv = GET_PRIV (self); + g_assert (priv->video_input == NULL); priv->video_input = empathy_video_src_new (); gst_object_ref (priv->video_input); gst_object_sink (priv->video_input); +} + +static void +initialize_input_elements (GstBus *bus, EmpathyCallWindow *self) +{ + EmpathyCallWindowPriv *priv = GET_PRIV (self); priv->audio_input = empathy_audio_src_new (); gst_object_ref (priv->audio_input); @@ -1016,6 +1023,7 @@ empathy_call_window_init (EmpathyCallWindow *self) create_pipeline (self); create_audio_output (self); + create_video_input (self); priv->fsnotifier = fs_element_added_notifier_new (); fs_element_added_notifier_add (priv->fsnotifier, GST_BIN (priv->pipeline)); @@ -1494,10 +1502,6 @@ empathy_call_window_reset_pipeline (EmpathyCallWindow *self) g_object_unref (priv->pipeline); priv->pipeline = NULL; - if (priv->video_input != NULL) - g_object_unref (priv->video_input); - priv->video_input = NULL; - if (priv->audio_input != NULL) g_object_unref (priv->audio_input); priv->audio_input = NULL; |