summaryrefslogtreecommitdiffstats
path: root/loader
Commit message (Collapse)AuthorAgeFilesLines
* 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 support is for OS X only, and untested. Split out from a patch Andrew Wason (r e c t a l o g i c <at> rectalogic <dot> com) posted in June. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30901 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Implement GetVersionExW with the same data as GetVersionExA but taking in asesse2010-03-151-0/+67
| | | | | | | | | | | | | | | | different structure, and CreateMutexW, CreateEventW and CreateSemaphoreW as simple wrappers around the A versions. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30900 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use the high-level QuickTime decoding APIs (DecompressSequenceFrameS andsesse2010-03-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | friends) instead of the unsupported, internal ones (ImageCodecBeginBand etc.). This is a prerequisite for, among others, Apple ProRes 4:2:2 support, and simplifies the file by quite a bit. Tested on Linux with all existing QuickTime codecs I could get to work in the first place; qt261, qtavui, qtsvq3 have no change. qtcvid appears to not give bit-exact the same output as before, but it looks just the same in playback to me. qt3ivx stops crashing on exit (so works better than before). With some extra patches and a codecs.conf entry, ProRes 4:2:2 also works, including on Linux. Since codec initialization is now actually done on decoder init instead of on first frame, fallback should also work a bit better (although usually, qtvideo is last in the chain). Also made the decoder complain explicitly if the demuxer data is not there (ie., the user tried to run without -demuxer mov). This patch is a cleaned up version of what Andrew Wason (rectalogic A rectalogic D com) posted to mplayer-dev-eng in June. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30899 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Replace separate Win32, XAnim and Real codec directories by one global dir.diego2010-03-142-3/+3
| | | | | | | | | | | | | | | | | | Nowadays MPlayer does not use the codecs from other installed programs. A runtime setting will soon take over the rare case that binary codecs should be searched for in non-standard directories. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30888 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Delete things related to old translation systemUoti Urpala2010-03-101-1/+0
| | | | | | | | | | Remove the help/ subdirectory, configure code to create toplevel help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
* | Merge svn changes up to r30876Uoti Urpala2010-03-109-40/+431
|\|
| * Fix a syntax error in graph.h.sesse2010-03-091-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30874 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add copyright headers.sesse2010-03-092-0/+37
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30873 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Style changes as requested by Diego.sesse2010-03-092-38/+37
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30872 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Commit files by Steinar Gunderson, forgotten in r30866.cehoyos2010-03-092-0/+184
| | | | | | | | | | | | | | Fixes compilation on x86-32. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30870 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Implement DirectShow filter graph.sesse2010-03-085-4/+45
| | | | | | | | | | | | | | | | | | | | DirectShow specifies that a filter (codec) can expect JoinFilterGraph to be called, and store a reference to the graph manager. Implement a very bare-bones graph manager (all functions are stubs, and no extra interfaces are implemented) and give it to the codec on init. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30866 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Correct QuickTime dpi output.sesse2010-03-081-2/+2
| | | | | | | | | | | | | | | | The dpi value for QuickTime codecs is stored as Fixed16 (16.16 fixed-point), not int. Correct the output value accordingly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30865 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Implement ResumeThread and SignalObjectAndWait.sesse2010-03-081-0/+31
| | | | | | | | | | | | | | | | | | Relatively simplistic implementations of ResumeThread (stub) and SignalObjectAndWait (bAlertable is ignored). Both are needed for ProRes 4:2:2 support on Linux. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30861 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix QuickTime emulated OSErr type.sesse2010-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The OSErr type on Mac OS X is int16_t, not int32_t (see http://developer.apple.com/mac/library/documentation/QuickTime/Reference/QTRef_DataTypes/Reference/reference.html). The upper 16 bits will typically be something random (they're entirely undefined). Change the type so it's right; a few places tried to compensate for this by masking out the upper bits, but a few places also missed them, which made for unpredictable behavior. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30854 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Implement Win32 mutexes.sesse2010-03-061-27/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement Win32 mutexes; they used to just be mapped on top of events, which is not the same thing at all. The implementation is pretty much the obvious one, similar to the current critical section implementation and the semaphore implementation; a single lock count protected by a pthread mutex, and an event lockers can sleep on to know when the mutex is available. Also make CreateMutexA and ReleaseMutex available even if QuickTime codecs support is not configured. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30853 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix semaphore behavior in WaitForSingleObject.sesse2010-03-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Two simple bugfixes for semaphores in WaitForSingleObject: First, semaphore count should be decreased on loading the semaphore, not increased. The case for duration=0 had this wrong (duration=-1 was fine). Second, the code for duration=-1 forgot to set the return value, so it would always return WAIT_FAILED. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30852 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make Win32 mutex and thread linked lists thread safe.sesse2010-03-061-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | loader/win32.c contains a global linked list of all existing mutexes (whose head is called mlist), which is accessed from multiple threads, and as such needs to be protected by a mutex. Fixed. Same thing for the global linked list of all existing threads, whose head is called list. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30851 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30848Uoti Urpala2010-03-101-27/+65
|\|
| * Make GetModuleHandle(NULL) return a valid pointer.sesse2010-03-051-5/+19
| | | | | | | | | | | | | | | | | | | | | | Some codecs, and more recently Microsoft's CRT library, expect GetModuleHandle(NULL) to return a pointer to the program's PE header mapped in memory. Thus, just returning 0x0 or 0x1 won't do it anymore, so create a minimal PE header and return that. Patch originally by Gianluigi Tiesi ( mplayer (at) netfarm (dot) it ). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30848 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Partial revert of r30843.sesse2010-03-051-17/+5
| | | | | | | | | | | | | | | | | | Some extra changes snuck into my commit; they'll probably be reviewed and committed to Subversion eventually, but were not part of the fix for WaitForSingleObject on thread handles. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30844 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Support thread handles in WaitForSingleObject.sesse2010-03-051-5/+29
| | | | | | | | | | | | | | | | Some codecs need this for clean shutdown (as opposed to a crash); we don't really support timed wait since POSIX doesn't, but it doesn't seem necessary. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30843 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make emulated Win32 critical sections thread safe.sesse2010-03-041-17/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier, cs->locked was accessed outside the mutex to get around the problem that default pthread mutexes are not recursive (ie., you cannot do a double-lock from the same thread), causing a thread-safety problem, as both detected by Helgrind and showing up in some multithreaded codecs. The ideal solution here would be to simply use recursive pthread mutexes, but there were concerns about reduced debuggability and possibly portability. Thus, instead, rewrite the critical sections to be a simple lock count (with owner) protected by a regular mutex. Whenever a thread wants to enter the critical section and lock_count is not 0, it sleeps on a special event that tells it when the critical section is available. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30837 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix crashes in CreatePalette by fixing the LOGPALETTE struct.sesse2010-03-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | CreatePalette had problems for me, and looking at the code it was quite obvious why; someone had reversed the order of the two elements of the LOGPALETTE struct, causing it to allocate and copy a bogus amount of memory. Why on earth anybody would want to do that is beyond me; whoever did it even left a comment, but it wasn't very helpful, as it crashed nevertheless. :-) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30832 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix manual reset behavior of Win32 events.sesse2010-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | Events have a “reset” member that specify if they flag is automatically set back on read/wait. However, this was populated by bManualReset, so the flag was inverted and once an event was set, it would forever be counted as so. Fixed by inverting the flag. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30831 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix return values of WaitForSingleObject when checking an event.sesse2010-03-041-2/+2
| | | | | | | | | | | | | | These were simply inverted compared to what they should be. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30830 b3059339-0415-0410-9bf9-f77b7e298cf2
*