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

Martin Storsjö martin
Mon Jul 13 20:32:47 CEST 2009


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 

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 

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.
- 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...
- 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.

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.

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Ugly-fixes-to-compile-ffmpeg-for-wince.patch
Type: text/x-diff
Size: 1147 bytes
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090713/3599f30c/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Fixed-compilation-of-arm-assembly-on-non-elf-archite.patch
Type: text/x-diff
Size: 665 bytes
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090713/3599f30c/attachment-0001.patch>

More information about the ffmpeg-devel mailing list