diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2011-11-10 03:00:10 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2011-11-11 22:01:07 +0800 |
commit | 8b9ee2a0f048ce6263efe0d0660ed04a53861adf (patch) | |
tree | 9ee947393f466ccf04f2154f910a8ac70e8a49cb /src/empathy-call-window.c | |
parent | ffaa3afe49651493d0dcb01eba1b6dcd1134eed1 (diff) | |
download | gsoc2013-empathy-8b9ee2a0f048ce6263efe0d0660ed04a53861adf.tar gsoc2013-empathy-8b9ee2a0f048ce6263efe0d0660ed04a53861adf.tar.gz gsoc2013-empathy-8b9ee2a0f048ce6263efe0d0660ed04a53861adf.tar.bz2 gsoc2013-empathy-8b9ee2a0f048ce6263efe0d0660ed04a53861adf.tar.lz gsoc2013-empathy-8b9ee2a0f048ce6263efe0d0660ed04a53861adf.tar.xz gsoc2013-empathy-8b9ee2a0f048ce6263efe0d0660ed04a53861adf.tar.zst gsoc2013-empathy-8b9ee2a0f048ce6263efe0d0660ed04a53861adf.zip |
Don't turn on echo cancellation on the source 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 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 8a4a3aa29..de29f15c0 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -2691,6 +2691,23 @@ empathy_call_window_channel_closed_cb (EmpathyCallHandler *handler, } static gboolean +empathy_call_window_content_is_raw (TfContent *content) +{ + FsConference *conference; + gboolean israw; + + g_object_get (content, "fs-conference", &conference, NULL); + g_assert (conference != NULL); + + /* FIXME: Ugly hack, update when moving a packetization property into + * farstream */ + israw = g_str_has_prefix (GST_OBJECT_NAME (conference), "fsrawconf"); + gst_object_unref (conference); + + return israw; +} + +static gboolean empathy_call_window_content_removed_cb (EmpathyCallHandler *handler, TfContent *content, EmpathyCallWindow *self) @@ -3420,6 +3437,14 @@ empathy_call_window_content_added_cb (EmpathyCallHandler *handler, switch (media_type) { case FS_MEDIA_TYPE_AUDIO: + + /* For raw audio conferences assume that the receiver of the raw data + * wants it unprocessed, so turn off any echo cancellation and any + * other audio improvements that come with it */ + empathy_audio_src_set_echo_cancel ( + EMPATHY_GST_AUDIO_SRC (priv->audio_input), + !empathy_call_window_content_is_raw (content)); + if (!gst_bin_add (GST_BIN (priv->pipeline), priv->audio_input)) { g_warning ("Could not add audio source to pipeline"); |