]> git.0d.be Git - empathy.git/commitdiff
Get the env variable in create_{src,sink} directly
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 15 Aug 2011 12:59:41 +0000 (14:59 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 15 Aug 2011 12:59:41 +0000 (14:59 +0200)
src/empathy-audio-sink.c
src/empathy-audio-src.c

index c9d7203107a3523fb01b15de888b811d751586ce..5969ea5094843ab6011cd1d934cb004fc72b9a9b 100644 (file)
@@ -190,9 +190,12 @@ empathy_audio_sink_get_volume (EmpathyGstAudioSink *sink)
 }
 
 static GstElement *
-create_sink (const gchar *description)
+create_sink (void)
 {
   GstElement *sink;
+  const gchar *description;
+
+  description = g_getenv ("EMPATHY_AUDIO_SINK");
 
   if (description != NULL)
     {
@@ -254,7 +257,7 @@ empathy_audio_sink_request_new_pad (GstElement *element,
 
   gst_bin_add (GST_BIN (bin), volume);
 
-  self->priv->sink = create_sink (g_getenv ("EMPATHY_AUDIO_SINK"));
+  self->priv->sink = create_sink ();
   if (self->priv->sink == NULL)
     goto error;
 
index 5da42481042670fdb329621f14da13d49ec6bfa7..8f7a0599f5ddd1323675bf84892c6098672ea6dc 100644 (file)
@@ -379,9 +379,12 @@ empathy_audio_src_source_output_index_notify (GObject *object,
 }
 
 static GstElement *
-create_src (const gchar *description)
+create_src (void)
 {
   GstElement *src;
+  const gchar *description;
+
+  description = g_getenv ("EMPATHY_AUDIO_SRC");
 
   if (description != NULL)
     {
@@ -416,7 +419,7 @@ empathy_audio_src_init (EmpathyGstAudioSrc *obj)
   priv->peak_level = -G_MAXDOUBLE;
   priv->lock = g_mutex_new ();
 
-  priv->src = create_src (g_getenv ("EMPATHY_AUDIO_SRC"));
+  priv->src = create_src ();
   if (priv->src == NULL)
     return;