[libnice] nice_agent_restart_stream: proper usage and local candidate gathering with gstreamer
Olivier Crête
olivier.crete at collabora.com
Mon Dec 14 15:28:00 UTC 2020
Hi,
Yes, if you do a ICE restart, the local candidates stay the same. You
can re-fetch them using nice_agent_get_local_candidates(), but they
will not have changed. The goal of a ICE restart is really to reconnect
to a different endpoint but while keeping your local endpoint
"unchanged", which means that you can do it seamlessly without dropping
anything.
Olivier
On Mon, 2020-12-14 at 07:45 +0000, Zachary Hueras wrote:
> On my quest, I've (belatedly) RTFM. It states:
>
> Note that to modify the set of local candidates, a new stream
> has to be created. For the remote party, this looks like a ICE
> restart as well.
>
> If I understand this correctly, if I want *new* candidates, I should
> replace the nice stream (e.g., nice_agent_remove_stream,
> nice_agent_add_stream). Otherwise, I should re-signal the old
> candidates?
>
> Zachary HuerasPrincipal Software Engineer
> AMD Global Telemedicine, Inc.
> Cell : 978-660-3812
> zhueras at amdtelemedicine.com
> www.amdtelemedicine.com | Follow us on LinkedIn
> From: nice <nice-bounces at lists.freedesktop.org> on behalf of Zachary
> Hueras <ZHueras at amdtelemedicine.com>
> Sent: Monday, December 14, 2020 2:23 AM
> To: nice at lists.freedesktop.org
> Subject: [libnice] nice_agent_restart_stream: proper usage and local
> candidate gathering with gstreamer
> Hello,
>
> I'm trying to implement ICE restarts with gstreamer's webrtcbin. The
> thing I can't seem to figure out is how to get libnice to gather
> local candidates again. Or is this not supposed to happen?
>
> As it stands, I:
>
> - successfully generate a session description with new ufrag and pwd
> - set-local-description on webrtcbin
> - detect the changed credentials in GstWebRTCICEStream
> - invoke nice_agent_set_local_credentials
> - invoke nice_agent_restart_stream
> - incidentally invoke nice_agent_gather_candidates (again)
>
> However, no candidates appear to be added after this point. Is there
> something I'm missing?
>
> When I connect this to a simple-peer based WebRTC application, and
> restart a successful connection, only the simple-peer side sends new
> candidates, and the connection eventually progresses to
> "disconnected" and ultimately "failed". I'm not sure if I'm just
> missing something from the gstreamer side, or if libnice is supposed
> to provide new candidates after a restart.
>
> Any and all guidance is welcome.
>
> Zachary HuerasPrincipal Software Engineer
> AMD Global Telemedicine, Inc.
> Cell : 978-660-3812
> zhueras at amdtelemedicine.com
> www.amdtelemedicine.com | Follow us on LinkedIn
> _______________________________________________
> nice mailing list
> nice at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nice
--
Olivier Crête
olivier.crete at collabora.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/nice/attachments/20201214/583a62a8/attachment.htm>
More information about the nice
mailing list