Hello Tanguy:

This probably isn't the place for the battle of ffmpeg. I have already had lengthy discussions on the ffmpeg chat list about it and variable initialization and they wouldn't accept my patches for it. Honestly I have not read up on the C standard and only took what they said as being true. They said they adhere to the C99 standard and they sent me a cut and past from the C99 standard that said variables are to be initialized to 0 but honestly can't remember if that is for static or non static or both. It is true that non gcc style compilers will probably not be able to build ffmpeg so for windows your only option I think will be a dll using mingw. I had no problems with this compiler and integrating into existing Microsoft builds but I turn off mmx and mmx2 which is mostly assembly and forces your builds to be GPL instead of LGPL when enabled. This is true also for the libswscale tha they now have you use. If it has assembly enabled then you are GPL else you can use it in an LGPL fashion.

It is a tough library to build but if you can do it it is a very good library at supporting all the codecs. We are getting mpeg feeds with embedded geometries that have a codec that only ffmpeg has been able to read and non of the commercial vendors like Quicktime, Windows media player can read.

Take care

Garrett


On Jul 13, 2009, at 7:24 AM, Tanguy Fautre wrote:


Hi Garrett,

A bit OT, but which part of the C standard says that all uninitialized variables shall default to 0? The only zero initialization guarantee of the C standard I know of is related to static variables (which MSVC supports).

If what you say about FFmpeg expected C behaviour is true, it sounds to me that FFmpeg is relying on a non-standard extensions of GCC.


If you don’t mind, I’ll take your email as an opportunity to express my biggest complain about the FFmpeg project: its portability.

On the current situation of FFmpeg on Windows, IMHO the FFmpeg dev team has abslolutely no valid reasons for not making FFmpeg portable. In fact, it looks like they took several decisions with the sole purpose of making FFmpeg a GCC-only / MSVC-incompatible product. Reading their rant about MSVC on the official website tends to confirm that some of their choices are mainly motivated by anti- microsoft political reasons rather than technical.

- They’ve chosen to rely on the C99 standard, which is not as widely as supported as C89 and C++98. GCC is the only widely-used compiler that comes close to having a full C99 support (followed by the Intel compiler), but even GCC is still missing several features (http://gcc.gnu.org/c99status.html ). MSVC and Borland have little C99 support.

- They use the AT&T assembly syntax for x86/x86-64 assembly code instead of using the Intel assembly syntax or Intel intrinsics.

These two decisions alone mean that one would have to rewrite most of FFmpeg to get it compiling on any compiler that is not a GCC- clone. While there is nothing close to FFmpeg on the market (open or closed source), while I’m a huge supported of FFmpeg and related projects, such poor decisions are ridicule from a software engineering point of view and ultimately hurts FFmpeg.


Tanguy



From: [email protected] [mailto:[email protected] ] On Behalf Of Garrett Potts
Sent: 11 July 2009 03:24
To: OpenSceneGraph Users
Subject: Re: [osg-users] ffmpeg stdint on Windows?

Hello All:

The link below is the one I used before to add stdint.h and inttypes.h. I use it for the builds on windws. I have sucessfully used mingw then use Microsofts implib tool to create a import lib for the dll.

Like they said below. ffmpeg will not build on MSVC and even if you can the ffmpeg dev team rely heavily on c standard that defines all uninitialized variables shall default to 0. MSVC does not put anything in an uninitialized variables and most of the variable definitions in ffmpeg core library are unnitialized. The only option is to use mingw to build a dll file and I use the implib to generate a import library for the dll.



Take care all


Garrett

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to