[libnice] nice_interfaces_get_local_ips() returns nothing on Windows
Philip Withnall
philip at tecnocode.co.uk
Thu Dec 3 16:01:42 PST 2015
Hi,
On Wed, 2015-12-02 at 14:53 +0100, Adrien Carbonne wrote:
> Hello,
>
> I have compiled libnice on Windows but I cannot get *any* example to
> work.
How did you compile it? MinGW, or MSVC?
> I have tried to debug it, and I found out that one issue is that
> nice_interfaces_get_local_ips() returns nothing on Windows.
If you enable all debugging output (G_MESSAGES_DEBUG=all NICE_DEBUG=all
in the environment), do you get debug messages like “Error retrieving
local addresses (error code XX).”?
For debugging to work, you must also have configured libnice
//without// NDEBUG defined. The normal libnice.vcproj file //does//
define NDEBUG, so make sure you unconfigure that.
> Here is a sample program : it should display some candidates but gets
> no candidates (and no local addresses for that matter).
>
>
> int main() {
> context = g_main_context_new ();
> loop = g_main_loop_new ( context , FALSE );
> NiceAgent *agent = nice_agent_new ( context ,
> NICE_COMPATIBILITY_RFC5245 );
>
> g_signal_connect (G_OBJECT (agent), "candidate-gathering-done",
> G_CALLBACK (candidate_gathering_done_cb), NULL);
> g_signal_connect (G_OBJECT (agent), "component-state-changed",
> G_CALLBACK (component_state_changed_cb), NULL);
> g_signal_connect (G_OBJECT (agent), "new-candidate-full",
> G_CALLBACK (new_candidate_full_cb), NULL);
>
> guint stream_id = nice_agent_add_stream ( agent , 1);
> nice_agent_attach_recv ( agent , stream_id , 1 , context ,
> cb_nice_recv , NULL );
> nice_agent_gather_candidates ( agent , stream_id );
>
> g_main_loop_run ( loop );
> }
>
> Is it a Windows-specific issue?
Most likely, since the code for nice_interfaces_get_local_ips() is
highly platform specific.
> Do I have to stop dreaming about running libnice on Windows? ;)
Sorry, I don’t have regular access to a Windows machine to test libnice
on. All help is welcome!
Philip
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/nice/attachments/20151204/ce6fb8cf/attachment.sig>
More information about the nice
mailing list