[FFmpeg-devel] select interface for multicast messages

Michael Niedermayer michaelni at gmx.at
Tue Jan 3 16:03:44 CET 2012


On Tue, Jan 03, 2012 at 10:57:28AM +0100, Tudor SUCIU wrote:
> some relevant code from vlc src/network/udp.c :
> 
> #ifdef WIN32
> #   define if_nametoindex( str ) atoi( str )
> #else
> #   include <unistd.h>
> #   ifdef HAVE_NET_IF_H
> #       include <net/if.h>
> #   endif
> #endif
> 
> #if defined (WIN32) && !defined (MCAST_JOIN_SOURCE_GROUP)
> #  warning Your C headers are out-of-date. Please update.
> 
> #ifdef MCAST_JOIN_SOURCE_GROUP
> ...
> setsockopt (fd, level,
>                     src ? MCAST_JOIN_SOURCE_GROUP : MCAST_JOIN_GROUP,
> #endif
> 
> 
> If I understand well the code, under windows it does not work
> completely, the setsockopt ( MCAST_JOIN_GROUP) works with a recent
> compiler, but the string --miface=br0.2222 for example does not pass
> the  if_nametoindex function. Maybe if the number of the interface is
> used --miface=5 it works. I have access to multicast udp only from
> linux machines, I cannot immediately help with windows debugging. We
> may try to setup a windows machine if it is indispensable for the
> inclusion of the patch.

Theres no need to support windows if you dont have the ability to
simply test it/work on it. But it must not break compilation.

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120103/32854e9d/attachment.asc>


More information about the ffmpeg-devel mailing list