[FFmpeg-devel] [PATCH] Re-add OS/2 support

Dave Yeo daveryeo
Tue Sep 11 07:03:40 CEST 2007

Diego Biurrun wrote:
> On Sun, Sep 09, 2007 at 10:48:38AM -0700, Dave Yeo wrote:
>> Diego Biurrun wrote:
>> ...
>>> Patch in its current form is rejected.
>> Lets try a different approach. Attached is the patch that I've been using.
>> Pros
>> As long as the SDL dlls are fairly new we no longer need the MorphToPM 
>> stuff. Also need fairly new SDL and fslib for fullscreen to work.
> Then we should just require new SDL stuff IMO.

Yes, I agree. Also KO Myung-Hun has an nice adaption of ffplay which 
instead of SDL uses native DART and DIVE. 
Actually I am now having some minor problems with ffplay. Doesn't exit 
until I press q and full screen is screwed up. Quite likely my SDL 
install is broken, couple of sets of headers and import libs :)

>> Cons
>> make test creates files in $TMP then can fail as it egreps /tmp
> That is a separate issue, patches welcome.
>> --- ffmpeg/configure	Sun Sep  9 00:01:48 2007
>> +++ ffmpeg.os2/configure	Sun Sep  9 08:55:20 2007
>> @@ -1196,6 +1199,26 @@
>>      targetos=irix
>>      ranlib="echo ignoring ranlib"
>>      ;;
>> +  os/2)
> ffserver works?

It seems to, haven't particularly tested it much. The server regression 
test fails but it also says that ffserver is broken and the regression 
tests fail randomly. For OS/2 it is broken in the sense that it looks 
for its config files in /etc instead of $ETC, separate issue of course.
>> +    LIBPREF=""
>> +    LIBSUF="_s.lib"
>> +    SLIBPREF=""
>> +    SLIBSUF=".dll"

This just fixes the DLL name so instead of foo.dll.xx we get foo.xx.dll 
where xx is the major number. Thanks to the mingw porter for this.


This passes the static lib to dllar.cmd 
a REXX script distributed with GCC which basically extracts the imports 
from the static lib, creates a DEF file, links the object files and DEF 
files into a DLL and also creates the import libs in both a.out and OMF 
format. The -d is for the description in the DEF file and DLL and the 
-omf gives OMF support and -ord gives ordinals to help enforce 
versioning and a small speedup. We then copy the short named DLL over 
the long named DLL.
This is a bit wasteful as the build process builds a broken DLL then 
overwrites it but seemed simplest without making large changes in 
configure and the makefiles.

>> +    SLIB_INSTALL_EXTRA_CMD="-install -m 644 \$(SLIBNAME:\$(SLIBSUF)=.lib) \$(SLIBNAME:\$(SLIBSUF)=.a)"

This just installs the import libs, both OMF and a.out format.
> Maybe you can explain the tricks you are playing here...
> Apart from that the patch looks OK to me.  Mans?
> Diego

I also just realized that make install was slightly broken when built 
with --enable-shared. Updated patch included. (SLIB_INSTALL_EXTRA_CMD 
was missing target and added SLIBNAME_WITH_VERSION).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.diff
Type: text/x-patch
Size: 3259 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070910/6241d5e2/attachment.bin>

More information about the ffmpeg-devel mailing list