aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-15 21:13:27 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-15 21:13:27 +0800
commitf30d87c84aa426407521c619702277de754e4bb5 (patch)
tree0e27cce461b755589fbd941c88449684d512b345
parent0294f04c51a60c155e20a4e5210a8ddd69358ba9 (diff)
downloadgsoc2013-empathy-f30d87c84aa426407521c619702277de754e4bb5.tar
gsoc2013-empathy-f30d87c84aa426407521c619702277de754e4bb5.tar.gz
gsoc2013-empathy-f30d87c84aa426407521c619702277de754e4bb5.tar.bz2
gsoc2013-empathy-f30d87c84aa426407521c619702277de754e4bb5.tar.lz
gsoc2013-empathy-f30d87c84aa426407521c619702277de754e4bb5.tar.xz
gsoc2013-empathy-f30d87c84aa426407521c619702277de754e4bb5.tar.zst
gsoc2013-empathy-f30d87c84aa426407521c619702277de754e4bb5.zip
manually build the GstStructure
-rw-r--r--libempathy-gtk/empathy-call-utils.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-call-utils.c b/libempathy-gtk/empathy-call-utils.c
index c5e88ec80..eb01fe25b 100644
--- a/libempathy-gtk/empathy-call-utils.c
+++ b/libempathy-gtk/empathy-call-utils.c
@@ -23,6 +23,7 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
+#include <pulse/pulseaudio.h>
#include <telepathy-glib/telepathy-glib.h>
@@ -200,20 +201,25 @@ empathy_call_set_stream_properties (GstElement *element)
GstStructure *props;
GSettings *gsettings_call;
gboolean echo_cancellation;
- gchar *tmp;
gsettings_call = g_settings_new (EMPATHY_PREFS_CALL_SCHEMA);
echo_cancellation = g_settings_get_boolean (gsettings_call,
EMPATHY_PREFS_CALL_ECHO_CANCELLATION);
- tmp = g_strdup_printf ("props,media.role=phone%s", echo_cancellation ?
- ",filter.want=echo-cancel": "");
+ props = gst_structure_new ("props",
+ PA_PROP_MEDIA_ROLE, G_TYPE_STRING, "phone",
+ NULL);
+
+ if (echo_cancellation)
+ {
+ gst_structure_set (props,
+ "filter.want", G_TYPE_STRING, "echo-cancel",
+ NULL);
+ }
- props = gst_structure_from_string (tmp, NULL);
g_object_set (element, "stream-properties", props, NULL);
gst_structure_free (props);
- g_free (tmp);
g_object_unref (gsettings_call);
}