From f30d87c84aa426407521c619702277de754e4bb5 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 15 Aug 2011 15:13:27 +0200 Subject: manually build the GstStructure --- libempathy-gtk/empathy-call-utils.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'libempathy-gtk') 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 #include +#include #include @@ -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); } -- cgit v1.2.3