aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-audio-sink.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-11-10 03:25:17 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-11-11 22:01:08 +0800
commit92e94e644937590a6832f1321b1ce285cae38f86 (patch)
treefc3ddafba8a743dbf4778025dda742a355a1f1b0 /src/empathy-audio-sink.c
parent8b9ee2a0f048ce6263efe0d0660ed04a53861adf (diff)
downloadgsoc2013-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-audio-sink.c')
-rw-r--r--src/empathy-audio-sink.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/empathy-audio-sink.c b/src/empathy-audio-sink.c
index 7a8d42bfc..b35edb331 100644
--- a/src/empathy-audio-sink.c
+++ b/src/empathy-audio-sink.c
@@ -61,6 +61,7 @@ enum {
struct _EmpathyGstAudioSinkPrivate
{
GstElement *sink;
+ gboolean echo_cancel;
};
#define EMPATHY_GST_AUDIO_SINK_GET_PRIVATE(o) \
@@ -71,6 +72,7 @@ static void
empathy_audio_sink_init (EmpathyGstAudioSink *self)
{
self->priv = EMPATHY_GST_AUDIO_SINK_GET_PRIVATE (self);
+ self->priv->echo_cancel = TRUE;
}
static GstPad * empathy_audio_sink_request_new_pad (GstElement *self,
@@ -191,7 +193,7 @@ empathy_audio_sink_get_volume (EmpathyGstAudioSink *sink)
}
static GstElement *
-create_sink (void)
+create_sink (EmpathyGstAudioSink *self)
{
GstElement *sink;
const gchar *description;
@@ -217,7 +219,7 @@ create_sink (void)
if (sink == NULL)
return NULL;
- empathy_call_set_stream_properties (sink, TRUE);
+ empathy_call_set_stream_properties (sink, self->priv->echo_cancel);
return sink;
}
@@ -258,7 +260,7 @@ empathy_audio_sink_request_new_pad (GstElement *element,
gst_bin_add (GST_BIN (bin), volume);
- self->priv->sink = create_sink ();
+ self->priv->sink = create_sink (self);
if (self->priv->sink == NULL)
goto error;
@@ -311,3 +313,14 @@ empathy_audio_sink_release_pad (GstElement *element,
gst_pad_set_active (pad, FALSE);
gst_element_remove_pad (element, pad);
}
+
+void
+empathy_audio_sink_set_echo_cancel (EmpathyGstAudioSink *sink,
+ gboolean echo_cancel)
+{
+ DEBUG ("Sink echo cancellation setting: %s", echo_cancel ? "on" : "off");
+ sink->priv->echo_cancel = echo_cancel;
+ if (sink->priv->sink != NULL)
+ empathy_call_set_stream_properties (sink->priv->sink,
+ sink->priv->echo_cancel);
+}