[FFmpeg-devel] OS/2?
Ramiro Ribeiro Polla
ramiro
Wed Jul 11 00:02:58 CEST 2007
Hello,
2 weeks and 4 days seemed to me a big enough time-frame of discussion to
commit these.
Michael Niedermayer wrote:
[...]
> iam not objecting removing dirty hacks related to os/2 but removing clean
> os2 related code seems like it might harm a possible future attempt to get
> os2 support working again
>
> i mean if we do some functions renaming or other API redesign
> removed code will not get updated ...
>
>
>
>> Index: configure
>> ===================================================================
>> --- configure (revision 9470)
>> +++ configure (working copy)
>> @@ -71,7 +71,6 @@
>> echo " --enable-pp enable GPLed postprocessing support [default=no]"
>> echo " --enable-swscaler software scaler support [default=no]"
>> echo " --enable-beosthreads use BeOS threads [default=no]"
>> - echo " --enable-os2threads use OS/2 threads [default=no]"
>> echo " --enable-pthreads use pthreads [default=no]"
>> echo " --enable-w32threads use Win32 threads [default=no]"
>> echo " --enable-x11grab enable X11 grabbing [default=no]"
>> @@ -612,7 +611,6 @@
>>
>> THREADS_LIST='
>> beosthreads
>> - os2threads
>> pthreads
>> w32threads
>> '
>> @@ -674,7 +672,6 @@
>> malloc_h
>> memalign
>> mlib
>> - os2
>> ppc64
>> sdl
>> sdl_video_size
>> @@ -1184,27 +1181,6 @@
>> targetos=irix
>> ranlib="echo ignoring ranlib"
>> ;;
>> - os/2)
>> - TMPE=$TMPE".exe"
>> - ar="emxomfar -p128"
>> - ranlib="echo ignoring ranlib"
>> - strip="echo ignoring strip"
>> - add_cflags "-Zomf"
>> - FFLDFLAGS="-Zomf -Zstack 16384 -s"
>> - SHFLAGS="-Zdll -Zomf"
>> - FFSERVERLDFLAGS=""
>> - LIBPREF=""
>> - LIBSUF=".lib"
>> - SLIBPREF=""
>> - SLIBSUF=".dll"
>> - EXESUF=".exe"
>> - osextralibs=""
>> - pkg_requires=""
>> - dv1394="no"
>> - ffserver="no"
>> - vhook="no"
>> - os2="yes"
>> - ;;
>> *)
>> targetos="${targetos}-UNKNOWN"
>> ;;
>>
>
> this looks fairly clean to me so IMHO it could be kept, but its mans decission
>
>
Left for Mans to clean up.
>
>> Index: ffmpeg.c
>> ===================================================================
>> --- ffmpeg.c (revision 9470)
>> +++ ffmpeg.c (working copy)
>> @@ -44,11 +44,6 @@
>> #include <termios.h>
>> #include <sys/resource.h>
>> #endif
>> -#ifdef CONFIG_OS2
>> -#include <sys/types.h>
>> -#include <sys/select.h>
>> -#include <stdlib.h>
>> -#endif
>> #undef time //needed because HAVE_AV_CONFIG_H is defined on top
>> #include <time.h>
>>
>> @@ -3142,7 +3137,7 @@
>> do_pass = pass;
>> }
>>
>> -#if defined(__MINGW32__) || defined(CONFIG_OS2)
>> +#if defined(__MINGW32__)
>> static int64_t getutime(void)
>> {
>> return av_gettime();
>>
>
> these are ok to remove, actually the __MINGW32__ is ugly too and should be
> done differently, that is by checking for the availability of the used stuff
> not for the OS/environment
>
>
Done. I'll look into that __MINGW32__ part now.
>
>> Index: Changelog
>> ===================================================================
>> --- Changelog (revision 9470)
>> +++ Changelog (working copy)
>> @@ -89,6 +89,7 @@
>> - codebook generator
>> - RoQ video encoder
>> - QTRLE encoder
>> +- OS/2 support removed
>>
>> version 0.4.9-pre1:
>>
>> Index: libavutil/internal.h
>> ===================================================================
>> --- libavutil/internal.h (revision 9470)
>> +++ libavutil/internal.h (working copy)
>> @@ -101,14 +101,8 @@
>> # define snprintf _snprintf
>> # define vsnprintf _vsnprintf
>>
>> -/* __MINGW32__ end */
>> -#elif defined (CONFIG_OS2)
>> -/* OS/2 EMX */
>> +#endif /* !__MINGW32__ */
>>
>> -# include <float.h>
>> -
>> -#endif /* !__MINGW32__ && CONFIG_OS2 */
>> -
>> #ifdef USE_FASTMEMCPY
>> # include "libvo/fastmemcpy.h"
>> # define memcpy(a,b,c) fast_memcpy(a,b,c)
>>
>
> ok
>
>
Done.
>
>> @@ -116,7 +110,7 @@
>>
>> // Use rip-relative addressing if compiling PIC code on x86-64.
>> #if defined(__MINGW32__) || defined(__CYGWIN__) || \
>> - defined(__OS2__) || (defined (__OpenBSD__) && !defined(__ELF__))
>> + (defined (__OpenBSD__) && !defined(__ELF__))
>> # if defined(ARCH_X86_64) && defined(PIC)
>> # define MANGLE(a) "_" #a"(%%rip)"
>> # else
>>
>
> this should really be checked for in configure and not by keeping a long
> #ifdef list
>
>
Left as is.
Isn't there a way to remove MANGLE completely? I once had a problem
compiling vorbis on MinGW (the encoder lacked the correct ifdef), and
when I asked on #vorbis at freenode.net about this issue, the guy wrote the
decoder went on and on about how bad MANGLE was, and that he got rid of
all those problems when he switched to the "m" constraint.
>
>> Index: libavcodec/Makefile
>> ===================================================================
>> --- libavcodec/Makefile (revision 9470)
>> +++ libavcodec/Makefile (working copy)
>> @@ -318,7 +318,6 @@
>>
>> OBJS-$(HAVE_PTHREADS) += pthread.o
>> OBJS-$(HAVE_W32THREADS) += w32thread.o
>> -OBJS-$(HAVE_OS2THREADS) += os2thread.o
>> OBJS-$(HAVE_BEOSTHREADS) += beosthread.o
>>
>> OBJS-$(HAVE_XVMC_ACCEL) += xvmcvideo.o
>>
>
> iam against removing os2thread.c
> the file does no harm IMHO
> removing it might cause some poor guy to waste his time reimplementing
> it
>
>
Not removed. Although I vote to removing it (that is, if my vote really
counts on this issue).
[...]
>
>> Index: ffplay.c
>> ===================================================================
>> --- ffplay.c (revision 9470)
>> +++ ffplay.c (working copy)
>> @@ -35,23 +35,6 @@
>> #undef main /* We don't want SDL to override our main() */
>> #endif
>>
>> -#ifdef CONFIG_OS2
>> -#define INCL_DOS
>> - #include <os2.h>
>> - #include <stdio.h>
>> -
>> - void MorphToPM()
>> - {
>> - PPIB pib;
>> - PTIB tib;
>> -
>> - DosGetInfoBlocks(&tib, &pib);
>> -
>> - // Change flag from VIO to PM:
>> - if (pib->pib_ultype==2) pib->pib_ultype = 3;
>> - }
>> -#endif
>> -
>> #undef exit
>>
>> //#define DEBUG_SYNC
>> @@ -2533,14 +2516,6 @@
>> /* register all codecs, demux and protocols */
>> av_register_all();
>>
>> - #ifdef CONFIG_OS2
>> - MorphToPM(); // Morph the VIO application to a PM one to be able to use Win* functions
>> -
>> - // Make stdout and stderr unbuffered
>> - setbuf( stdout, NULL );
>> - setbuf( stderr, NULL );
>> - #endif
>> -
>> parse_options(argc, argv, options);
>>
>> if (!input_filename)
>>
>
> ok
>
>
Done.
You didn't comment on the parts from os_support.[hc], but I also
commited then. I hope it's ok.
Ramiro Polla
More information about the ffmpeg-devel
mailing list