summaryrefslogtreecommitdiffstats
path: root/loader
Commit message (Collapse)AuthorAgeFilesLines
* Remove win32/qt/xanim/real binary codecs loadingwm42012-08-1689-35198/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* loader: remove weird kstat thingwm42012-08-031-47/+0
| | | | | Apparently the win32 binary codec loader used this to retrieve the CPU frequency on Solaris.
* Rip out 3DNOW supportwm42012-07-301-2/+0
| | | | | | | | Ancient AMD specific enhancement to the MMX instruction set. Officually discontinued by AMD. Note that support for this was already disabled in the previous commit. This commit removes the actual code.
* Remove compile time/runtime CPU detection, and drop some platformswm42012-07-301-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mplayer had three ways of enabling CPU specific assembler routines: a) Enable them at compile time; crash if the CPU can't handle it. b) Enable them at compile time, but let the configure script detect your CPU. Your binary will only crash if you try to run it on a different system that has less features than yours. This was the default, I think. c) Runtime detection. The implementation of b) and c) suck. a) is not really feasible (it sucks for users). Remove all code related to this, and use libav's CPU detection instead. Now the configure script will always enable CPU specific features, and disable them at runtime if libav reports them not as available. One implication is that now the compiler is always expected to handle SSE (etc.) inline assembly at runtime, unless it's explicitly disabled. Only checks for x86 CPU specific features are kept, the rest is either unused or barely used. Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler to select decent settings. Get rid of support for the following operating systems: - BSD/OS (some ancient BSD fork) - QNX (don't care) - BeOS (dead, Haiku support is still welcome) - AIX (don't care) - HP-UX (don't care) - OS/2 (dead, actual support has been removed a while ago) Remove the configure code for detecting the endianness. Instead, use the standard header <endian.h>, which can be used if _GNU_SOURCE or _BSD_SOURCE is defined. (Maybe these changes should have been in a separate commit.) Since this is a quite violent code removal orgy, and I'm testing only on x86 32 bit Linux, expect regressions.
* Remove QTX testswm42012-07-282-193/+0
| | | | Whatever.
* build: remove OS/2 supportUoti Urpala2012-04-062-23/+0
|
* cleanup: Silence compilation warnings on MinGW-w64wm42012-03-0115-85/+69
| | | | | | | | | | | | | | | | | | | Some of the code, especially the dshow and windows codec loader parts, are extremely hacky and likely full of bugs. The goal is merely getting rid of warnings that could obscure more important warnings and actual bugs, instead of fixing actual problems. This reduces the number of warnings from over 500 to almost the same as when compiling on Linux. Note that many problems stem from using the ancient wine-derived windows headers. There are some differences to the "proper" windows header. Changing the code to compile with the proper headers would be too much trouble, and it still has to work on Unix. Some of the changes might actually break compilation on legacy MinGW, but we don't support that anymore. Always use MinGW-w64, even when compiling to 32 bit. Fixes some warnings in the win32 loader code on Linux too.
* loader/module.c: Fix compilation with --disable-qtxreimar2011-07-061-5/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33756 b3059339-0415-0410-9bf9-f77b7e298cf2
* loader: Remove __ptr32 and __ptr64 typedefsreimar2011-01-291-12/+0
| | | | | | | | We do not need them and they cause compilation errors with cygwin's mingw-w64 cross-compilers (32 bit target) since its _mingw.h has a "#define __ptr32", which makes these typedefs an invalid syntax. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32728 b3059339-0415-0410-9bf9-f77b7e298cf2
* cleanup: remove NULL checks before free() all over the codecboesch2010-11-148-26/+14
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32624 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Remove some obsolete and misleading commentsdiego2010-11-021-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32482 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove #warning preprocessor directivesdiego2010-11-025-8/+8
| | | | | | | | The #warning preprocessor directive is non-standard and not available with all compilers. Furthermore, the warnings it causes are noisy and have not led to getting any of the underlying issues fixed in the space of a decade. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32480 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove remaining %lf printf conversionsreimar2010-11-021-5/+5
| | | | | | Most cases are just code in comments. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32438 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Remove vim/emacs coding style hints from sourcesdiego2010-11-022-4/+0
| | | | | | The hints are inconsistent and pointless if only present in a few files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32223 b3059339-0415-0410-9bf9-f77b7e298cf2
* cleanup: malloc+memset->calloc, sizeof(TYPE)->sizeof(*ptr)reimar2010-11-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace malloc+memset by calloc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32181 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32182 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32183 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace some sizeof(type) by sizeof(*pointer) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32184 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32186 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32187 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32188 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizoef(type) by sizeof(*ptrvar). Besides being consistent with FFmpeg style, this reduces the size of a patch to rename these types to not conflict with the windows.h definitions. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32189 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32191 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32192 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizeof(type) by sizeof(*ptrvar) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32193 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove a useless cast. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32194 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizeof(type) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32195 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove a useless cast. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32196 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace several sizeof(WAVEFORMATEX) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32197 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace one more instance of sizeof(WAVEFORMATEX); fix compilation. patch by Clément Bœsch, ubitux gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32199 b3059339-0415-0410-9bf9-f77b7e298cf2 Avoid some pointless uses of sizeof() and one related cast. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32200 b3059339-0415-0410-9bf9-f77b7e298cf2 Merge one malloc() + memset() invocation into calloc(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32202 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32203 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizeof(WAVEFORMATEX) occurrences. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32205 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32206 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizeof(BITMAPINFOHEADER) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32207 b3059339-0415-0410-9bf9-f77b7e298cf2
* loader: Move local_wm extern variable declaration to loader.hdiego2010-11-022-4/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32161 b3059339-0415-0410-9bf9-f77b7e298cf2
* loader: Move fs_seg extern variable declaration to ldt_keeper.hdiego2010-11-022-2/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32133 b3059339-0415-0410-9bf9-f77b7e298cf2
* loader: Disable loading codecs from the current directoryreimar2010-11-021-0/+4
| | | | | | | | | | While convenient, it is too risky. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32025 b3059339-0415-0410-9bf9-f77b7e298cf2 100l, we need to search for SetDllDirectoryA instead of SetDllDirectory git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32026 b3059339-0415-0410-9bf9-f77b7e298cf2
* loader: Add msvcr100 support to the win32 loaderalexc2010-11-021-0/+10
| | | | | | This is required for the Expression Screen Codec binary decoder. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31906 b3059339-0415-0410-9bf9-f77b7e298cf2
* loader: Reuse do_cpuid from cpudetect.c in loader/win32.creimar2010-11-021-15/+1
| | | | | | Also avoids several "used uninitialized" warnings. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31905 b3059339-0415-0410-9bf9-f77b7e298cf2
* loader/win32.c: misc cleanupreimar2010-11-021-32/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make library/export function tables static const. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31898 b3059339-0415-0410-9bf9-f77b7e298cf2 Avoid mixing code and declarations. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31899 b3059339-0415-0410-9bf9-f77b7e298cf2 Make function declarations proper prototypes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31900 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix type in conditional. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31901 b3059339-0415-0410-9bf9-f77b7e298cf2 Avoid arithmetic on void * pointers. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31902 b3059339-0415-0410-9bf9-f77b7e298cf2 Add const to avoid warnings. The const on the return type is not correct compared to the real win32 API functions, but that really does not matter for us, avoiding the warning is more useful. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31903 b3059339-0415-0410-9bf9-f77b7e298cf2
* loader/win32.c: remove sys/timeb.h includecompn2010-11-021-1/+0
| | | | | | It is obsolete and breaks compilation with new gcc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31868 b3059339-0415-0410-9bf9-f77b7e298cf2
* loader/dshow/graph.h: Add prototypes for exported FilterGraph_ functionsdiego2010-11-021-0/+19
| | | | | | This fixes a bunch of missing prototype warnings. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31551 b3059339-0415-0410-9bf9-f77b7e298cf2
* loader: Rename loader/qt_comp.h --> loader/qt_comp_template.cdiego2010-11-022-7/+2
| | | | | | | | It is not a header file but rather a template that is #included multiple times with different DECL_COMPONENT macro definitions. All other similar files follow the _template.c suffix naming scheme. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31456 b3059339-0415-0410-9bf9-f77b7e298cf2
* loader/qtx: cleanupdiego2010-11-022-30/+2
| | | | | | | | | | | | | | | | | | | | | | Remove unused function ComponentDummy(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31406 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove unnecessary get_path() declaration. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31408 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove unnecessary get_path() declaration. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31409 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace forward declarations by loader/wine/winbase.h #include. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31410 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove unnecessary and unused #defines. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31411 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge svn changes up to r31197Uoti Urpala2010-05-303-37/+27
|\
| * Add final missing bits of CineForm HD support on Linux (via the Windowssesse2010-05-232-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DirectShow codec). Required changes: - codecs.conf entry (of course). - Allow opening files with “.col” in the file name, just like “vp3” and “.fpf” already was allowed. (CineForm expects to be able to do this, presumably for some color management code.) - In registry.c, fake a few registry keys that the codec expects the installer to have written. Also, change a few magic numbers (0, 2) to the appropriate constants (ERROR_SUCCESS, ERROR_FILE_NOT_FOUND) where appropriate, so the code is easier to follow. SMP works fine, but seemingly performs suboptimally (e.g., on my dual-core laptop, CineForm performs better if I lie to it and tell it I have four cores). I don't know if this is inherent in the codec, or some inefficiency in the emulated synchronization primitives. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31196 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove unused function MODULE_DecRefCount(), fixes the warning:diego2010-05-231-33/+0
| | | | | | | | | | | | | | loader/module.c:618: warning: 'MODULE_DecRefCount' defined but not used git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31195 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31176Uoti Urpala2010-05-301-1/+1
|\|
| * Silence a gcc warning about char trying to be packed.cehoyos2010-05-131-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31172 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31004Uoti Urpala2010-04-261-0/+2
|\|
| * Mark parameterless function declarations as (void). Fixes the warnings:diego2010-04-041-0/+2
| | | | | | | | | | | | | | | | loader/wine/msacm.h:693: warning: function declaration isn't a prototype loader/wine/msacm.h:901: warning: function declaration isn't a prototype git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31003 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30967Uoti Urpala2010-04-267-94/+41
|\|
| * Don't try to delete the global memory mutex in the Win32 loader code,sesse2010-03-251-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | since it's now statically allocated and will not be reallocated if a new allocation comes along. This also fixes an issue where the mutex would not always be properly unlocked, leading to deadlocks. I thought I'd committed that ages ago, but obviously not, and it broke CineForm initialization. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30957 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove /usr[/local]/lib/win32 from the list of Win32 codec search paths.diego2010-03-241-1/+1
| | | | | | | | | | | | | | | | These paths have been deprecated a long time ago, just searching the default binary codec path is enough nowadays. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30955 b3059339-0415-0410-9bf9-f77b7e298cf2
| * loader: Remove commented-out extra_ld_library_path cruft.diego2010-03-232-3/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30953 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Get rid of pointless def_path variable; use codec_path directly instead.diego2010-03-233-13/+16
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30949 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename get_path.[ch] --> path.[ch].diego2010-03-205-5/+5
| | | | | | | | | | | | | | These files now contain different functions related to path handling. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30943 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Move SetCodecPath() from loader to get_path.c and make it unconditional.diego2010-03-206-42/+4
| | | | | | | | | | | | | | | | This fixes compilation with the Win32 loader disabled but other binary codec loaders enabled. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30942 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Split codec path related code into a separate file to fix Windows build.reimar2010-03-187-26/+42
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30930 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix thread safety issue in mreq_private: last_alloc was accessed from multiplesesse2010-03-171-8/+3
| | | | | | | | | | | | | | | | threads without being under a mutex. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30928 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Announce Windows XP SP2 instead of Windows 95 OSR2.sesse2010-03-171-31/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's time we move to 2010: Announce Windows XP SP2 to codecs instead of Win95 OSR2. Note: We still don't support the *Ex fields in the version info struct properly (we shouldn't really overwrite the structure size, but rather check it to see if it's safe to fill the extra fields). No codec I've found seems to care. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30927 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Announce SMP support for Win32.sesse2010-03-171-7/+0
| | | | | | | | | | | | | | | | | | | | | | Don't hardcode dwNumberOfProcessors=1 for Win32 anymore; the mutex/event code is still far from perfect, but now good enough that I can't find any codecs that breaks with this (tested on a quad with various codecs). This tells codecs they can use more than one core if they want to (some already did, by launching multiple threads even when told there was only a single core). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30926 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30917Uoti Urpala2010-04-261-1/+2
|\|
| * Fix return value of InitializeCriticalSectionAndSpinCount.sesse2010-03-161-1/+2
| | | | | | | | | | | | | | | | | | InitializeCriticalSectionAndSpinCount returns a nonzero value on success, and some codecs (notably VP7) seemingly got confused when it didn't, if and only if we tried to emulate NT or newer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30913 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30907Uoti Urpala2010-04-264-3/+80
|\|
| * Fix indentation in GetVersionExW.sesse2010-03-151-5/+5
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30902 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add support for Apple's ProRes and AIC codecs, now that all prerequisitessesse2010-03-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | are in place. Add codecs.conf entry for both codecs, and qt_comp.h entry for ProRes (not used except for debugging, so mainly for completeness). Both work with -demuxer mov only, as all other QuickTime binary codecs. AIC s