<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1448990248024_5373"><span></span></div><div id="yui_3_16_0_1_1448990248024_5373"><span>Hi</span></div><div id="yui_3_16_0_1_1448990248024_5373" dir="ltr"><span id="yui_3_16_0_1_1448990248024_5468">Why dont you create a new thread running a separate glib loop ?</span></div><div id="yui_3_16_0_1_1448990248024_5373"><span id="yui_3_16_0_1_1448990248024_5467">You can have the nice stuff processed by that thread/loop and you'll have the callbacks to send the needed info back to your</span></div><div id="yui_3_16_0_1_1448990248024_5373"><span id="yui_3_16_0_1_1448990248024_5466">program through whatever means you use.</span></div><div id="yui_3_16_0_1_1448990248024_5373"><span><br></span></div><div id="yui_3_16_0_1_1448990248024_5373"><span>Regards</span></div><div id="yui_3_16_0_1_1448990248024_5373"><span><br></span></div><div id="yui_3_16_0_1_1448990248024_5373"><span>Ps: Sorry for top posting</span></div><div id="yui_3_16_0_1_1448990248024_5373"><span><br></span></div><br>  <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_1_1448990248024_5413"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_1_1448990248024_5412"> <div dir="ltr" id="yui_3_16_0_1_1448990248024_5411"> <hr size="1" id="yui_3_16_0_1_1448990248024_5410"> <font size="2" face="Arial" id="yui_3_16_0_1_1448990248024_5414"> <b id="yui_3_16_0_1_1448990248024_5416"><span style="font-weight:bold;" id="yui_3_16_0_1_1448990248024_5415">De :</span></b> Jack Wang <antirazin@gmail.com><br> <b><span style="font-weight: bold;">À :</span></b> nice@lists.freedesktop.org <br> <b id="yui_3_16_0_1_1448990248024_5418"><span style="font-weight: bold;" id="yui_3_16_0_1_1448990248024_5417">Envoyé le :</span></b> Lundi 30 novembre 2015 13h33<br> <b id="yui_3_16_0_1_1448990248024_5420"><span style="font-weight: bold;" id="yui_3_16_0_1_1448990248024_5419">Objet :</span></b> [libnice] Is there any non-blocking method corresponding to g_main_loop_run()?<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_1_1448990248024_5421"><br><div id="yiv8241439914"><div dir="ltr" id="yui_3_16_0_1_1448990248024_5423"><div style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;font-family:Arial,;line-height:19.5px;" id="yui_3_16_0_1_1448990248024_5422">I'm trying to implement ICE on SIP,<br>I reference the sdp-example of libnice and want to apply it to my SIP codes.<br><br>The example uses the standard IO to exchange the SDPs,<br>but in SIP it needs to listen the response from other side.<br><br>The question is, before I send INVITE I have to gather ICE candidates,<br>and wait for signals to proceed. This will block the main process by g_main_loop_run(),<br>so the SIP procedure can't be triggered normally.<br><br>But if I remove the g_main_loop_run(),according to the line 162 in the example above:<br></div><pre style="margin-top:0px;padding:5px;border:0px;font-size:13px;overflow:auto;width:auto;max-height:600px;font-family:Consolas, Menlo, Monaco,;word-wrap:normal;background-color:rgb(238,238,238);" id="yui_3_16_0_1_1448990248024_5498"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas, Menlo, Monaco,;white-space:inherit;" id="yui_3_16_0_1_1448990248024_5499">while (!exit_thread && !candidate_gathering_done)
</code></pre><div style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;font-family:Arial,;line-height:19.5px;" id="yui_3_16_0_1_1448990248024_5500">this candidate_gathering_done will never be assigned since the signal fail to get through callback function. Is there any non-blocking way to multiplex ICE and SIP procedures?</div><div style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;font-family:Arial,;line-height:19.5px;" id="yui_3_16_0_1_1448990248024_5501">Thanks in advance. :)</div></div></div><br>_______________________________________________<br>nice mailing list<br><a ymailto="mailto:nice@lists.freedesktop.org" href="mailto:nice@lists.freedesktop.org">nice@lists.freedesktop.org</a><br><a href="http://lists.freedesktop.org/mailman/listinfo/nice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br><br><br></div> </div> </div></div></body></html>