[libnice] Is there any non-blocking method corresponding to g_main_loop_run()?
trescurieux at yahoo.fr
Tue Dec 1 09:24:10 PST 2015
HiWhy dont you create a new thread running a separate glib loop ?You can have the nice stuff processed by that thread/loop and you'll have the callbacks to send the needed info back to yourprogram through whatever means you use.
Ps: Sorry for top posting
De : Jack Wang <antirazin at gmail.com>
À : nice at lists.freedesktop.org
Envoyé le : Lundi 30 novembre 2015 13h33
Objet : [libnice] Is there any non-blocking method corresponding to g_main_loop_run()?
I'm trying to implement ICE on SIP,
I reference the sdp-example of libnice and want to apply it to my SIP codes.
The example uses the standard IO to exchange the SDPs,
but in SIP it needs to listen the response from other side.
The question is, before I send INVITE I have to gather ICE candidates,
and wait for signals to proceed. This will block the main process by g_main_loop_run(),
so the SIP procedure can't be triggered normally.
But if I remove the g_main_loop_run(),according to the line 162 in the example above:
while (!exit_thread && !candidate_gathering_done)
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?Thanks in advance. :)
nice mailing list
nice at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nice