mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-07 12:25:31 +00:00
sip-media: enable echo cancellation
by setting "filter.want" to "echo-cancel" for the pulsesink and pulsesrc GStElement's.
This commit is contained in:
parent
8a6f1bb203
commit
19e7f8f119
1 changed files with 19 additions and 0 deletions
|
@ -326,6 +326,7 @@ initable_init (GInitable *initable,
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
g_autofree char *caps_string = NULL;
|
g_autofree char *caps_string = NULL;
|
||||||
GstPad *srcpad, *sinkpad;
|
GstPad *srcpad, *sinkpad;
|
||||||
|
GstStructure *props = NULL;
|
||||||
|
|
||||||
/* could also use autoaudiosink instead of pulsesink */
|
/* could also use autoaudiosink instead of pulsesink */
|
||||||
self->audiosink = gst_element_factory_make ("pulsesink", "sink");
|
self->audiosink = gst_element_factory_make ("pulsesink", "sink");
|
||||||
|
@ -423,6 +424,24 @@ initable_init (GInitable *initable,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* enable echo cancellation and set buffer size to 40ms */
|
||||||
|
props = gst_structure_new ("props",
|
||||||
|
"media.role", G_TYPE_STRING, "phone",
|
||||||
|
"filter.want", G_TYPE_STRING, "echo-cancel",
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
g_object_set (self->audiosink,
|
||||||
|
"buffer-time", (gint64) 40000,
|
||||||
|
"stream-properties", props,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
g_object_set (self->audiosrc,
|
||||||
|
"buffer-time", (gint64) 40000,
|
||||||
|
"stream-properties", props,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
gst_structure_free (props);
|
||||||
|
|
||||||
gst_bin_add (GST_BIN (self->send_pipeline), self->send_rtpbin);
|
gst_bin_add (GST_BIN (self->send_pipeline), self->send_rtpbin);
|
||||||
gst_bin_add (GST_BIN (self->recv_pipeline), self->recv_rtpbin);
|
gst_bin_add (GST_BIN (self->recv_pipeline), self->recv_rtpbin);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue