<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le dim. 31 mai 2020 07 h 00, mwon <<a href="mailto:miguelwon@gmail.com">miguelwon@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm trying to establish an audio call to a Raspberry Pi equipped with<br>
speakers and mic. I'm using a webrtc connection using /webrtcbin/ that<br>
allows me to connect my browser to Raspberry Pi. The problem is that when I<br>
send audio to the Raspberry Pi, I get echo because the Raspi Pi mic records<br>
the speaker audio and send it back. <br>
<br>
I'm trying to use /webrtcdsp/ with /webrtcechoprobe/ to solve the issue, but<br>
the problem is that the probe must be positioned when the remote sound<br>
arrives (from the browser) so that /webrtcdsp/ filter it. For these reasons<br>
I was testing this example<br>
<<a href="https://github.com/centricular/gstwebrtc-demos/blob/master/sendrecv/gst/webrtc-sendrecv.c" rel="noreferrer noreferrer" target="_blank">https://github.com/centricular/gstwebrtc-demos/blob/master/sendrecv/gst/webrtc-sendrecv.c</a>> <br>
with the with the following pipeline:<br>
<br>
<br>
/ pipe1 =<br>
gst_parse_launch ("webrtcbin bundle-policy=max-bundle name=sendrecv "<br>
STUN_SERVER<br>
"alsasrc device=hw:1,0 buffer-time=30000 ! audioconvert ! webrtcdsp !<br>
audioresample ! queue ! opusenc ! rtpopuspay ! "<br>
"queue ! " RTP_CAPS_OPUS "96 ! sendrecv. ", &error);<br>
/<br>
<br>
<br>
<br>
and then add the probe just after the incoming decoding bin: <br>
<br>
<br>
<br>
/handle_media_stream (GstPad * pad, GstElement * pipe, const char<br>
*convert_name,<br>
const char *sink_name)<br>
{<br>
GstPad *qpad;<br>
GstElement *q, *conv, *resample, *sink,*probe;<br>
GstPadLinkReturn ret;<br>
<br>
g_print ("Trying to handle stream with %s ! %s", convert_name, sink_name);<br>
<br>
q = gst_element_factory_make ("queue", NULL);<br>
g_assert_nonnull (q);<br>
conv = gst_element_factory_make (convert_name, NULL);<br>
g_assert_nonnull (conv);<br>
probe = gst_element_factory_make ("webrtcechoprobe", NULL);<br>
g_assert_nonnull (probe);<br>
sink = gst_element_factory_make (sink_name, NULL);<br>
g_assert_nonnull (sink);<br>
<br>
gst_bin_add_many (GST_BIN (pipe), q, conv,sink, NULL);<br>
gst_element_sync_state_with_parent (q);<br>
gst_element_sync_state_with_parent (conv);<br>
gst_element_sync_state_with_parent (probe);<br>
gst_element_sync_state_with_parent (sink);<br>
gst_element_link_many (q, conv,probe,sink, NULL);<br>
<br>
<br>
qpad = gst_element_get_static_pad (q, "sink");<br>
<br>
ret = gst_pad_link (pad, qpad);<br>
g_assert_cmphex (ret, ==, GST_PAD_LINK_OK);<br>
}/<br>
<br>
<br>
The problem is that the example is not able to run. The initial pipeline is<br>
not executed at all because it is missing the corresponding probe (I think),<br>
that will be ready only when the connection is established. <br>
<br>
Any idea on how to solve the problem?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">You can create the pair from the start, and then add/link the probe later.</div><div dir="auto"><br></div><div dir="auto">Regards,</div><div dir="auto">Nicolas</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div></div></div>