[FFmpeg-devel] [PATCH] WinCE does not support _lseeki64

Måns Rullgård mans
Mon Jul 13 21:12:41 CEST 2009

Martin Storsj? <martin at martin.st> writes:

> Hi,
> To anybody reading; the attachedes patch are not for review, they're only 
> attached for reference.
> On Mon, 13 Jul 2009, Ismail D?nmez wrote:
>> > Is this the only change necessary to properly compile on wince?
>> > There's someone who started a fork of FFmpeg for windows CE [0], but I
>> > haven't diffed his source code to FFmpeg vanilla yet, and so far he
>> > has ignored my requests to explain what changes he did to the source
>> > code. I haven't tested and don't intend to but it seems promising.
>> Exact command line is :
>> ./configure --enable-cross-compile --arch=generic --disable-debug
>> --disable-static --enable-shared --disable-devices --disable-ffmpeg
>> --disable-ffserver --disable-network --target-os=mingw32
>> --disable-demuxer=mov --enable-memalign-hack
>> I just did a small configure hackery to comment out lib.exe invocation
>> on WinCE. But thats a hack not a patch. Other than that it compiles
>> fine. Running on WinCE is another story. No success yet.
> I've successfully built and run ffmpeg on WinCE (based on r18980). I've 
> got a small bunch of patches that I haven't had time to polish up for 
> inclusion yet, but this one that was applied was similar to one of them.
> Ismail: If you're on windows mobile 6.1, the issue with running may be 
> this: 
> http://cegcc.sourceforge.net/docs/faq.html#DllDoesNotWorkWithWindowsMobile6.1
> Other than this, there are a few things that I did otherwise than Ismail. 
> I'm configuring it with these flags: --target-os=mingw32 
> --cross-prefix=arm-mingw32ce- --enable-shared --arch=arm --cpu=armv4t 
> --disable-network
> The remaining issues (in my case) are the following:
> - libavcodec/arm/asm.S has a few elf-specific arm attributes 
>   (.eabi_attribute, .type). I solved these by just commenting them out 
>   (see one of the attached patches), a proper solution would probably be 
>   to check for the binary format in configure and enable them 
>   conditionally. But I don't have any real clue about arm assembly... I 
>   can give more details or test out solution proposals if somebody's 
>   interested in fixing it.

These should be easy to fix.  Does ".type foo, STT_FUNCTION" work?  If
not, we can simply disable this too.  It's not essential, but useful
for debugging.

> - libavformat/mov.c uses strerror/errno that aren't available on WinCE. 
>   (As already mentioned in this thread.) Haven't got any non-hackish patch 
>   to propose for this...

Implement them properly in an add-on library.

> - ffmpeg.c needs a whole bunch of ugly hacks, attached here just for 
>   reference. signal.h (and the whole concept of signals) are missing, 
>   GetProcessTimes is declared but not present in the link libraries, 
>   conio.h is available but doesn't contain anything. And perror, strerror, 
>   errno and isatty are unavailable.

None of these are essential.  We just need to test for them, and
disable whatever isn't available.

> Additionally, I locally reverted SVN commits 15522 and 15793 since I 
> didn't bother to try to manually build a newer mingw32ce.
> The mingw32ce toolchain needs a minor change to the headers, to stop it 
> from failing when including errno.h.
> I've got a few minor additions to the configure script, though, that I can 
> send in separate threads.


M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list