[empathy: 2/23] audio-src: allow changing the audio source element



commit 8a937c926c79f24fdb36574cb036c9fc09532f3f
Author: Jonny Lamb <jonny lamb collabora co uk>
Date:   Tue Jul 26 10:32:34 2011 +0100

    audio-src: allow changing the audio source element
    
    Better than nothing, right?
    
    Signed-off-by: Jonny Lamb <jonny lamb collabora co uk>

 src/empathy-audio-src.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/empathy-audio-src.c b/src/empathy-audio-src.c
index b721773..252e8aa 100644
--- a/src/empathy-audio-src.c
+++ b/src/empathy-audio-src.c
@@ -92,6 +92,7 @@ empathy_audio_src_init (EmpathyGstAudioSrc *obj)
 {
   EmpathyGstAudioSrcPrivate *priv = EMPATHY_GST_AUDIO_SRC_GET_PRIVATE (obj);
   GstPad *ghost, *src;
+  const gchar *src_element;
 
   priv->peak_level = -G_MAXDOUBLE;
   priv->lock = g_mutex_new ();
@@ -100,7 +101,11 @@ empathy_audio_src_init (EmpathyGstAudioSrc *obj)
   g_signal_connect (priv->notifier, "element-added",
     G_CALLBACK (empathy_audio_src_element_added_cb), obj);
 
-  priv->src = gst_element_factory_make ("pulsesrc", NULL);
+  src_element = g_getenv ("EMPATHY_AUDIO_SRC");
+  if (src_element == NULL)
+    src_element = "pulsesrc";
+
+  priv->src = gst_element_factory_make (src_element, NULL);
   gst_bin_add (GST_BIN (obj), priv->src);
 
   fs_element_added_notifier_add (priv->notifier, GST_BIN (priv->src));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]