[FFmpeg-devel] libossupport status

Luca Abeni lucabe72
Sat Dec 22 12:20:51 CET 2007

Hi all,

int the last weeks, I've been silent about libossupport, but I continued
to work on it. Here is a report about the current status of things.

First of all, the requirements:
1) Eliminate all the OS-dependent code from libav* (this can be achieved
in small steps)
2) For standard (POSIX?) systems, no dependency on libossupport should
be created
3) libav* code should use standard (POSIX?) functions, and the
implementation of such functions for non-standard systems should be
provided by libossupport
4) It seems that most of the developeres do not want libossupport in
ffmpeg, but want it as an external library.

Did I understand the requirements correctly? Am I forgetting anything?

Based on the requirements listed above, I developed the attached
patch... It builds ok on Linux x86 (32), and passes some tests. I also
checked the compilation log, and no new warnings are introduced.

Obviously, the patch breaks the compilation on almost all the non-Linux
platforms. On such platforms, libossupport is needed. I developed the
attached prototype by copying some code from libavformat, and it allows
to cross-compile mingw binaries from Linux (I suppose native mingw
builds are ok too, but I cannot test - no windows machines here).
The attached libossupport is just a prototype for testing, and it has a
lot of limitations:
1) The build system is just a joke. It allows to cross-compile from
Linux, but you will probably have to edit config.mak by hands
2) I created some empty header files, and put all the code in
netinet/in.h... This probably has to be split in the different headers
3) Only mingw is currently supported

(Note that as I previously said I am not interested in maintaining an
external OS support library... So, not expect me to work too much on the
external libossupport)

How I compile:
1) cd /tmp; tar xvzf loss-3.tgz; cd libossupport; make
2) download ffmpeg from svn, and apply remove_ossupport-2.diff
3) ./configure --cross-compile --cross-prefix=i586-mingw32msvc- --enable-memalign-hack --target-os=mingw32 --extra-cflags="-I /tmp/libossupport" --extra-ldflags="-L /tmp/libossupport" --extra-libs="-lws2_32 -lossupport"
(As you can see, compiling for non-Linux platforms can become a
nightmare - maybe we can add a --with-libossupport switch to configure?)

Anyway, the resulting binaries seem to work ok (tested with wine), and
network works too (I did some streaming tests).

As usual, comments and feedback are more than welcome.

			Thanks & Merry Christmas,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove_ossupport-2.diff
Type: text/x-patch
Size: 5310 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071222/3fc7f254/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loss-3.tgz
Type: application/x-compressed-tar
Size: 3294 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071222/3fc7f254/attachment-0001.bin>

More information about the ffmpeg-devel mailing list