1999-03-15 16:40:27 +01:00
|
|
|
/* -*- tab-width: 8; c-basic-offset: 4 -*- */
|
|
|
|
|
1999-02-13 13:38:09 +01:00
|
|
|
/*
|
|
|
|
* Digital video MCI Wine Driver
|
|
|
|
*
|
2001-02-14 22:49:22 +01:00
|
|
|
* Copyright 1999, 2000 Eric POUECH
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2001-02-14 22:49:22 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* TODO list :
|
|
|
|
* - handling of palettes
|
|
|
|
* - recording (which input devices ?), a cam recorder ?
|
|
|
|
* - lots of messages still need to be handled (cf FIXME)
|
|
|
|
* - synchronization between audio and video (especially for interleaved
|
|
|
|
* files)
|
|
|
|
* - synchronization (as in all the Wine MCI drivers (MCI_WAIT) messages)
|
|
|
|
* - robustness when reading file can be enhanced
|
|
|
|
* - better move the AVI handling part to avifile DLL and make use of it
|
|
|
|
* - some files appear to have more than one audio stream (we only play the
|
|
|
|
* first one)
|
|
|
|
* - some files contain an index of audio/video frame. Better use it,
|
|
|
|
* instead of rebuilding it
|
|
|
|
* - mciWindow (for setting the hWnd) is broken with media player
|
|
|
|
* - stopping while playing a file with sound blocks until all buffered
|
|
|
|
* audio is played... still should be stopped ASAP
|
1999-02-13 13:38:09 +01:00
|
|
|
*/
|
|
|
|
|
1999-07-15 16:43:13 +02:00
|
|
|
#include <string.h>
|
2001-02-14 22:49:22 +01:00
|
|
|
#include "private_mciavi.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
1999-02-13 13:38:09 +01:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(mciavi);
|
1999-04-19 16:56:29 +02:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
/* ===================================================================
|
|
|
|
* ===================================================================
|
|
|
|
* FIXME: should be using the new mmThreadXXXX functions from WINMM
|
|
|
|
* instead of those
|
|
|
|
* it would require to add a wine internal flag to mmThreadCreate
|
|
|
|
* in order to pass a 32 bit function instead of a 16 bit one
|
|
|
|
* ===================================================================
|
|
|
|
* =================================================================== */
|
|
|
|
|
|
|
|
struct SCA {
|
|
|
|
UINT wDevID;
|
|
|
|
UINT wMsg;
|
|
|
|
DWORD dwParam1;
|
|
|
|
DWORD dwParam2;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* MCI_SCAStarter [internal]
|
|
|
|
*/
|
|
|
|
static DWORD CALLBACK MCI_SCAStarter(LPVOID arg)
|
|
|
|
{
|
|
|
|
struct SCA* sca = (struct SCA*)arg;
|
|
|
|
DWORD ret;
|
|
|
|
|
|
|
|
TRACE("In thread before async command (%08x,%u,%08lx,%08lx)\n",
|
|
|
|
sca->wDevID, sca->wMsg, sca->dwParam1, sca->dwParam2);
|
|
|
|
ret = mciSendCommandA(sca->wDevID, sca->wMsg, sca->dwParam1 | MCI_WAIT, sca->dwParam2);
|
|
|
|
TRACE("In thread after async command (%08x,%u,%08lx,%08lx)\n",
|
|
|
|
sca->wDevID, sca->wMsg, sca->dwParam1, sca->dwParam2);
|
|
|
|
HeapFree(GetProcessHeap(), 0, sca);
|
|
|
|
ExitThread(ret);
|
|
|
|
WARN("Should not happen ? what's wrong \n");
|
|
|
|
/* should not go after this point */
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* MCI_SendCommandAsync [internal]
|
|
|
|
*/
|
|
|
|
static DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1,
|
|
|
|
DWORD dwParam2, UINT size)
|
|
|
|
{
|
|
|
|
struct SCA* sca = HeapAlloc(GetProcessHeap(), 0, sizeof(struct SCA) + size);
|
|
|
|
|
|
|
|
if (sca == 0)
|
|
|
|
return MCIERR_OUT_OF_MEMORY;
|
|
|
|
|
|
|
|
sca->wDevID = wDevID;
|
|
|
|
sca->wMsg = wMsg;
|
|
|
|
sca->dwParam1 = dwParam1;
|
|
|
|
|
|
|
|
if (size && dwParam2) {
|
|
|
|
sca->dwParam2 = (DWORD)sca + sizeof(struct SCA);
|
|
|
|
/* copy structure passed by program in dwParam2 to be sure
|
|
|
|
* we can still use it whatever the program does
|
|
|
|
*/
|
|
|
|
memcpy((LPVOID)sca->dwParam2, (LPVOID)dwParam2, size);
|
|
|
|
} else {
|
|
|
|
sca->dwParam2 = dwParam2;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (CreateThread(NULL, 0, MCI_SCAStarter, sca, 0, NULL) == 0) {
|
|
|
|
WARN("Couldn't allocate thread for async command handling, sending synchronously\n");
|
|
|
|
return MCI_SCAStarter(&sca);
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
1999-02-13 13:38:09 +01:00
|
|
|
|
|
|
|
/*======================================================================*
|
|
|
|
* MCI AVI implemantation *
|
|
|
|
*======================================================================*/
|
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
HINSTANCE MCIAVI_hInstance = 0;
|
|
|
|
|
|
|
|
BOOL WINAPI MCIAVI_LibMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
|
|
|
{
|
|
|
|
switch (fdwReason) {
|
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
MCIAVI_hInstance = hInstDLL;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
1999-05-02 12:21:49 +02:00
|
|
|
/**************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_drvOpen [internal]
|
1999-05-02 12:21:49 +02:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_drvOpen(LPSTR str, LPMCI_OPEN_DRIVER_PARMSA modp)
|
1999-05-02 12:21:49 +02:00
|
|
|
{
|
2002-05-12 01:02:55 +02:00
|
|
|
WINE_MCIAVI* wma;
|
2001-02-14 22:49:22 +01:00
|
|
|
static WCHAR mciAviWStr[] = {'M','C','I','A','V','I',0};
|
1999-05-02 12:21:49 +02:00
|
|
|
|
2002-05-12 01:02:55 +02:00
|
|
|
if (!modp) return 0xFFFFFFFF;
|
|
|
|
|
|
|
|
wma = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WINE_MCIAVI));
|
1999-07-15 16:43:13 +02:00
|
|
|
if (!wma)
|
|
|
|
return 0;
|
2001-02-14 22:49:22 +01:00
|
|
|
|
1999-07-15 16:43:13 +02:00
|
|
|
wma->wDevID = modp->wDeviceID;
|
|
|
|
mciSetDriverData(wma->wDevID, (DWORD)wma);
|
2001-02-14 22:49:22 +01:00
|
|
|
wma->wCommandTable = mciLoadCommandResource(MCIAVI_hInstance, mciAviWStr, 0);
|
|
|
|
modp->wCustomCommandTable = wma->wCommandTable;
|
1999-09-22 18:41:00 +02:00
|
|
|
modp->wType = MCI_DEVTYPE_DIGITAL_VIDEO;
|
1999-07-15 16:43:13 +02:00
|
|
|
return modp->wDeviceID;
|
1999-05-02 12:21:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* MCIAVI_drvClose [internal]
|
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_drvClose(DWORD dwDevID)
|
1999-05-02 12:21:49 +02:00
|
|
|
{
|
1999-07-15 16:43:13 +02:00
|
|
|
WINE_MCIAVI* wma = (WINE_MCIAVI*)mciGetDriverData(dwDevID);
|
2001-02-14 22:49:22 +01:00
|
|
|
|
1999-05-02 12:21:49 +02:00
|
|
|
if (wma) {
|
1999-07-15 16:43:13 +02:00
|
|
|
mciSetDriverData(dwDevID, 0);
|
2001-02-14 22:49:22 +01:00
|
|
|
mciFreeCommandResource(wma->wCommandTable);
|
|
|
|
HeapFree(GetProcessHeap(), 0, wma);
|
|
|
|
return 1;
|
|
|
|
}
|
2002-05-12 01:02:55 +02:00
|
|
|
return (dwDevID == 0xFFFFFFFF) ? 1 : 0;
|
2001-02-14 22:49:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* MCIAVI_drvConfigure [internal]
|
|
|
|
*/
|
|
|
|
static DWORD MCIAVI_drvConfigure(DWORD dwDevID)
|
|
|
|
{
|
|
|
|
WINE_MCIAVI* wma = (WINE_MCIAVI*)mciGetDriverData(dwDevID);
|
|
|
|
|
|
|
|
if (wma) {
|
|
|
|
MessageBoxA(0, "Sample AVI Wine Driver !", "MM-Wine Driver", MB_OK);
|
1999-05-02 12:21:49 +02:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1999-02-13 13:38:09 +01:00
|
|
|
/**************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciGetOpenDev [internal]
|
1999-02-13 13:38:09 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* MCIAVI_mciGetOpenDev(UINT wDevID)
|
1999-02-13 13:38:09 +01:00
|
|
|
{
|
1999-07-15 16:43:13 +02:00
|
|
|
WINE_MCIAVI* wma = (WINE_MCIAVI*)mciGetDriverData(wDevID);
|
1999-05-02 12:21:49 +02:00
|
|
|
|
|
|
|
if (wma == NULL || wma->nUseCount == 0) {
|
1999-07-15 16:43:13 +02:00
|
|
|
WARN("Invalid wDevID=%u\n", wDevID);
|
1999-02-13 13:38:09 +01:00
|
|
|
return 0;
|
|
|
|
}
|
1999-05-02 12:21:49 +02:00
|
|
|
return wma;
|
1999-02-13 13:38:09 +01:00
|
|
|
}
|
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
static void MCIAVI_CleanUp(WINE_MCIAVI* wma)
|
|
|
|
{
|
|
|
|
/* to prevent handling in WindowProc */
|
|
|
|
wma->dwStatus = MCI_MODE_NOT_READY;
|
|
|
|
if (wma->hFile) {
|
|
|
|
mmioClose(wma->hFile, 0);
|
|
|
|
wma->hFile = 0;
|
|
|
|
if (wma->lpVideoIndex) HeapFree(GetProcessHeap(), 0, wma->lpVideoIndex);
|
|
|
|
wma->lpVideoIndex = NULL;
|
|
|
|
if (wma->lpAudioIndex) HeapFree(GetProcessHeap(), 0, wma->lpAudioIndex);
|
|
|
|
wma->lpAudioIndex = NULL;
|
|
|
|
if (wma->hic) ICClose(wma->hic);
|
|
|
|
wma->hic = 0;
|
|
|
|
if (wma->inbih) HeapFree(GetProcessHeap(), 0, wma->inbih);
|
|
|
|
wma->inbih = NULL;
|
|
|
|
if (wma->outbih) HeapFree(GetProcessHeap(), 0, wma->outbih);
|
|
|
|
wma->outbih = NULL;
|
|
|
|
if (wma->indata) HeapFree(GetProcessHeap(), 0, wma->indata);
|
|
|
|
wma->indata = NULL;
|
|
|
|
if (wma->outdata) HeapFree(GetProcessHeap(), 0, wma->outdata);
|
|
|
|
wma->outdata = NULL;
|
|
|
|
if (wma->hbmFrame) DeleteObject(wma->hbmFrame);
|
|
|
|
wma->hbmFrame = 0;
|
|
|
|
if (wma->hWnd) DestroyWindow(wma->hWnd);
|
|
|
|
wma->hWnd = 0;
|
|
|
|
|
|
|
|
if (wma->lpWaveFormat) HeapFree(GetProcessHeap(), 0, wma->lpWaveFormat);
|
|
|
|
wma->lpWaveFormat = 0;
|
|
|
|
|
|
|
|
memset(&wma->mah, 0, sizeof(wma->mah));
|
|
|
|
memset(&wma->ash_video, 0, sizeof(wma->ash_video));
|
|
|
|
memset(&wma->ash_audio, 0, sizeof(wma->ash_audio));
|
|
|
|
wma->dwCurrVideoFrame = wma->dwCurrAudioBlock = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD MCIAVI_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms);
|
1999-02-13 13:38:09 +01:00
|
|
|
|
1999-03-15 16:40:27 +01:00
|
|
|
/***************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciOpen [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciOpen(UINT wDevID, DWORD dwFlags,
|
|
|
|
LPMCI_DGV_OPEN_PARMSA lpOpenParms)
|
1999-02-13 13:38:09 +01:00
|
|
|
{
|
1999-07-15 16:43:13 +02:00
|
|
|
WINE_MCIAVI* wma = (WINE_MCIAVI*)mciGetDriverData(wDevID);
|
2001-02-14 22:49:22 +01:00
|
|
|
LRESULT dwRet = 0;
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
TRACE("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpOpenParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
if (lpOpenParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
1999-05-02 12:21:49 +02:00
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
1999-03-15 16:40:27 +01:00
|
|
|
|
1999-02-13 13:38:09 +01:00
|
|
|
if (wma->nUseCount > 0) {
|
|
|
|
/* The driver is already open on this channel */
|
|
|
|
/* If the driver was opened shareable before and this open specifies */
|
|
|
|
/* shareable then increment the use count */
|
|
|
|
if (wma->fShareable && (dwFlags & MCI_OPEN_SHAREABLE))
|
|
|
|
++wma->nUseCount;
|
|
|
|
else
|
|
|
|
return MCIERR_MUST_USE_SHAREABLE;
|
|
|
|
} else {
|
|
|
|
wma->nUseCount = 1;
|
|
|
|
wma->fShareable = dwFlags & MCI_OPEN_SHAREABLE;
|
|
|
|
}
|
2001-02-14 22:49:22 +01:00
|
|
|
|
|
|
|
wma->dwStatus = MCI_MODE_NOT_READY;
|
|
|
|
InitializeCriticalSection(&wma->cs);
|
|
|
|
|
1999-02-13 13:38:09 +01:00
|
|
|
if (dwFlags & MCI_OPEN_ELEMENT) {
|
2001-02-14 22:49:22 +01:00
|
|
|
if (dwFlags & MCI_OPEN_ELEMENT_ID) {
|
|
|
|
/* could it be that (DWORD)lpOpenParms->lpstrElementName
|
|
|
|
* contains the hFile value ?
|
|
|
|
*/
|
|
|
|
dwRet = MCIERR_UNRECOGNIZED_COMMAND;
|
|
|
|
} else if (strlen(lpOpenParms->lpstrElementName) > 0) {
|
|
|
|
/* FIXME : what should be done id wma->hFile is already != 0, or the driver is playin' */
|
|
|
|
TRACE("MCI_OPEN_ELEMENT '%s' !\n", lpOpenParms->lpstrElementName);
|
|
|
|
|
|
|
|
if (lpOpenParms->lpstrElementName && (strlen(lpOpenParms->lpstrElementName) > 0)) {
|
|
|
|
wma->hFile = mmioOpenA(lpOpenParms->lpstrElementName, NULL,
|
|
|
|
MMIO_ALLOCBUF | MMIO_DENYWRITE | MMIO_READWRITE);
|
|
|
|
|
|
|
|
if (wma->hFile == 0) {
|
|
|
|
WARN("can't find file='%s' !\n", lpOpenParms->lpstrElementName);
|
|
|
|
dwRet = MCIERR_FILE_NOT_FOUND;
|
|
|
|
} else {
|
|
|
|
if (!MCIAVI_GetInfo(wma))
|
|
|
|
dwRet = MCIERR_INVALID_FILE;
|
|
|
|
else if (!MCIAVI_OpenVideo(wma))
|
|
|
|
dwRet = MCIERR_CANNOT_LOAD_DRIVER;
|
|
|
|
else if (!MCIAVI_CreateWindow(wma, dwFlags, lpOpenParms))
|
|
|
|
dwRet = MCIERR_CREATEWINDOW;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
FIXME("Don't record yet\n");
|
|
|
|
dwRet = MCIERR_UNSUPPORTED_FUNCTION;
|
|
|
|
}
|
1999-02-13 13:38:09 +01:00
|
|
|
}
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
memcpy(&wma->openParms, lpOpenParms, sizeof(MCI_WAVE_OPEN_PARMSA));
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
if (dwRet == 0) {
|
|
|
|
wma->dwStatus = MCI_MODE_STOP;
|
|
|
|
wma->dwMciTimeFormat = MCI_FORMAT_FRAMES;
|
|
|
|
} else {
|
|
|
|
MCIAVI_CleanUp(wma);
|
|
|
|
}
|
|
|
|
return dwRet;
|
1999-03-15 16:40:27 +01:00
|
|
|
|
1999-02-13 13:38:09 +01:00
|
|
|
}
|
|
|
|
|
1999-03-15 16:40:27 +01:00
|
|
|
/***************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciClose [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
1999-02-13 13:38:09 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
|
|
|
DWORD dwRet = 0;
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
TRACE("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
1999-02-13 13:38:09 +01:00
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
if (wma->nUseCount == 1) {
|
2001-02-14 22:49:22 +01:00
|
|
|
if (wma->dwStatus != MCI_MODE_STOP)
|
|
|
|
dwRet = MCIAVI_mciStop(wDevID, MCI_WAIT, lpParms);
|
|
|
|
MCIAVI_CleanUp(wma);
|
|
|
|
|
|
|
|
if ((dwFlags & MCI_NOTIFY) && lpParms) {
|
|
|
|
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
|
|
|
wma->openParms.wDeviceID,
|
|
|
|
MCI_NOTIFY_SUCCESSFUL);
|
|
|
|
}
|
|
|
|
HeapFree(GetProcessHeap(), 0, wma);
|
|
|
|
return dwRet;
|
1999-02-13 13:38:09 +01:00
|
|
|
}
|
|
|
|
wma->nUseCount--;
|
2001-02-14 22:49:22 +01:00
|
|
|
return dwRet;
|
1999-02-13 13:38:09 +01:00
|
|
|
}
|
|
|
|
|
1999-03-15 16:40:27 +01:00
|
|
|
/***************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciPlay [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
1999-02-13 13:38:09 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
|
|
|
DWORD tc;
|
|
|
|
DWORD frameTime;
|
|
|
|
DWORD delta;
|
|
|
|
DWORD dwRet;
|
|
|
|
LPWAVEHDR waveHdr = NULL;
|
|
|
|
unsigned i, nHdr = 0;
|
|
|
|
DWORD dwFromFrame, dwToFrame;
|
1999-02-13 13:38:09 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
TRACE("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
if (!wma->hFile) return MCIERR_FILE_NOT_FOUND;
|
|
|
|
if (!wma->hWnd) return MCIERR_NO_WINDOW;
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
wma->dwStatus = MCI_MODE_PLAY;
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
if (!(dwFlags & MCI_WAIT)) {
|
|
|
|
return MCI_SendCommandAsync(wma->openParms.wDeviceID, MCI_PLAY, dwFlags,
|
|
|
|
(DWORD)lpParms, sizeof(MCI_PLAY_PARMS));
|
|
|
|
}
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
ShowWindow(wma->hWnd, SW_SHOW);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
dwFromFrame = wma->dwCurrVideoFrame;
|
|
|
|
dwToFrame = wma->dwPlayableVideoFrames - 1;
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
if (lpParms && (dwFlags & MCI_FROM)) {
|
|
|
|
dwFromFrame = MCIAVI_ConvertTimeFormatToFrame(wma, lpParms->dwFrom);
|
|
|
|
}
|
|
|
|
if (lpParms && (dwFlags & MCI_TO)) {
|
|
|
|
dwToFrame = MCIAVI_ConvertTimeFormatToFrame(wma, lpParms->dwTo);
|
|
|
|
}
|
|
|
|
if (dwToFrame >= wma->dwPlayableVideoFrames)
|
|
|
|
dwToFrame = wma->dwPlayableVideoFrames - 1;
|
1999-02-13 13:38:09 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
TRACE("Playing from frame=%lu to frame=%lu\n", dwFromFrame, dwToFrame);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
if (dwToFrame <= wma->dwCurrVideoFrame)
|
|
|
|
return TRUE;
|
|
|
|
wma->dwCurrVideoFrame = dwFromFrame;
|
1999-02-13 13:38:09 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
if (dwFlags & (MCI_DGV_PLAY_REPEAT|MCI_DGV_PLAY_REVERSE|MCI_MCIAVI_PLAY_WINDOW|MCI_MCIAVI_PLAY_FULLSCREEN))
|
|
|
|
FIXME("Unsupported flag %08lx\n", dwFlags);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
/* time is in microseconds, we should convert it to milliseconds */
|
|
|
|
frameTime = (wma->mah.dwMicroSecPerFrame + 500) / 1000;
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
if (wma->lpWaveFormat) {
|
|
|
|
if ((dwRet = MCIAVI_OpenAudio(wma, &nHdr, &waveHdr)) != 0)
|
|
|
|
goto cleanUp;
|
|
|
|
/* fill the queue with as many wave headers as possible */
|
|
|
|
MCIAVI_PlayAudioBlocks(wma, nHdr, waveHdr);
|
1999-03-15 16:40:27 +01:00
|
|
|
}
|
2001-02-14 22:49:22 +01:00
|
|
|
|
|
|
|
while (wma->dwStatus != MCI_MODE_STOP && wma->dwStatus != MCI_MODE_NOT_READY) {
|
|
|
|
tc = GetTickCount();
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
MCIAVI_DrawFrame(wma);
|
|
|
|
|
|
|
|
if (wma->lpWaveFormat) {
|
|
|
|
MCIAVI_PlayAudioBlocks(wma, nHdr, waveHdr);
|
|
|
|
delta = GetTickCount() - tc;
|
|
|
|
WaitForSingleObject(wma->hEvent, (delta >= frameTime) ? 0 : frameTime - delta);
|
1999-03-15 16:40:27 +01:00
|
|
|
}
|
2001-02-14 22:49:22 +01:00
|
|
|
|
|
|
|
delta = GetTickCount() - tc;
|
|
|
|
if (delta < frameTime)
|
|
|
|
Sleep(frameTime - delta);
|
|
|
|
|
|
|
|
if (wma->dwCurrVideoFrame++ >= dwToFrame) {
|
|
|
|
wma->dwCurrVideoFrame--;
|
|
|
|
wma->dwStatus = MCI_MODE_STOP;
|
1999-03-15 16:40:27 +01:00
|
|
|
}
|
|
|
|
}
|
2001-02-14 22:49:22 +01:00
|
|
|
|
|
|
|
if (wma->lpWaveFormat) {
|
|
|
|
while (*(volatile DWORD*)&wma->dwEventCount != nHdr - 1) {
|
|
|
|
Sleep(100);
|
1999-03-15 16:40:27 +01:00
|
|
|
}
|
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
/* just to get rid of some race conditions between play, stop and pause */
|
|
|
|
waveOutReset(wma->hWave);
|
|
|
|
|
|
|
|
for (i = 0; i < nHdr; i++)
|
|
|
|
waveOutUnprepareHeader(wma->hWave, &waveHdr[i], sizeof(WAVEHDR));
|
1999-03-15 16:40:27 +01:00
|
|
|
}
|
1999-02-13 13:38:09 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
dwRet = 0;
|
|
|
|
cleanUp:
|
|
|
|
if (wma->lpWaveFormat) {
|
|
|
|
HeapFree(GetProcessHeap(), 0, waveHdr);
|
1999-07-24 12:45:24 +02:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
if (wma->hWave) {
|
|
|
|
waveOutClose(wma->hWave);
|
|
|
|
wma->hWave = 0;
|
1999-03-15 16:40:27 +01:00
|
|
|
}
|
2001-02-14 22:49:22 +01:00
|
|
|
CloseHandle(wma->hEvent);
|
1999-03-15 16:40:27 +01:00
|
|
|
}
|
2001-02-14 22:49:22 +01:00
|
|
|
|
|
|
|
if (lpParms && (dwFlags & MCI_NOTIFY)) {
|
1999-07-15 16:43:13 +02:00
|
|
|
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
|
2000-11-29 19:38:24 +01:00
|
|
|
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
2001-02-14 22:49:22 +01:00
|
|
|
wma->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
1999-03-15 16:40:27 +01:00
|
|
|
}
|
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
wma->dwStatus = MCI_MODE_STOP;
|
|
|
|
|
|
|
|
return dwRet;
|
1999-02-13 13:38:09 +01:00
|
|
|
}
|
|
|
|
|
1999-03-15 16:40:27 +01:00
|
|
|
/***************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciRecord [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECORD_PARMS lpParms)
|
1999-02-13 13:38:09 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-02-13 13:38:09 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms);
|
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
1999-03-15 16:40:27 +01:00
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
1999-02-13 13:38:09 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
wma->dwStatus = MCI_MODE_RECORD;
|
|
|
|
return 0;
|
1999-02-13 13:38:09 +01:00
|
|
|
}
|
|
|
|
|
1999-03-15 16:40:27 +01:00
|
|
|
/***************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciStop [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
1999-02-13 13:38:09 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
|
|
|
DWORD dwRet = 0;
|
1999-09-27 15:38:57 +02:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
TRACE("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpParms);
|
1999-02-13 13:38:09 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
1999-07-24 12:45:24 +02:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
switch (wma->dwStatus) {
|
|
|
|
case MCI_MODE_PAUSE:
|
|
|
|
case MCI_MODE_PLAY:
|
|
|
|
case MCI_MODE_RECORD:
|
|
|
|
{
|
|
|
|
int oldStat = wma->dwStatus;
|
|
|
|
wma->dwStatus = MCI_MODE_NOT_READY;
|
|
|
|
if (oldStat == MCI_MODE_PAUSE)
|
|
|
|
dwRet = waveOutReset(wma->hWave);
|
|
|
|
}
|
|
|
|
while (wma->dwStatus != MCI_MODE_STOP)
|
|
|
|
Sleep(10);
|
1999-07-24 12:45:24 +02:00
|
|
|
break;
|
|
|
|
default:
|
2001-02-14 22:49:22 +01:00
|
|
|
wma->dwStatus = MCI_MODE_STOP;
|
|
|
|
break;
|
1999-02-13 13:38:09 +01:00
|
|
|
}
|
2001-02-14 22:49:22 +01:00
|
|
|
|
|
|
|
if ((dwFlags & MCI_NOTIFY) && lpParms) {
|
|
|
|
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
|
|
|
wma->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
1999-09-27 15:38:57 +02:00
|
|
|
}
|
2001-02-14 22:49:22 +01:00
|
|
|
|
|
|
|
return dwRet;
|
1999-02-13 13:38:09 +01:00
|
|
|
}
|
|
|
|
|
1999-03-15 16:40:27 +01:00
|
|
|
/***************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciPause [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
1999-02-13 13:38:09 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
if (wma->dwStatus == MCI_MODE_PLAY)
|
|
|
|
wma->dwStatus = MCI_MODE_PAUSE;
|
|
|
|
|
|
|
|
return (wma->lpWaveFormat) ? waveOutPause(wma->hWave) : 0;
|
1999-03-15 16:40:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/***************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciResume [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
if (wma->dwStatus == MCI_MODE_PAUSE)
|
|
|
|
wma->dwStatus = MCI_MODE_PLAY;
|
|
|
|
|
|
|
|
return (wma->lpWaveFormat) ? waveOutRestart(wma->hWave) : 0;
|
1999-03-15 16:40:27 +01:00
|
|
|
}
|
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
/***************************************************************************
|
|
|
|
* MCIAVI_mciSeek [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
TRACE("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
EnterCriticalSection(&wma->cs);
|
|
|
|
|
|
|
|
MCIAVI_mciStop(wDevID, MCI_WAIT, 0);
|
|
|
|
|
|
|
|
if (dwFlags & MCI_SEEK_TO_START) {
|
|
|
|
wma->dwCurrVideoFrame = 0;
|
|
|
|
} else if (dwFlags & MCI_SEEK_TO_END) {
|
|
|
|
wma->dwCurrVideoFrame = wma->dwPlayableVideoFrames - 1;
|
|
|
|
} else if (dwFlags & MCI_TO) {
|
|
|
|
wma->dwCurrVideoFrame = MCIAVI_ConvertTimeFormatToFrame(wma, lpParms->dwTo);
|
|
|
|
} else {
|
|
|
|
WARN("dwFlag doesn't tell where to seek to...\n");
|
|
|
|
return MCIERR_MISSING_PARAMETER;
|
|
|
|
}
|
|
|
|
|
|
|
|
TRACE("Seeking to frame=%lu bytes\n", wma->dwCurrVideoFrame);
|
|
|
|
|
|
|
|
if (dwFlags & MCI_NOTIFY) {
|
|
|
|
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
|
|
|
wma->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
|
|
|
}
|
|
|
|
|
|
|
|
LeaveCriticalSection(&wma->cs);
|
|
|
|
|
1999-03-15 16:40:27 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
/*****************************************************************************
|
|
|
|
* MCIAVI_mciLoad [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciLoad(UINT wDevID, DWORD dwFlags, LPMCI_DGV_LOAD_PARMSA lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciSave [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciSave(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SAVE_PARMSA lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciFreeze [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciFreeze(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciRealize [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciRealize(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciUnFreeze [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciUnFreeze(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciUpdate [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciUpdate(UINT wDevID, DWORD dwFlags, LPMCI_DGV_UPDATE_PARMS lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
|
|
|
|
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciStep [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciStep(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STEP_PARMS lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciCopy [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciCopy(UINT wDevID, DWORD dwFlags, LPMCI_DGV_COPY_PARMS lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciCut [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciCut(UINT wDevID, DWORD dwFlags, LPMCI_DGV_CUT_PARMS lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciDelete [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciDelete(UINT wDevID, DWORD dwFlags, LPMCI_DGV_DELETE_PARMS lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciPaste [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciPaste(UINT wDevID, DWORD dwFlags, LPMCI_DGV_PASTE_PARMS lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciCue [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciCue(UINT wDevID, DWORD dwFlags, LPMCI_DGV_CUE_PARMS lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciCapture [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciCapture(UINT wDevID, DWORD dwFlags, LPMCI_DGV_CAPTURE_PARMSA lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
1999-02-13 13:38:09 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1999-03-15 16:40:27 +01:00
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciMonitor [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciMonitor(UINT wDevID, DWORD dwFlags, LPMCI_DGV_MONITOR_PARMS lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciReserve [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciReserve(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RESERVE_PARMSA lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciSetAudio [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciSetAudio(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SETAUDIO_PARMSA lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciSignal [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciSignal(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SIGNAL_PARMS lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciSetVideo [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciSetVideo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SETVIDEO_PARMSA lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciQuality [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciQuality(UINT wDevID, DWORD dwFlags, LPMCI_DGV_QUALITY_PARMSA lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciList [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciList(UINT wDevID, DWORD dwFlags, LPMCI_DGV_LIST_PARMSA lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciUndo [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciUndo(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciConfigure [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciConfigure(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-02-14 22:49:22 +01:00
|
|
|
* MCIAVI_mciRestore [internal]
|
1999-03-15 16:40:27 +01:00
|
|
|
*/
|
2001-02-14 22:49:22 +01:00
|
|
|
static DWORD MCIAVI_mciRestore(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RESTORE_PARMSA lpParms)
|
1999-03-15 16:40:27 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
2001-02-14 22:49:22 +01:00
|
|
|
FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
|
|
|
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
1999-02-13 13:38:09 +01:00
|
|
|
|
|
|
|
/*======================================================================*
|
|
|
|
* MCI AVI entry points *
|
|
|
|
*======================================================================*/
|
|
|
|
|
|
|
|
/**************************************************************************
|
2001-07-11 20:56:41 +02:00
|
|
|
* DriverProc (MCIAVI.@)
|
1999-02-13 13:38:09 +01:00
|
|
|
*/
|
1999-07-15 16:43:13 +02:00
|
|
|
LONG CALLBACK MCIAVI_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
|
|
|
|
DWORD dwParam1, DWORD dwParam2)
|
1999-02-13 13:38:09 +01:00
|
|
|
{
|
2001-02-14 22:49:22 +01:00
|
|
|
TRACE("(%08lX, %04X, %08lX, %08lX, %08lX)\n",
|
|
|
|
dwDevID, hDriv, wMsg, dwParam1, dwParam2);
|
|
|
|
|
1999-02-13 13:38:09 +01:00
|
|
|
switch (wMsg) {
|
|
|
|
case DRV_LOAD: return 1;
|
|
|
|
case DRV_FREE: return 1;
|
2001-02-14 22:49:22 +01:00
|
|
|
case DRV_OPEN: return MCIAVI_drvOpen((LPSTR)dwParam1, (LPMCI_OPEN_DRIVER_PARMSA)dwParam2);
|
|
|
|
case DRV_CLOSE: return MCIAVI_drvClose(dwDevID);
|
1999-02-13 13:38:09 +01:00
|
|
|
case DRV_ENABLE: return 1;
|
|
|
|
case DRV_DISABLE: return 1;
|
|
|
|
case DRV_QUERYCONFIGURE: return 1;
|
2001-02-14 22:49:22 +01:00
|
|
|
case DRV_CONFIGURE: return MCIAVI_drvConfigure(dwDevID);
|
1999-02-13 13:38:09 +01:00
|
|
|
case DRV_INSTALL: return DRVCNF_RESTART;
|
|
|
|
case DRV_REMOVE: return DRVCNF_RESTART;
|
2002-05-12 01:02:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (dwDevID == 0xFFFFFFFF) return MCIERR_UNSUPPORTED_FUNCTION;
|
|
|
|
|
|
|
|
switch (wMsg) {
|
2001-02-14 22:49:22 +01:00
|
|
|
case MCI_OPEN_DRIVER: return MCIAVI_mciOpen (dwDevID, dwParam1, (LPMCI_DGV_OPEN_PARMSA) dwParam2);
|
|
|
|
case MCI_CLOSE_DRIVER: return MCIAVI_mciClose (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS) dwParam2);
|
|
|
|
case MCI_PLAY: return MCIAVI_mciPlay (dwDevID, dwParam1, (LPMCI_PLAY_PARMS) dwParam2);
|
|
|
|
case MCI_RECORD: return MCIAVI_mciRecord (dwDevID, dwParam1, (LPMCI_DGV_RECORD_PARMS) dwParam2);
|
|
|
|
case MCI_STOP: return MCIAVI_mciStop (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS) dwParam2);
|
|
|
|
case MCI_SET: return MCIAVI_mciSet (dwDevID, dwParam1, (LPMCI_DGV_SET_PARMS) dwParam2);
|
|
|
|
case MCI_PAUSE: return MCIAVI_mciPause (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS) dwParam2);
|
|
|
|
case MCI_RESUME: return MCIAVI_mciResume (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS) dwParam2);
|
|
|
|
case MCI_STATUS: return MCIAVI_mciStatus (dwDevID, dwParam1, (LPMCI_DGV_STATUS_PARMSA) dwParam2);
|
|
|
|
case MCI_GETDEVCAPS: return MCIAVI_mciGetDevCaps(dwDevID, dwParam1, (LPMCI_GETDEVCAPS_PARMS) dwParam2);
|
|
|
|
case MCI_INFO: return MCIAVI_mciInfo (dwDevID, dwParam1, (LPMCI_DGV_INFO_PARMSA) dwParam2);
|
|
|
|
case MCI_SEEK: return MCIAVI_mciSeek (dwDevID, dwParam1, (LPMCI_SEEK_PARMS) dwParam2);
|
|
|
|
case MCI_PUT: return MCIAVI_mciPut (dwDevID, dwParam1, (LPMCI_DGV_PUT_PARMS) dwParam2);
|
|
|
|
case MCI_WINDOW: return MCIAVI_mciWindow (dwDevID, dwParam1, (LPMCI_DGV_WINDOW_PARMSA) dwParam2);
|
|
|
|
case MCI_LOAD: return MCIAVI_mciLoad (dwDevID, dwParam1, (LPMCI_DGV_LOAD_PARMSA) dwParam2);
|
|
|
|
case MCI_SAVE: return MCIAVI_mciSave (dwDevID, dwParam1, (LPMCI_DGV_SAVE_PARMSA) dwParam2);
|
|
|
|
case MCI_FREEZE: return MCIAVI_mciFreeze (dwDevID, dwParam1, (LPMCI_DGV_RECT_PARMS) dwParam2);
|
|
|
|
case MCI_REALIZE: return MCIAVI_mciRealize (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS) dwParam2);
|
|
|
|
case MCI_UNFREEZE: return MCIAVI_mciUnFreeze (dwDevID, dwParam1, (LPMCI_DGV_RECT_PARMS) dwParam2);
|
|
|
|
case MCI_UPDATE: return MCIAVI_mciUpdate (dwDevID, dwParam1, (LPMCI_DGV_UPDATE_PARMS) dwParam2);
|
|
|
|
case MCI_WHERE: return MCIAVI_mciWhere (dwDevID, dwParam1, (LPMCI_DGV_RECT_PARMS) dwParam2);
|
|
|
|
case MCI_STEP: return MCIAVI_mciStep (dwDevID, dwParam1, (LPMCI_DGV_STEP_PARMS) dwParam2);
|
|
|
|
case MCI_COPY: return MCIAVI_mciCopy (dwDevID, dwParam1, (LPMCI_DGV_COPY_PARMS) dwParam2);
|
|
|
|
case MCI_CUT: return MCIAVI_mciCut (dwDevID, dwParam1, (LPMCI_DGV_CUT_PARMS) dwParam2);
|
|
|
|
case MCI_DELETE: return MCIAVI_mciDelete (dwDevID, dwParam1, (LPMCI_DGV_DELETE_PARMS) dwParam2);
|
|
|
|
case MCI_PASTE: return MCIAVI_mciPaste (dwDevID, dwParam1, (LPMCI_DGV_PASTE_PARMS) dwParam2);
|
|
|
|
case MCI_CUE: return MCIAVI_mciCue (dwDevID, dwParam1, (LPMCI_DGV_CUE_PARMS) dwParam2);
|
1999-03-15 16:40:27 +01:00
|
|
|
/* Digital Video specific */
|
2001-02-14 22:49:22 +01:00
|
|
|
case MCI_CAPTURE: return MCIAVI_mciCapture (dwDevID, dwParam1, (LPMCI_DGV_CAPTURE_PARMSA) dwParam2);
|
|
|
|
case MCI_MONITOR: return MCIAVI_mciMonitor (dwDevID, dwParam1, (LPMCI_DGV_MONITOR_PARMS) dwParam2);
|
|
|
|
case MCI_RESERVE: return MCIAVI_mciReserve (dwDevID, dwParam1, (LPMCI_DGV_RESERVE_PARMSA) dwParam2);
|
|
|
|
case MCI_SETAUDIO: return MCIAVI_mciSetAudio (dwDevID, dwParam1, (LPMCI_DGV_SETAUDIO_PARMSA) dwParam2);
|
|
|
|
case MCI_SIGNAL: return MCIAVI_mciSignal (dwDevID, dwParam1, (LPMCI_DGV_SIGNAL_PARMS) dwParam2);
|
|
|
|
case MCI_SETVIDEO: return MCIAVI_mciSetVideo (dwDevID, dwParam1, (LPMCI_DGV_SETVIDEO_PARMSA) dwParam2);
|
|
|
|
case MCI_QUALITY: return MCIAVI_mciQuality (dwDevID, dwParam1, (LPMCI_DGV_QUALITY_PARMSA) dwParam2);
|
|
|
|
case MCI_LIST: return MCIAVI_mciList (dwDevID, dwParam1, (LPMCI_DGV_LIST_PARMSA) dwParam2);
|
|
|
|
case MCI_UNDO: return MCIAVI_mciUndo (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS) dwParam2);
|
|
|
|
case MCI_CONFIGURE: return MCIAVI_mciConfigure (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS) dwParam2);
|
|
|
|
case MCI_RESTORE: return MCIAVI_mciRestore (dwDevID, dwParam1, (LPMCI_DGV_RESTORE_PARMSA) dwParam2);
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
case MCI_SPIN:
|
1999-02-13 13:38:09 +01:00
|
|
|
case MCI_ESCAPE:
|
1999-09-27 15:38:57 +02:00
|
|
|
WARN("Unsupported command [%lu]\n", wMsg);
|
1999-02-13 13:38:09 +01:00
|
|
|
break;
|
|
|
|
case MCI_OPEN:
|
|
|
|
case MCI_CLOSE:
|
1999-07-15 16:43:13 +02:00
|
|
|
FIXME("Shouldn't receive a MCI_OPEN or CLOSE message\n");
|
1999-02-13 13:38:09 +01:00
|
|
|
break;
|
|
|
|
default:
|
1999-09-27 15:38:57 +02:00
|
|
|
TRACE("Sending msg [%lu] to default driver proc\n", wMsg);
|
1999-02-26 12:11:13 +01:00
|
|
|
return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
|
1999-02-13 13:38:09 +01:00
|
|
|
}
|
|
|
|
return MCIERR_UNRECOGNIZED_COMMAND;
|
|
|
|
}
|
1999-03-15 16:40:27 +01:00
|
|
|
|
|
|
|
|