[Nice] narrative documentation

Olivier Crête olivier.crete at collabora.co.uk
Sun Dec 28 12:11:55 PST 2008


On Sun, 2008-12-28 at 13:35 -0500, Arc Riley wrote:
> I see the API for libnice docs, and the sample code provided, but in
> lack of narrative docs explaining how the pieces fit together I'm
> having trouble understanding how the callback structure works.
> 
> Does liboil spawn new threads per connection to wait for new data to
> pass to callbacks, or is there a mainloop function I'm missing, or a
> function for "check for new data"?
>
> Similarly, is there a function provided to wait for connection signals
> to "get fired"?

Libnice uses the GMainLoop [1] from GLib. So you block on
g_main_loop_run(). If you're application is not GMainLoop based, you can
either havbe GMainLoop integration (the Qt main loop has something for
that I believe), or you can run it in its own thread (like I do in the
farsight2 transmitter [2][3]

> I see in the source comments such as '''note that streams/candidates
> can be in use by other threads''' but without combing through the
> source I don't have a clear idea of how this library works overall.

You can also look at docs/design.txt, although I'm not certain its fully
up to date.

> Another question, is the Jingle support mode in compliance with
> Google's gTalk implementation of Jingle or the XMPP draft standard for
> XMPP/Jingle?

There is a google compatibility mode (compatible with google's p2p
stuff) or for the standard XMPP stuff, use the standard mode of libnice
(ie the DRAFT19 mode ie the default). [2]


[1] http://library.gnome.org/devel/glib/stable/glib-The-Main-Event-Loop.html
[2] http://git.collabora.co.uk/?p=farsight2.git;a=blob;f=transmitters/nice/fs-nice-agent.c
[3] http://git.collabora.co.uk/?p=farsight2.git;a=blob;f=transmitters/nice/fs-nice-transmitter.c
[4] http://nice.freedesktop.org/libnice/libnice-NiceAgent.html#NiceCompatibility

-- 
Olivier Crête
olivier.crete at collabora.co.uk
Collabora Ltd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/nice/attachments/20081228/f4a9a33c/attachment.pgp 


More information about the Nice mailing list