Created by: jojje
Patch that makes it possible to compile the project on windows using the mingw64 compiler. I've only tested with the 32-bit version of the compiler since I'm only using the official 32-bit version of python 2.7 on that platform.
I imaging this patch will have to be reworked a lot before you feel it could be considered, since it smells a bit forced atm. However I've tried to group the windows specific parts into one conditional per file, to make it easy to spot what parts are "generic" and which are very platform specific.
The patch requires the user to put the compiled libav libraries and their two mingw dll dependencies into the av-directory, so that your cython wrappers can find them at runtime. If the user forgets to do that, a "helpful" assertion error will be triggered on the windows platform.
Final remark is that since there's no standard directory for libraries on windows, people who build ffmpeg on that platform may place the code and build artifacts anywhere. Since you rely on pkg-config to figure out how which source files to analyze and which libraries to link against, windows users will have to give setuputils a hint. That is, set PKG_CONFIG_PATH
to point to the pkgconfig
directory that resulted from their build of ffmpeg.
The unix/linux behavior should be unchanged.
Let me know what you think.