diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2011-11-10 03:25:17 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2011-11-11 22:01:08 +0800 |
commit | 92e94e644937590a6832f1321b1ce285cae38f86 (patch) | |
tree | fc3ddafba8a743dbf4778025dda742a355a1f1b0 /src/empathy-call-window.c | |
parent | 8b9ee2a0f048ce6263efe0d0660ed04a53861adf (diff) | |
download | gsoc2013-empathy-92e94e644937590a6832f1321b1ce285cae38f86.tar gsoc2013-empathy-92e94e644937590a6832f1321b1ce285cae38f86.tar.gz gsoc2013-empathy-92e94e644937590a6832f1321b1ce285cae38f86.tar.bz2 gsoc2013-empathy-92e94e644937590a6832f1321b1ce285cae38f86.tar.lz gsoc2013-empathy-92e94e644937590a6832f1321b1ce285cae38f86.tar.xz gsoc2013-empathy-92e94e644937590a6832f1321b1ce285cae38f86.tar.zst gsoc2013-empathy-92e94e644937590a6832f1321b1ce285cae38f86.zip |
Don't turn on echo cancellation on the sink if it's for raw conferences
https://bugzilla.gnome.org/show_bug.cgi?id=663842
Diffstat (limited to 'src/empathy-call-window.c')
-rw-r--r-- | src/empathy-call-window.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index de29f15c0..9ecc47ba2 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -2868,7 +2868,8 @@ empathy_call_window_get_video_sink_pad (EmpathyCallWindow *self) /* Called with global lock held */ static GstPad * -empathy_call_window_get_audio_sink_pad (EmpathyCallWindow *self) +empathy_call_window_get_audio_sink_pad (EmpathyCallWindow *self, + TfContent *content) { EmpathyCallWindowPriv *priv = GET_PRIV (self); GstPad *pad; @@ -2893,6 +2894,13 @@ empathy_call_window_get_audio_sink_pad (EmpathyCallWindow *self) } } + /* For raw audio conferences assume that the producer of the raw data + * has already processed it, so turn off any echo cancellation and any + * other audio improvements that come with it */ + empathy_audio_sink_set_echo_cancel ( + EMPATHY_GST_AUDIO_SINK (priv->audio_output), + !empathy_call_window_content_is_raw (content)); + template = gst_element_class_get_pad_template ( GST_ELEMENT_GET_CLASS (priv->audio_output), "sink%d"); @@ -3343,20 +3351,23 @@ empathy_call_window_video_probe_cb (GstPad *pad, /* Called from the streaming thread */ static gboolean empathy_call_window_src_added_cb (EmpathyCallHandler *handler, - GstPad *src, guint media_type, gpointer user_data) + TfContent *content, GstPad *src, gpointer user_data) { EmpathyCallWindow *self = EMPATHY_CALL_WINDOW (user_data); EmpathyCallWindowPriv *priv = GET_PRIV (self); gboolean retval = FALSE; + guint media_type; GstPad *pad; g_mutex_lock (priv->lock); + g_object_get (content, "media-type", &media_type, NULL); + switch (media_type) { case TP_MEDIA_STREAM_TYPE_AUDIO: - pad = empathy_call_window_get_audio_sink_pad (self); + pad = empathy_call_window_get_audio_sink_pad (self, content); break; case TP_MEDIA_STREAM_TYPE_VIDEO: g_idle_add (empathy_call_window_show_video_output_cb, self); |