From aee9749bca8e418752627bbfe8859029ea43d28e Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 14 Mar 2010 16:13:32 +0000 Subject: Replace separate Win32, XAnim and Real codec directories by one global dir. 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 --- loader/drv.c | 4 ++-- loader/win32.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'loader') diff --git a/loader/drv.c b/loader/drv.c index 9479e6944d..13945538d2 100644 --- a/loader/drv.c +++ b/loader/drv.c @@ -27,7 +27,7 @@ #endif #ifndef WIN32_LOADER -char* def_path=WIN32_PATH; +char* def_path = BINARY_CODECS_PATH; #else extern char* def_path; #endif @@ -71,7 +71,7 @@ void SetCodecPath(const char* path) if(needs_free)free(def_path); if(path==0) { - def_path=WIN32_PATH; + def_path = BINARY_CODECS_PATH; needs_free=0; return; } diff --git a/loader/win32.c b/loader/win32.c index d540e6dfe2..96106da154 100644 --- a/loader/win32.c +++ b/loader/win32.c @@ -77,7 +77,7 @@ for DLL to know too much about its environment. #include "osdep/mmap_anon.h" #include "libavutil/avstring.h" -char* def_path = WIN32_PATH; +char* def_path = BINARY_CODECS_PATH; static void do_cpuid(unsigned int ax, unsigned int *regs) { -- cgit v1.2.3 From 45fd2e045749d2459eb2174030513b29dcb47ff6 Mon Sep 17 00:00:00 2001 From: sesse Date: Mon, 15 Mar 2010 12:05:56 +0000 Subject: Use the high-level QuickTime decoding APIs (DecompressSequenceFrameS and 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 --- loader/qtx/qtxsdk/components.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'loader') diff --git a/loader/qtx/qtxsdk/components.h b/loader/qtx/qtxsdk/components.h index 94cb8456dc..7320c81630 100644 --- a/loader/qtx/qtxsdk/components.h +++ b/loader/qtx/qtxsdk/components.h @@ -29,6 +29,14 @@ typedef int32_t SInt32; typedef void *GlobalsPtr; typedef void **Globals; +enum { + kInitializeQTMLNoSoundFlag = (1L << 0), + kInitializeQTMLUseGDIFlag = (1L << 1), + kInitializeQTMLDisableDirectSound = (1L << 2), + kInitializeQTMLUseExclusiveFullScreenModeFlag = (1L << 3), + kInitializeQTMLDisableDDClippers = (1L << 4) +}; + //==================== COMPONENTS =========================== struct __attribute__((__packed__)) ComponentParameters { -- cgit v1.2.3 From 22ede70e586599ab5810494c8321ea76c8821184 Mon Sep 17 00:00:00 2001 From: sesse Date: Mon, 15 Mar 2010 12:54:54 +0000 Subject: Implement GetVersionExW with the same data as GetVersionExA but taking in a 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 --- loader/win32.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) (limited to 'loader') diff --git a/loader/win32.c b/loader/win32.c index 96106da154..ad5ecf21e8 100644 --- a/loader/win32.c +++ b/loader/win32.c @@ -792,6 +792,18 @@ static void* WINAPI expCreateEventA(void* pSecAttr, char bManualReset, return ret; } +static void* WINAPI expCreateEventW(void* pSecAttr, char bManualReset, + char bInitialState, const WCHAR* name) +{ + char ascii_name[256]; + char *aname = NULL; + if (name) { + WideCharToMultiByte(65001, 0x0, name, -1, ascii_name, 256, NULL, NULL); + aname = ascii_name; + } + return expCreateEventA(pSecAttr, bManualReset, bInitialState, aname); +} + static void* WINAPI expSetEvent(void* event) { mutex_list *ml = (mutex_list *)event; @@ -1798,6 +1810,7 @@ static long WINAPI expWideCharToMultiByte(long v1, long v2, short* s1, long siz1 if(s2)dbgprintf(" dest: %s\n", s2); return result; } + static long WINAPI expGetVersionExA(OSVERSIONINFOA* c) { dbgprintf("GetVersionExA(0x%x) => 1\n"); @@ -1817,6 +1830,33 @@ static long WINAPI expGetVersionExA(OSVERSIONINFOA* c) " Platform Id: VER_PLATFORM_WIN32_NT\n Version string: 'Service Pack 3'\n"); return 1; } + +static long WINAPI expGetVersionExW(OSVERSIONINFOW* c) +{ + char CSDVersion[128]; + dbgprintf("GetVersionExW(0x%x) => 1\n"); + c->dwOSVersionInfoSize=sizeof(*c); + c->dwMajorVersion=5; + c->dwMinorVersion=0; + c->dwBuildNumber=0x5000457; +#if 1 + // leave it here for testing win9x-only codecs + c->dwPlatformId=VER_PLATFORM_WIN32_WINDOWS; + strcpy(CSDVersion, " B"); +#else + c->dwPlatformId=VER_PLATFORM_WIN32_NT; // let's not make DLL assume that it can read CR* registers + strcpy(CSDVersion, "Service Pack 3"); +#endif + MultiByteToWideChar(65001, 0x0, CSDVersion, -1, c->szCSDVersion, 128); + dbgprintf(" Major version: %d\n Minor version: %d\n Build number: 0x%08x\n" + " Platform Id: %s\n Version string: '%s'\n", + c->dwMajorVersion, c->dwMinorVersion, c->dwBuildNumber, + (c->dwPlatformId==VER_PLATFORM_WIN32_WINDOWS ? "VER_PLATFORM_WIN32_WINDOWS" : + (c->dwPlatformId==VER_PLATFORM_WIN32_NT ? "VER_PLATFORM_WIN32_NT" : "Unknown")), + CSDVersion); + return 1; +} + static HANDLE WINAPI expCreateSemaphoreA(char* v1, long init_count, long max_count, char* name) { @@ -1891,6 +1931,18 @@ static HANDLE WINAPI expCreateSemaphoreA(char* v1, long init_count, return ret; } +static HANDLE WINAPI expCreateSemaphoreW(char* v1, long init_count, + long max_count, const WCHAR* name) +{ + char ascii_name[256]; + char *aname = NULL; + if (name) { + WideCharToMultiByte(65001, 0x0, name, -1, ascii_name, 256, NULL, NULL); + aname = ascii_name; + } + return expCreateSemaphoreA(v1, init_count, max_count, aname); +} + static long WINAPI expReleaseSemaphore(long hsem, long increment, long* prev_count) { // The state of a semaphore object is signaled when its count @@ -1977,6 +2029,17 @@ static HANDLE WINAPI expCreateMutexA(void *pSecAttr, return ret; } +static HANDLE WINAPI expCreateMutexW(void *pSecAttr, char bInitialOwner, const WCHAR *name) +{ + char ascii_name[256]; + char *aname = NULL; + if (name) { + WideCharToMultiByte(65001, 0x0, name, -1, ascii_name, 256, NULL, NULL); + aname = ascii_name; + } + return expCreateMutexA(pSecAttr, bInitialOwner, aname); +} + static int WINAPI expReleaseMutex(HANDLE hMutex) { mutex_list *ml = (mutex_list *)hMutex; @@ -5130,6 +5193,7 @@ struct exports exp_kernel32[]= FF(CreateThread, -1) FF(ResumeThread, -1) FF(CreateEventA, -1) + FF(CreateEventW, -1) FF(SetEvent, -1) FF(ResetEvent, -1) FF(WaitForSingleObject, -1) @@ -5169,7 +5233,9 @@ struct exports exp_kernel32[]= FF(MultiByteToWideChar, 427) FF(WideCharToMultiByte, -1) FF(GetVersionExA, -1) + FF(GetVersionExW, -1) FF(CreateSemaphoreA, -1) + FF(CreateSemaphoreW, -1) FF(QueryPerformanceCounter, -1) FF(QueryPerformanceFrequency, -1) FF(LocalHandle, -1) @@ -5181,6 +5247,7 @@ struct exports exp_kernel32[]= FF(LoadResource, -1) FF(ReleaseSemaphore, -1) FF(CreateMutexA, -1) + FF(CreateMutexW, -1) FF(ReleaseMutex, -1) FF(SignalObjectAndWait, -1) FF(FindResourceA, -1) -- cgit v1.2.3 From 95f68d3976382c660f4225030a73870084a0a274 Mon Sep 17 00:00:00 2001 From: sesse Date: Mon, 15 Mar 2010 12:58:17 +0000 Subject: Add support for Apple's ProRes and AIC codecs, now that all prerequisites 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 rectalogic com) posted in June. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30901 b3059339-0415-0410-9bf9-f77b7e298cf2 --- loader/qt_comp.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'loader') diff --git a/loader/qt_comp.h b/loader/qt_comp.h index 4c1d8d165c..9da5c35e33 100644 --- a/loader/qt_comp.h +++ b/loader/qt_comp.h @@ -25,6 +25,8 @@ DECL_COMPONENT(yuvu,"YUVU_CDComponentDispatch",0) DECL_COMPONENT(qdm2d,"QDM2Decompressor",0) DECL_COMPONENT(mace3d,"Mace3DecompDispatch",0) +DECL_COMPONENT(prores,"IcpDecompressorComponentDispatch",0) + //DECL_COMPONENT(,"",0) #endif /* MPLAYER_QT_COMP_H */ -- cgit v1.2.3 From 2990ec16824583a91ef1c69e4f543de7fe4c8939 Mon Sep 17 00:00:00 2001 From: sesse Date: Mon, 15 Mar 2010 16:09:35 +0000 Subject: Fix indentation in GetVersionExW. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30902 b3059339-0415-0410-9bf9-f77b7e298cf2 --- loader/win32.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'loader') diff --git a/loader/win32.c b/loader/win32.c index ad5ecf21e8..9143702878 100644 --- a/loader/win32.c +++ b/loader/win32.c @@ -1849,11 +1849,11 @@ static long WINAPI expGetVersionExW(OSVERSIONINFOW* c) #endif MultiByteToWideChar(65001, 0x0, CSDVersion, -1, c->szCSDVersion, 128); dbgprintf(" Major version: %d\n Minor version: %d\n Build number: 0x%08x\n" - " Platform Id: %s\n Version string: '%s'\n", - c->dwMajorVersion, c->dwMinorVersion, c->dwBuildNumber, - (c->dwPlatformId==VER_PLATFORM_WIN32_WINDOWS ? "VER_PLATFORM_WIN32_WINDOWS" : - (c->dwPlatformId==VER_PLATFORM_WIN32_NT ? "VER_PLATFORM_WIN32_NT" : "Unknown")), - CSDVersion); + " Platform Id: %s\n Version string: '%s'\n", + c->dwMajorVersion, c->dwMinorVersion, c->dwBuildNumber, + (c->dwPlatformId==VER_PLATFORM_WIN32_WINDOWS ? "VER_PLATFORM_WIN32_WINDOWS" : + (c->dwPlatformId==VER_PLATFORM_WIN32_NT ? "VER_PLATFORM_WIN32_NT" : "Unknown")), + CSDVersion); return 1; } -- cgit v1.2.3