aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/empathy-audio-sink.c10
-rw-r--r--src/empathy-audio-src.c9
-rw-r--r--src/empathy-av.c1
-rw-r--r--src/empathy-call.c1
4 files changed, 19 insertions, 2 deletions
diff --git a/src/empathy-audio-sink.c b/src/empathy-audio-sink.c
index e571b2426..f8b5d1c39 100644
--- a/src/empathy-audio-sink.c
+++ b/src/empathy-audio-sink.c
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include <gst/audio/audio.h>
+#include <telepathy-glib/telepathy-glib.h>
#include "empathy-audio-sink.h"
@@ -231,6 +232,15 @@ empathy_audio_sink_request_new_pad (GstElement *element,
if (self->priv->sink == NULL)
goto error;
+ if (!tp_strdiff (sink_element, "pulsesink"))
+ {
+ GstStructure *props;
+
+ props = gst_structure_from_string ("props,media.role=phone", NULL);
+ g_object_set (self->priv->sink, "stream-properties", props, NULL);
+ gst_structure_free (props);
+ }
+
gst_bin_add (GST_BIN (bin), self->priv->sink);
if (!gst_element_link_many (audioconvert0, resample, audioconvert1,
diff --git a/src/empathy-audio-src.c b/src/empathy-audio-src.c
index 642628d7b..98ff24eca 100644
--- a/src/empathy-audio-src.c
+++ b/src/empathy-audio-src.c
@@ -394,6 +394,15 @@ empathy_audio_src_init (EmpathyGstAudioSrc *obj)
priv->src = gst_element_factory_make (src_element, NULL);
gst_bin_add (GST_BIN (obj), priv->src);
+ if (!tp_strdiff (src_element, "pulsesrc"))
+ {
+ GstStructure *props;
+
+ props = gst_structure_from_string ("props,media.role=phone", NULL);
+ g_object_set (priv->src, "stream-properties", props, NULL);
+ gst_structure_free (props);
+ }
+
priv->volume = gst_element_factory_make ("volume", NULL);
g_object_ref (priv->volume);
diff --git a/src/empathy-av.c b/src/empathy-av.c
index 6f8c5ba61..70acfc4f3 100644
--- a/src/empathy-av.c
+++ b/src/empathy-av.c
@@ -132,7 +132,6 @@ main (int argc,
empathy_gtk_init ();
g_set_application_name (_("Empathy Audio/Video Client"));
- g_setenv ("PULSE_PROP_media.role", "phone", TRUE);
/* Make empathy and empathy-av appear as the same app in gnome-shell */
gdk_set_program_class ("Empathy");
diff --git a/src/empathy-call.c b/src/empathy-call.c
index 1305645d5..1f60217db 100644
--- a/src/empathy-call.c
+++ b/src/empathy-call.c
@@ -150,7 +150,6 @@ main (int argc,
empathy_gtk_init ();
g_set_application_name (_("Empathy Audio/Video Client"));
- g_setenv ("PULSE_PROP_media.role", "phone", TRUE);
/* Make empathy and empathy-call appear as the same app in gnome-shell */
gdk_set_program_class ("Empathy");