select interface for multicast messages
I used VLC sources in order to duplicate the --miface option so that we could receive multicast udp from a specific interface. What needs to be done in order to have this patch accepted?
Tudor SUCIU <tudor.suciu <at> gmail.com> writes:
I used VLC sources in order to duplicate the --miface option so that we could receive multicast udp from a specific interface. What needs to be done in order to have this patch accepted?
Depending on what you mean with "duplicate" you may need the vlc developer who wrote it to relicense the code under the LPGL... [...]
+#include <net/if.h>
Does this exist wherever you can compile current udp.c? [...]
+ memset(&gr, 0, sizeof(struct group_req)); + gr.gr_interface = miface_nr; + memcpy(&(gr.gr_group), addr, sizeof(struct sockaddr_in));
Superfluous "()" Carl Eugen
By duplicate I meant the functionality, not the code. All the patch is just a big function call in order to MCAST_JOIN_GROUP so I don't think there is any copyright to be discussed. I don't know the implications of +#include <net/if.h> for windows builds. Maybe it needs to be put in network.h, I need an input from the list for this point.
On Mon, Jan 2, 2012 at 2:40 PM, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
Tudor SUCIU <tudor.suciu <at> gmail.com> writes:
I used VLC sources in order to duplicate the --miface option so that we could receive multicast udp from a specific interface. What needs to be done in order to have this patch accepted?
Depending on what you mean with "duplicate" you may need the vlc developer who wrote it to relicense the code under the LPGL...
[...]
+#include <net/if.h>
Does this exist wherever you can compile current udp.c?
[...]
+ memset(&gr, 0, sizeof(struct group_req)); + gr.gr_interface = miface_nr; + memcpy(&(gr.gr_group), addr, sizeof(struct sockaddr_in));
Superfluous "()"
Carl Eugen
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
On Mon, Jan 02, 2012 at 03:51:08PM +0100, Tudor SUCIU wrote:
By duplicate I meant the functionality, not the code. All the patch is just a big function call in order to MCAST_JOIN_GROUP so I don't think there is any copyright to be discussed.
I don't know the implications of +#include <net/if.h> for windows builds. Maybe it needs to be put in network.h, I need an input from the list for this point.
how does vlc handle it ? does it include that header unconditionally ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
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. On Tue, Jan 3, 2012 at 4:37 AM, Michael Niedermayer <michaelni@gmx.at> wrote: On Tue, Jan 3, 2012 at 4:37 AM, Michael Niedermayer <michaelni@gmx.at> wrote:
On Mon, Jan 02, 2012 at 03:51:08PM +0100, Tudor SUCIU wrote:
By duplicate I meant the functionality, not the code. All the patch is just a big function call in order to MCAST_JOIN_GROUP so I don't think there is any copyright to be discussed.
I don't know the implications of +#include <net/if.h> for windows builds. Maybe it needs to be put in network.h, I need an input from the list for this point.
how does vlc handle it ? does it include that header unconditionally ?
[...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
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
if_nametoindex function exists starting with vista http://msdn.microsoft.com/en-us/library/windows/desktop/bb408409%28v=vs.85%2... GROUP_REQ structure exists starting with Win 2008 server http://msdn.microsoft.com/en-us/library/windows/desktop/bb427440%28v=vs.85%2... Michael, you said "it must not break compilation". Does it mean that I need to try a compile on WIN32 to see what it gives? If I consider what msdn says, it means that it only works on Windows server 2008. On Tue, Jan 3, 2012 at 4:03 PM, Michael Niedermayer <michaelni@gmx.at> wrote:
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
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
On Tue, Jan 03, 2012 at 04:59:43PM +0100, Tudor SUCIU wrote:
if_nametoindex function exists starting with vista http://msdn.microsoft.com/en-us/library/windows/desktop/bb408409%28v=vs.85%2... GROUP_REQ structure exists starting with Win 2008 server http://msdn.microsoft.com/en-us/library/windows/desktop/bb427440%28v=vs.85%2...
Michael, you said "it must not break compilation". Does it mean that I need to try a compile on WIN32 to see what it gives? If I consider what msdn says, it means that it only works on Windows server 2008.
vlc seems to have the header under a ifdef, so i suspect we need a configure test and a ifdef too [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I know you won't believe me, but the highest form of Human Excellence is to question oneself and others. -- Socrates
I suspect too... You didn't reply me if it's in my obligation before the patch is accepted to test the windows build. On Tue, Jan 3, 2012 at 5:15 PM, Michael Niedermayer <michaelni@gmx.at> wrote:
On Tue, Jan 03, 2012 at 04:59:43PM +0100, Tudor SUCIU wrote:
if_nametoindex function exists starting with vista http://msdn.microsoft.com/en-us/library/windows/desktop/bb408409%28v=vs.85%2... GROUP_REQ structure exists starting with Win 2008 server http://msdn.microsoft.com/en-us/library/windows/desktop/bb427440%28v=vs.85%2...
Michael, you said "it must not break compilation". Does it mean that I need to try a compile on WIN32 to see what it gives? If I consider what msdn says, it means that it only works on Windows server 2008.
vlc seems to have the header under a ifdef, so i suspect we need a configure test and a ifdef too
[...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I know you won't believe me, but the highest form of Human Excellence is to question oneself and others. -- Socrates
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Tudor SUCIU <tudor.suciu <at> gmail.com> writes:
I suspect too... You didn't reply me if it's in my obligation before the patch is accepted to test the windows build.
Provide a patch, somebody will hopefully test it. Carl Eugen
Is there any guide how to compile ffmpeg for win32? I somehow had the impression that it works with Visual Studio. If google is right, there are only various hacks with mingw32, so I could eventually try on my linux machine. I cannot just "provide a patch" because I need to see what functions/headers are available. If not we can take for granted the VLC way and I could provide a copy-cat patch. On Tue, Jan 3, 2012 at 6:45 PM, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
Tudor SUCIU <tudor.suciu <at> gmail.com> writes:
I suspect too... You didn't reply me if it's in my obligation before the patch is accepted to test the windows build.
Provide a patch, somebody will hopefully test it.
Carl Eugen
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Tudor SUCIU <tudor.suciu <at> gmail.com> writes:
Is there any guide how to compile ffmpeg for win32? I somehow had the impression that it works with Visual Studio.
No, this is not possible (and never has been), it works with mingw out-of-the-box (since a long time iirc). Carl Eugen
Hello, This is how I finally managed to test the windows build: I downloaded http://www.zeranoe.com/scripts/mingw_w64_build/mingw-w64-build-2.8.4 and build the mingw. Then I used the configure from http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=5&t=14 : ./configure \ --enable-gpl \ --enable-version3 \ --enable-nonfree \ --enable-runtime-cpudetect \ --arch=x86 \ --cpu=core2 \ --prefix=$HOME/host/builds/ffmpeg \ --target-os=mingw32 \ --cross-prefix=x86_64-w64-mingw32- \ --enable-w32threads \ --enable-postproc This patch compiles now on linux, win32, win64. What else needs to be done in order for it to get accepted? On Wed, Jan 4, 2012 at 3:57 PM, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
Tudor SUCIU <tudor.suciu <at> gmail.com> writes:
Is there any guide how to compile ffmpeg for win32? I somehow had the impression that it works with Visual Studio.
No, this is not possible (and never has been), it works with mingw out-of-the-box (since a long time iirc).
Carl Eugen
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
On Sun, Jan 29, 2012 at 03:32:50PM +0100, Tudor SUCIU wrote:
Hello,
This is how I finally managed to test the windows build:
I downloaded http://www.zeranoe.com/scripts/mingw_w64_build/mingw-w64-build-2.8.4 and build the mingw.
Then I used the configure from http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=5&t=14 :
./configure \ --enable-gpl \ --enable-version3 \ --enable-nonfree \ --enable-runtime-cpudetect \ --arch=x86 \ --cpu=core2 \ --prefix=$HOME/host/builds/ffmpeg \ --target-os=mingw32 \ --cross-prefix=x86_64-w64-mingw32- \ --enable-w32threads \ --enable-postproc
This patch compiles now on linux, win32, win64. What else needs to be done in order for it to get accepted?
patch applied sorry for the delay [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Breaking DRM is a little like attempting to break through a door even though the window is wide open and the only thing in the house is a bunch of things you dont want and which you would get tomorrow for free anyway
On Mon, Mar 12, 2012 at 05:32:07AM +0100, Michael Niedermayer wrote:
On Sun, Jan 29, 2012 at 03:32:50PM +0100, Tudor SUCIU wrote:
Hello,
This is how I finally managed to test the windows build:
I downloaded http://www.zeranoe.com/scripts/mingw_w64_build/mingw-w64-build-2.8.4 and build the mingw.
Then I used the configure from http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=5&t=14 :
./configure \ --enable-gpl \ --enable-version3 \ --enable-nonfree \ --enable-runtime-cpudetect \ --arch=x86 \ --cpu=core2 \ --prefix=$HOME/host/builds/ffmpeg \ --target-os=mingw32 \ --cross-prefix=x86_64-w64-mingw32- \ --enable-w32threads \ --enable-postproc
This patch compiles now on linux, win32, win64. What else needs to be done in order for it to get accepted?
patch applied
reverted it breaks compilation on bsd and opensolaris Please submit a better patch :) opensolaris: CC libavformat/txd.o CC libavformat/udp.o /export/home/michael/fate/src/libavformat/udp.c: In function `udp_join_multicast_group': /export/home/michael/fate/src/libavformat/udp.c:131: error: `SOL_IP' undeclared (first use in this function) /export/home/michael/fate/src/libavformat/udp.c:131: error: (Each undeclared identifier is reported only once /export/home/michael/fate/src/libavformat/udp.c:131: error: for each function it appears in.) openbsd: CC libavformat/txd.o CC libavformat/udp.o /home/fate/src/libavformat/udp.c: In function `udp_join_multicast_group': /home/fate/src/libavformat/udp.c:118: error: storage size of `gr' isn't known /home/fate/src/libavformat/udp.c:118: warning: unused variable `gr' gmake: *** [libavformat/udp.o] Error 1 freebsd: CC libavformat/udp.o /home/fate/src/libavformat/udp.c:131:32: error: use of undeclared identifier 'SOL_IP' if (setsockopt(sockfd, SOL_IP, MCAST_JOIN_GROUP, &gr, sizeof(struct group_req)) < 0) { ^ 1 error generated. gmake: *** [libavformat/udp.o] Error 1 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I am the wisest man alive, for I know one thing, and that is that I know nothing. -- Socrates
Tudor SUCIU <tudor.suciu <at> gmail.com> writes:
I used VLC sources in order to duplicate the --miface option so that we could receive multicast udp from a specific interface.
A similar patch was posted in Ticket 368 some time ago, afaict. Carl Eugen
I know the patch but in my tests only the setsockopt ( MCAST_JOIN_GROUP) helps in receiving the multicast data. If I understood well the multicast protocol, the switch/router needs to receive an IGMP packet in order to send the udp traffic. The tiket 368 patch seems related to selecting the source of the udp traffic if it arrives from several IPs. I have tested on a sample program different approaches and setsockopt ( MCAST_JOIN_GROUP) was the only way to receive the udp packets. From my point of view this is not a duplicate of ticket 368. If I need to detail the setup where my patch is needed I will detail it as much as I can taking into account that the network setup is not made by me. (eth0->br0, udp from 239.1.1.1 on vlan br0.2222). On Tue, Jan 3, 2012 at 3:25 PM, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
Tudor SUCIU <tudor.suciu <at> gmail.com> writes:
I used VLC sources in order to duplicate the --miface option so that we could receive multicast udp from a specific interface.
A similar patch was posted in Ticket 368 some time ago, afaict.
Carl Eugen
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
participants (3)
-
Carl Eugen Hoyos -
Michael Niedermayer -
Tudor SUCIU