[Ffmpeg-devel] [PATCH] Networking with MingW
Michael A. Kohn
mike
Mon Nov 6 22:23:06 CET 2006
On Mon, 6 Nov 2006, Alex Beregszaszi wrote:
> Hi,
>
>> I also made a quick #define change in gxf.c so MingW can build a
>> shared DLL. I was getting errors during linking without this change.
>>
>> I really hope someone accepts this patch. I'm trying to convince the
>> company I work for to move to Linux or at least cross-platform and
>> this is the best library (in my opinion) for doing the graphics that
>> we would need.
>
> static AVRational fps_tag2avr(int32_t fps) {
> +#ifndef __MINGW32__
> extern const AVRational ff_frame_rate_tab[];
> +#else
> + extern __declspec(dllimport) const AVRational ff_frame_rate_tab[];
> +#endif
> if (fps < 1 || fps > 9) fps = 9;
> return ff_frame_rate_tab[9 - fps]; // values have opposite order
> }
>
> What the hell is that?
Good question. The linker gave an error about "auto-import" and reading
the man page for ld it said that would fix it. I believe it's forcing
that symbol to be exported or imported for some reason, no sure why. Yes
it's disgusting, but a lot of Windows programming is.
>
>
> +#if !defined(__MINGW32__) && !defined(__BEOS__)
> #include <sys/socket.h>
> #include <netinet/in.h>
> -#ifndef __BEOS__
> -# include <arpa/inet.h>
> -#else
> -# include "barpainet.h"
> -#endif
> #include <netdb.h>
> +#include <arpa/inet.h>
> +#endif
>
> Breaks BEOS support.
>
> Hm, later you include barpainet in host-os. You may split up this patch
> into two: beos-cleanup + win32 support.
Actually, in os_support.h I included the "barpainet.h", so I think it
shouldn't break. And actually it should make all the #includes here look
a lot cleaner by doing it this way.
> --
> Alex Beregszaszi | alex at siqon.com
>
> --
> Alex Beregszaszi | alex at fsn.hu
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>
More information about the ffmpeg-devel
mailing list