From aebfbbf2bdda8e18beef90c16da97bd335f7d3b0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 12 Aug 2012 15:30:21 +0200 Subject: Remove win32/qt/xanim/real binary codecs loading Remove the win32 loader - the win32 emulation layer, as well as the code for using DirectShow/DMO/VFW codecs. Remove loading of xanim, QuickTime, and RealMedia codecs. The win32 emulation layer is based on a very old version of wine. Apparently, wine code was copied and hacked until it was somehow able to load a limited collection of binary codecs. It poked around in the code segment of some known binary codecs to disable unsupported win32 API calls to make them work. Example from module.c: for (i=0;i<5;i++) RVA(0x19e842)[i]=0x90; // make_new_region ? for (i=0;i<28;i++) RVA(0x19e86d)[i]=0x90; // call__call_CreateCompatibleDC ? for (i=0;i<5;i++) RVA(0x19e898)[i]=0x90; // jmp_to_call_loadbitmap ? for (i=0;i<9;i++) RVA(0x19e8ac)[i]=0x90; // call__calls_OLE_shit ? for (i=0;i<106;i++) RVA(0x261b10)[i]=0x90; // disable threads Just to show how utterly insane this code is. You wouldn't want even your worst enemy to have to maintain this. In fact, it seems nobody made major changes to this code ever since it was committed. Most formats can be decoded by libavcodecs these days, and the loader couldn't be used on 64 bit platforms anyway. The same is (probably) true for the other binary codecs. General note about how support for win32 codecs could be added back: It's not possible to replace the win32 loader code by using wine as library, because modern wine can not be linked with native Linux programs for certain reasons. It would be possible to to move DirectShow video decoding into a separate process linked with wine, like the CoreAVC-for-Linux patches do. There is also the mplayer-ww fork, which uses the dshownative library to use DirectShow codecs on Windows. --- configure | 183 +------------------------------------------------------------- 1 file changed, 1 insertion(+), 182 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 2e6187ad37..ce7c4488e7 100755 --- a/configure +++ b/configure @@ -340,7 +340,6 @@ Optional features: --disable-ftp disable FTP support [enabled] --disable-vstream disable TiVo vstream client support [autodetect] --disable-pthreads disable Posix threads support [autodetect] - --disable-w32threads disable Win32 threads support [autodetect] --disable-libass disable subtitle rendering with libass [autodetect] --disable-libass-osd disable OSD rendering with libass [autodetect] --enable-rpath enable runtime linker path for extra libs [disabled] @@ -352,10 +351,6 @@ Codecs: --enable-mng enable MNG input support [autodetect] --enable-jpeg enable JPEG input/output support [autodetect] --enable-libcdio enable libcdio support [autodetect] - --disable-win32dll disable Win32 DLL support [disabled] - --disable-qtx disable QuickTime codecs support [enabled] - --disable-xanim disable XAnim codecs support [enabled] - --disable-real disable RealPlayer codecs support [enabled] --enable-libav skip Libav autodetection [autodetect] --enable-faad enable FAAD2 (AAC) [autodetect] --disable-ladspa disable LADSPA plugin support [autodetect] @@ -493,8 +488,6 @@ _dvdreadconfig=dvdread-config _dvdread=auto _dvdread_internal=auto _libdvdcss_internal=auto -_xanim=auto -_real=auto _live=no _nemesi=auto _lcms2=auto @@ -502,7 +495,6 @@ _xinerama=auto _vm=auto _xf86keysym=auto _alsa=auto -_win32dll=no _select=yes _radio=no _radio_capture=no @@ -511,7 +503,6 @@ _radio_bsdbt848=auto _tv=yes _tv_v4l2=auto _tv_bsdbt848=auto -_tv_dshow=auto _pvr=auto networking=yes _winsock2_h=auto @@ -531,11 +522,9 @@ _translation=no _libdv=auto _cdda=auto _cddb=auto -_qtx=auto _coreaudio=auto _corevideo=auto _cocoa=auto -quicktime=auto _macosx_finder=no _macosx_bundle=auto _sortsub=yes @@ -545,7 +534,6 @@ _gethostbyname2=auto _ftp=auto _vstream=auto _pthreads=auto -_w32threads=auto _ass=auto _libass_osd=auto _rpath=no @@ -736,10 +724,6 @@ for ac_option do --disable-libdvdcss-internal) _libdvdcss_internal=no ;; --enable-dvdnav) _dvdnav=yes ;; --disable-dvdnav) _dvdnav=no ;; - --enable-xanim) _xanim=yes ;; - --disable-xanim) _xanim=no ;; - --enable-real) _real=yes ;; - --disable-real) _real=no ;; --enable-live) _live=yes ;; --disable-live) _live=no ;; --enable-nemesi) _nemesi=yes ;; @@ -760,8 +744,6 @@ for ac_option do --disable-tv-bsdbt848) _tv_bsdbt848=no ;; --enable-tv-v4l2) _tv_v4l2=yes ;; --disable-tv-v4l2) _tv_v4l2=no ;; - --enable-tv-dshow) _tv_dshow=yes ;; - --disable-tv-dshow) _tv_dshow=no ;; --enable-radio) _radio=yes ;; --enable-radio-capture) _radio_capture=yes ;; --disable-radio-capture) _radio_capture=no ;; @@ -812,8 +794,6 @@ for ac_option do --disable-vstream) _vstream=no ;; --enable-pthreads) _pthreads=yes ;; --disable-pthreads) _pthreads=no ;; - --enable-w32threads) _w32threads=yes ;; - --disable-w32threads) _w32threads=no ;; --enable-libass) _ass=yes ;; --disable-libass) _ass=no ;; --enable-libass-osd) _libass_osd=yes ;; @@ -832,9 +812,6 @@ for ac_option do --enable-gethostbyname2) _gethostbyname2=yes ;; --disable-gethostbyname2) _gethostbyname2=no ;; - --enable-qtx) _qtx=yes ;; - --disable-qtx) _qtx=no ;; - --enable-coreaudio) _coreaudio=yes ;; --disable-coreaudio) _coreaudio=no ;; --enable-corevideo) _corevideo=yes ;; @@ -849,9 +826,6 @@ for ac_option do --enable-sortsub) _sortsub=yes ;; --disable-sortsub) _sortsub=no ;; - --enable-win32dll) _win32dll=yes ;; - --disable-win32dll) _win32dll=no ;; - *) echo "Unknown parameter: $ac_option" >&2 exit 1 @@ -1261,7 +1235,6 @@ else CFLAGS="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS" fi -cflag_check -mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer="-mno-omit-leaf-frame-pointer" cflag_check -MD -MP && DEPFLAGS="-MD -MP" @@ -1661,7 +1634,6 @@ else res_comment="v4l2, ao_nas, win32 loader disabled" def_pthreads='#undef HAVE_PTHREADS' _nas=no ; _tv_v4l2=no - mingw32 || _win32dll=no fi echores "$_pthreads" @@ -1674,18 +1646,6 @@ if cygwin ; then fi fi -echocheck "w32threads" -if test "$_pthreads" = yes ; then - res_comment="using pthread instead" - _w32threads=no -fi -if test "$_w32threads" = auto ; then - _w32threads=no - mingw32 && _w32threads=yes -fi -test "$_w32threads" = yes && def_threads='#define HAVE_THREADS 1' -echores "$_w32threads" - echocheck "rpath" if test "$_rpath" = yes ; then for I in $(echo $extra_ldflags | sed 's/-L//g') ; do @@ -2084,19 +2044,6 @@ echores "$_directfb" if darwin; then -echocheck "QuickTime" -if test "$quicktime" = auto ; then - quicktime=no - statement_check QuickTime/QuickTime.h 'ImageDescription *desc; EnterMovies(); ExitMovies()' -framework QuickTime && quicktime=yes -fi -if test "$quicktime" = yes ; then - extra_ldflags="$extra_ldflags -framework QuickTime" - def_quicktime='#define CONFIG_QUICKTIME 1' -else - def_quicktime='#undef CONFIG_QUICKTIME' -fi -echores $quicktime - echocheck "Cocoa" if test "$_cocoa" = auto ; then cat > $TMPC <