[FFmpeg-devel] [RFC] OS support library
Mon Dec 3 17:04:41 CET 2007
ok, here is a start... It is not a complete libossupport yet
(so this is an RFC, not a real patch submission), but I post
it so that the discussion can move on.
Basically, I just moved os_support.* and network.h from
libavformat to the new library. After this, libavformat should
not contain any OS-dependent code.
Some things to think about:
1) I think the lrintf() replacement that we currently have in
libavutil/internal.h should be moved to libossupport too.
What do other people think about it?
2) Also, av_tempfile() (from libavcodec/utils.c) should be a good
candidate for libossupport...
3) Maybe libossupport can be used to provide support for missing
4) Finally, the ff_socket_nonblock() function can be probably
eliminated by providing (inside libossupport) a partial fcntl()
replacement for windows, as suggested by Michael (I think).
Note that in some cases libossupport.a could really be an empty
library (and libossupport could be needed only for providing some
#defines and inline functions inside the headers). I still have
to address this situation.
The new library can be created by doing
svn mkdir libossupport
svn mv libavformat/os_support.h libossupport
svn mv libavformat/os_support.c libossupport
svn cp libavformat/Makefile libossupport
svn mv libavformat/network.h libossupport
and applying the attached patch.
I tested it on linux and mingw (by cross-compiling from linux and
using wine to execute the resulting binary), static and dynamic
Before going on, I'd like to see some more discussion, and to be sure
that this is the way we want to go (if it is not, suggestions about
the right thing to do are welcome ;-)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the ffmpeg-devel