[FFmpeg-devel] libossupport status

Vadim Lebedev vadim
Sat Dec 22 22:18:41 CET 2007



Michael Niedermayer wrote:

>On Sat, Dec 22, 2007 at 08:06:51PM +0100, Vadim Lebedev wrote:
>  
>
>>Luca Abeni wrote:
>>
>>    
>>
>>>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?
>>>
>>>
>>> 
>>>
>>>      
>>>
>>I wonder how do you intend to implement missing POSIX functionality on 
>>Win32 plaftorm
>>    
>>
>
>Theres no intention to implement it all, just what we need in ffmpeg.
>
>
>  
>
>>For example on win32  close()  will not accepts socket handles  and 
>>select()  will not work on file handles, meaning
>>    
>>
>
>If win32 supports closing sockets, there should be a function doing that,
>that can then be used. If it supports the equivalent of select() on files
>AND we need that, then the existing function can be used.
>If win32 doesnt support XYZ and we do have a implementation for it currently,
>that can be moved from libavformat to libossupport. If we win32 doesnt
>support XYZ and we do not have a implementation for it there wont be one
>on libossupport either. At least not until some win32 devel implements it.
>
>  
>
I'm affraid i was not clear enough:

Suppose that ffmpeg (or one of components) use 'close(fd)'   to close 
file decriptors and sockets.
On WIN32 it means that ossupport will have to imlement 'close' routine 
which takes a pseudo fd determinine if it relates to file descriptor
or socket descriptor and do esear call to 'original_close(realfd[fd])'  
or closesocket(realdsocket[fd]).
Now in order for this to work we need we need to implement our owne 
version of 'open' and 'socket' APIs.
And of course most of the syscalls which accepts file decritptors.

This will pose 2 problems: 
1) Sheer amouht of work
2) public symbol clash. 
    It will be difficutl to have our  'close' function which will be 
called 'close' by the way to call original 'close' for C runtime library


The current approach with "#include "os_support.h"  avoid all these problems


Thanks
Vadim



>[...]
>
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>ffmpeg-devel mailing list
>ffmpeg-devel at mplayerhq.hu
>http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>




More information about the ffmpeg-devel mailing list