aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-audio-sink.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-15 17:04:24 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-15 20:38:12 +0800
commit7e9166e6711d15a28bb679a1aeed3223134f2388 (patch)
tree706eb05ada9033547c199924b0868a2e03888c77 /src/empathy-audio-sink.c
parent8f7a0a9cce1f8e08d4a50cc181d8a11ce3b48ec1 (diff)
downloadgsoc2013-empathy-7e9166e6711d15a28bb679a1aeed3223134f2388.tar
gsoc2013-empathy-7e9166e6711d15a28bb679a1aeed3223134f2388.tar.gz
gsoc2013-empathy-7e9166e6711d15a28bb679a1aeed3223134f2388.tar.bz2
gsoc2013-empathy-7e9166e6711d15a28bb679a1aeed3223134f2388.tar.lz
gsoc2013-empathy-7e9166e6711d15a28bb679a1aeed3223134f2388.tar.xz
gsoc2013-empathy-7e9166e6711d15a28bb679a1aeed3223134f2388.tar.zst
gsoc2013-empathy-7e9166e6711d15a28bb679a1aeed3223134f2388.zip
Set stream-properties on GStreamer elements to set the media role
Diffstat (limited to 'src/empathy-audio-sink.c')
-rw-r--r--src/empathy-audio-sink.c10
1 files changed, 10 insertions, 0 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,