<html><head>
    
  </head>
  <body><div>Hi,</div><div><br></div><div>Giving this a bit more though, I guess one could create those unallocated streams hidden inside libnice and expose them when nice_agent_add_stream() is called, but it's a bit trickier as that means forcing eveyr stream to have the same number of components, which isn't standard in ICE (but it's always true for webrtc as rtcp-mux is mandated now).</div><div><br></div><div>Olivier</div><div><br></div><div>On Mon, 2021-05-03 at 15:42 -0400, Olivier Crête via gstreamer-devel wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>Hi,</div><div><br></div><div>With my libnice maintainer hat on, it's definitely something I would accept.</div><div><br></div><div>The tricky part is the implementation. At first, I though we'd want to create a new object separate from the ICE agent to do the gathering, but it gets quite tricky quickly as the gathering and especially TURN code is quite tied to the ICE agent code.</div><div><br></div><div>And looking at the spec, I think the implementation is mostly a webrtc level issue. All that you need to do is to add a new API to GstWebRTCICE to create GstWebRTCICEStream objects ahead of time and "cache" them, then when gst_webrtc_ice_add_stream() is called, you can just return one of the pre-allocated streams. The only issue is that we need to add an API to libnice to mark a stream "unallocated" so that it gets ignored when doing the freezing/unfreezing dance, and the same thing needs to happen inside webrtcbin so they get ignored when trying to compute the overall agent state.</div><div><br></div><div>Olivier</div><div><br></div><div><br></div><div>On Mon, 2021-05-03 at 21:21 +0200, Mathieu Duponchelle via gstreamer-devel wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div> Hey, this seems interesting, perhaps open an issue in libnice's gitlab to discuss this?<br> <br></div><div class="moz-cite-prefix">On 5/2/21 5:29 AM, Sherrill Lam via gstreamer-devel wrote:<br></div><div> <br></div><blockquote type="cite" cite="mid:CAHVJfJKAWZ+zKbGnaB+fiibhd_KR9s+_giEYhQzjsxt4bSJ-dQ@mail.gmail.com" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div> <meta http-equiv="content-type" content="text/html; charset=UTF-8"></div><div dir="ltr">Hi there!<br> <br> My team is interested to implement a prefetch ice candidate pool and add an ice-candidate-pool-size property ( [rtc spec](<a href="https://www.w3.org/TR/webrtc/#dom-rtcconfiguration-icecandidatepoolsize" moz-do-not-send="true">https://www.w3.org/TR/webrtc/#dom-rtcconfiguration-icecandidatepoolsize</a>) ) for webrtcbin element. We think it will help accelerate the SDP generation at startup process. We’d like to get more guidance on what would be the best way to do it.<br> <br> Although ice candidate pool is a webrtc concept, I think it might make more sense if the pool itself is implemented within NiceAgent in Libnice. We could add an API in Libnice to create such a pool with a specified pool size and start generating ice candidates. When nice_agent_gather_candidates() is called, it will first check if there are candidates in the pool before generating new ones.<br> <br> Any thoughts or suggestions?<br> <br> Thanks!<br><div>Sherrill</div></div><div> <br> <fieldset class="mimeAttachmentHeader"></fieldset></div><pre>_______________________________________________</pre><pre>gstreamer-devel mailing list</pre><pre><a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a></pre><pre><a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></pre></blockquote><div>_______________________________________________<br></div><div>gstreamer-devel mailing list<br></div><div><a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br></div><div><a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br></div></blockquote><div><br></div><div><span><pre><div>_______________________________________________<br></div><div>gstreamer-devel mailing list<br></div><div><a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br></div><div><a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br></div></pre></span></div></blockquote><div><br></div><div><span><pre>-- <br></pre><div data-evo-paragraph="" class="">Olivier Crête</div><div data-evo-paragraph="" class=""><a href="mailto:olivier.crete@collabora.com">olivier.crete@collabora.com</a></div><div data-evo-paragraph="" class=""><br></div></span></div></body></html>