From ZHueras at amdtelemedicine.com Mon Dec 14 07:23:56 2020 From: ZHueras at amdtelemedicine.com (Zachary Hueras) Date: Mon, 14 Dec 2020 07:23:56 +0000 Subject: [libnice] nice_agent_restart_stream: proper usage and local candidate gathering with gstreamer Message-ID: <1607930636596.12976@amdtelemedicine.com> 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 Hueras Principal Software Engineer AMD Global Telemedicine, Inc. Cell : 978-660-3812 zhueras at amdtelemedicine.com www.amdtelemedicine.com | Follow us on LinkedIn -------------- next part -------------- An HTML attachment was scrubbed... URL: From ZHueras at amdtelemedicine.com Mon Dec 14 07:45:48 2020 From: ZHueras at amdtelemedicine.com (Zachary Hueras) Date: Mon, 14 Dec 2020 07:45:48 +0000 Subject: [libnice] nice_agent_restart_stream: proper usage and local candidate gathering with gstreamer In-Reply-To: <1607930636596.12976@amdtelemedicine.com> References: <1607930636596.12976@amdtelemedicine.com> Message-ID: <1607931948230.85118@amdtelemedicine.com> On my quest, I've (belatedly) RTFM. It states: Note that to modify the set of local candidates, a new stream h?as 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 Hueras Principal Software Engineer AMD Global Telemedicine, Inc. Cell : 978-660-3812 zhueras at amdtelemedicine.com www.amdtelemedicine.com | Follow us on LinkedIn ________________________________ From: nice on behalf of Zachary Hueras 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 Hueras Principal Software Engineer AMD Global Telemedicine, Inc. Cell : 978-660-3812 zhueras at amdtelemedicine.com www.amdtelemedicine.com | Follow us on LinkedIn -------------- next part -------------- An HTML attachment was scrubbed... URL: From olivier.crete at collabora.com Mon Dec 14 15:28:00 2020 From: olivier.crete at collabora.com (Olivier =?ISO-8859-1?Q?Cr=EAte?=) Date: Mon, 14 Dec 2020 10:28:00 -0500 Subject: [libnice] nice_agent_restart_stream: proper usage and local candidate gathering with gstreamer In-Reply-To: <1607931948230.85118@amdtelemedicine.com> References: <1607930636596.12976@amdtelemedicine.com> <1607931948230.85118@amdtelemedicine.com> Message-ID: <5050fabda3ab1c09673034457597ad84ce464dc2.camel@collabora.com> 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? > ? ? h?as 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 on behalf of Zachary > Hueras > 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: