[FFmpeg-devel] OS/2?

Michael Niedermayer michaelni
Wed Jul 4 22:52:07 CEST 2007


Hi

On Wed, Jul 04, 2007 at 04:11:10PM -0300, Ramiro Ribeiro Polla wrote:
> wrote:
> >Hi,
> >
> >Diego Biurrun dijo:
> >  
> >>On Fri, Jun 29, 2007 at 05:17:24PM -0300, Ramiro Ribeiro Polla wrote:
> >>    
> >>> wrote:
> >>>      
> >>>>Ramiro Ribeiro Polla <ramiro at lisha.ufsc.br> writes:
> >>>>
> >>>>        
> >>>>>Luca Barbato wrote:
> >>>>>
> >>>>>          
> >>>>>>Ramiro Ribeiro Polla wrote:
> >>>>>>
> >>>>>>            
> >>>>>>>Patch attached. Since no one came up in the 7 months the build
> >>>>>>>              
> >>>has been broken, I doubt they'll shout now.
> >>>      
> >>>>>>I'd wait for git and I'd leave a branch called os2-bitroting with
> >>>>>>            
> >>>that code, maybe somebody from eComStation could be interested in
> >>>fixing stuff.
> >>>      
> >>>>>Sounds reasonable.
> >>>>>          
> >>>>Why wait for anything?  If someone wants to resurrect it, the code
> >>>>        
> >>>will still be in the version history
> >>>
> >>>Well, removing support for a system seems like something big (to me,
> >>>at  least). But, there's still no manifestation from OS/2 users.
> >>>
> >>>So, is the patch ok to apply now, with that dropped support note in
> >>>configure?
> >>>      
> >>I agree with Mans, just remove it.  Personally, I wouldn't even leave
> >>the note in configure.
> >>    
> >
> >Though a note in Changelog and a mention in ffmpeg-user would be nice, 
> >IMHO.
> >
> >  
> 
> Should we remove first, and then announce it on ffmpeg-user, or the 
> other way around? It's unlikely that someone that reads ffmpeg-user but 
> not ffmpeg-devel might help here...
> 
> Is any version bump necessary?
> Patch attached. To commit along with svn rm libavcodec/os2thread.c. Ok 
> to apply?

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


> 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


> 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


> @@ -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


> 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


> Index: libpostproc/mangle.h
> ===================================================================
> --- libpostproc/mangle.h	(revision 9470)
> +++ libpostproc/mangle.h	(working copy)
> @@ -26,7 +26,7 @@
>  
>  /* Feel free to add more to the list, eg. a.out IMO */
>  /* Use rip-relative addressing if compiling PIC code on x86-64. */
> -#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__OS2__) || \
> +#if defined(__CYGWIN__) || defined(__MINGW32__) || \
>     (defined(__OpenBSD__) && !defined(__ELF__))
>  #if defined(ARCH_X86_64) && defined(PIC)
>  #define MANGLE(a) "_" #a"(%%rip)"

this looks duplicated from libavutil/internal.h


> 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


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070704/da3bccff/attachment.pgp>



More information about the ffmpeg-devel mailing list