[FFmpeg-devel] [RFC] OS support library

Luca Abeni lucabe72
Tue Dec 4 09:13:52 CET 2007


Hi Michael,

Michael Niedermayer wrote:
[...]
>> 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?
> 
> yes

Ok, I am adding it.


>> 2) Also, av_tempfile() (from libavcodec/utils.c) should be a good
>> candidate for libossupport...
> 
> no, not as is
> also my info mkstemp says:
> "Don?t  use this function, use tmpfile(3) instead.  It is better defined
>  and more portable."

Ok. To be sincere, I did not really look at the function: I just saw
something that looked OS-dependent, and I said "ok, let's move it to
libossupport!". I'll have a better look at how the function is implemented
and why it is needed.


>> 3) Maybe libossupport can be used to provide support for missing
>> error numbers
> 
> yes, though that likely should be done after loss is in svn

Ok, this is easier for me ;-)


[...]
>> 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 ;-)
> 
> i think the right thing is to start small and move things slowly over
> (like *tempfile() if its still needed or the errnos)

I like this plan ;-) I'll wait for some time (for getting some more
comments, and waiting for the network stuff), and then I'll send an
updated patch for creating a small and simple libossupport.



			Thanks,
				Luca




More information about the ffmpeg-devel mailing list