[libnice] nice_agent_restart_stream: proper usage and local candidate gathering with gstreamer

Zachary Hueras ZHueras at amdtelemedicine.com
Mon Dec 14 07:45:48 UTC 2020


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<http://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 Hueras
Principal Software Engineer
AMD Global Telemedicine, Inc.
Cell : 978-660-3812
zhueras at amdtelemedicine.com
www.amdtelemedicine.com<http://www.amdtelemedicine.com/> | Follow us on LinkedIn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/nice/attachments/20201214/a9b3dbd6/attachment.htm>


More information about the nice mailing list