diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-08-15 18:27:22 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-08-15 20:39:44 +0800 |
commit | 5cf00f4b947ee9ff59abb4e0054bb54449cde916 (patch) | |
tree | d8f0e32e079e29edaf6d04192cd2d45671b74827 /libempathy-gtk/empathy-call-utils.c | |
parent | 4121205c56393f8d51d59237adb001c108628365 (diff) | |
download | gsoc2013-empathy-5cf00f4b947ee9ff59abb4e0054bb54449cde916.tar gsoc2013-empathy-5cf00f4b947ee9ff59abb4e0054bb54449cde916.tar.gz gsoc2013-empathy-5cf00f4b947ee9ff59abb4e0054bb54449cde916.tar.bz2 gsoc2013-empathy-5cf00f4b947ee9ff59abb4e0054bb54449cde916.tar.lz gsoc2013-empathy-5cf00f4b947ee9ff59abb4e0054bb54449cde916.tar.xz gsoc2013-empathy-5cf00f4b947ee9ff59abb4e0054bb54449cde916.tar.zst gsoc2013-empathy-5cf00f4b947ee9ff59abb4e0054bb54449cde916.zip |
Enable echo cancellation if needed
Diffstat (limited to 'libempathy-gtk/empathy-call-utils.c')
-rw-r--r-- | libempathy-gtk/empathy-call-utils.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-call-utils.c b/libempathy-gtk/empathy-call-utils.c index 333d90267..c5e88ec80 100644 --- a/libempathy-gtk/empathy-call-utils.c +++ b/libempathy-gtk/empathy-call-utils.c @@ -30,6 +30,7 @@ #include "empathy-call-utils.h" +#include <libempathy/empathy-gsettings.h> #include <libempathy/empathy-request-util.h> #define DEBUG_FLAG EMPATHY_DEBUG_OTHER @@ -197,9 +198,22 @@ void empathy_call_set_stream_properties (GstElement *element) { GstStructure *props; + GSettings *gsettings_call; + gboolean echo_cancellation; + gchar *tmp; - props = gst_structure_from_string ( - "props,media.role=phone", NULL); + 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_from_string (tmp, NULL); g_object_set (element, "stream-properties", props, NULL); gst_structure_free (props); + + g_free (tmp); + g_object_unref (gsettings_call); } |