aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2011-07-26 17:32:34 +0800
committerJonny Lamb <jonny.lamb@collabora.co.uk>2011-07-28 16:34:47 +0800
commit8a937c926c79f24fdb36574cb036c9fc09532f3f (patch)
tree592c3e772e3cb036a04320b2b24c177acd44eb86 /src
parent6146181a2cbcbcd3e5b631a9517441fefb9c4fcc (diff)
downloadgsoc2013-empathy-8a937c926c79f24fdb36574cb036c9fc09532f3f.tar
gsoc2013-empathy-8a937c926c79f24fdb36574cb036c9fc09532f3f.tar.gz
gsoc2013-empathy-8a937c926c79f24fdb36574cb036c9fc09532f3f.tar.bz2
gsoc2013-empathy-8a937c926c79f24fdb36574cb036c9fc09532f3f.tar.lz
gsoc2013-empathy-8a937c926c79f24fdb36574cb036c9fc09532f3f.tar.xz
gsoc2013-empathy-8a937c926c79f24fdb36574cb036c9fc09532f3f.tar.zst
gsoc2013-empathy-8a937c926c79f24fdb36574cb036c9fc09532f3f.zip
audio-src: allow changing the audio source element
Better than nothing, right? Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/empathy-audio-src.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/empathy-audio-src.c b/src/empathy-audio-src.c
index b721773b9..252e8aabe 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));