Mercurial > mplayer.hg
changeset 30819:495e49af2043
Implement ResumeThread and SignalObjectAndWait.
Relatively simplistic implementations of ResumeThread (stub) and
SignalObjectAndWait (bAlertable is ignored). Both are needed for ProRes 4:2:2
support on Linux.
author | sesse |
---|---|
date | Mon, 08 Mar 2010 13:00:59 +0000 |
parents | 69b726e5f398 |
children | dcf876ac1c8a |
files | loader/win32.c |
diffstat | 1 files changed, 31 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/loader/win32.c Sun Mar 07 23:18:37 2010 +0000 +++ b/loader/win32.c Mon Mar 08 13:00:59 2010 +0000 @@ -659,6 +659,13 @@ return pth; } +static DWORD WINAPI expResumeThread(HANDLE hThread) +{ + int ret = 1; + dbgprintf("ResumeThread(0x%x) => 0x%x\n", hThread, ret); + return ret; +} + struct mutex_list_t; struct mutex_list_t @@ -1980,6 +1987,28 @@ return 1; } +static DWORD WINAPI expSignalObjectAndWait(HANDLE hObjectToSignal, + HANDLE hObjectToWaitOn, + DWORD dwMilliseconds, + WIN_BOOL bAlertable) { + mutex_list* mlist = (mutex_list*)hObjectToSignal; + + switch (mlist->type) { + case 0: // Event + expSetEvent(mlist); + break; + case 1: // Semaphore + expReleaseSemaphore(mlist, 1, NULL); + break; + case 2: // Mutex + expReleaseMutex(mlist); + break; + default: + dbgprintf("Signalling unknown object type %d!\n", hObjectToSignal); + } + return expWaitForSingleObject(hObjectToWaitOn, dwMilliseconds); +} + static long WINAPI expRegOpenKeyExA(long key, const char* subkey, long reserved, long access, int* newkey) { long result=RegOpenKeyExA(key, subkey, reserved, access, newkey); @@ -5099,6 +5128,7 @@ FF(IsBadStringPtrA, -1) FF(DisableThreadLibraryCalls, -1) FF(CreateThread, -1) + FF(ResumeThread, -1) FF(CreateEventA, -1) FF(SetEvent, -1) FF(ResetEvent, -1) @@ -5152,6 +5182,7 @@ FF(ReleaseSemaphore, -1) FF(CreateMutexA, -1) FF(ReleaseMutex, -1) + FF(SignalObjectAndWait, -1) FF(FindResourceA, -1) FF(LockResource, -1) FF(FreeResource, -1)