65 WARN(
"Invalid wDevID=%u\n", wDevID);
77 static const WCHAR mciAviWStr[] = {
'M',
'C',
'I',
'A',
'V',
'I',0};
105 TRACE(
"(%04x)\n", dwDevID);
120 return (dwDevID == 0xFFFFFFFF) ? 1 : 0;
130 TRACE(
"(%04x)\n", dwDevID);
166 RECT rc = { 0, 0, 0, 0 };
168 TRACE(
"(%04x, %08X, %p)\n", wDevID,
dwFlags, lpOpenParms);
184 TRACE(
"Cannot create filtergraph (hr = %x)\n",
hr);
190 TRACE(
"Cannot get IMediaControl interface (hr = %x)\n",
hr);
194 hr = IGraphBuilder_QueryInterface(wma->
pgraph, &IID_IMediaSeeking, (
void**)&wma->
seek);
196 TRACE(
"Cannot get IMediaSeeking interface (hr = %x)\n",
hr);
200 hr = IGraphBuilder_QueryInterface(wma->
pgraph, &IID_IMediaEvent, (
void**)&wma->
mevent);
202 TRACE(
"Cannot get IMediaEvent interface (hr = %x)\n",
hr);
206 hr = IGraphBuilder_QueryInterface(wma->
pgraph, &IID_IVideoWindow, (
void**)&wma->
vidwin);
208 TRACE(
"Cannot get IVideoWindow interface (hr = %x)\n",
hr);
212 hr = IGraphBuilder_QueryInterface(wma->
pgraph, &IID_IBasicVideo, (
void**)&wma->
vidbasic);
214 TRACE(
"Cannot get IBasicVideo interface (hr = %x)\n",
hr);
218 hr = IGraphBuilder_QueryInterface(wma->
pgraph, &IID_IBasicAudio, (
void**)&wma->
audio);
220 TRACE(
"Cannot get IBasicAudio interface (hr = %x)\n",
hr);
230 TRACE(
"Invalid filename specified\n");
238 TRACE(
"Cannot render file (hr = %x)\n",
hr);
247 IVideoWindow_put_MessageDrain(wma->
vidwin, (OAHWND)lpOpenParms->
hWndParent);
267 IBasicAudio_Release(wma->
audio);
273 IMediaSeeking_Release(wma->
seek);
276 IVideoWindow_Release(wma->
vidwin);
279 IGraphBuilder_Release(wma->
pgraph);
282 IMediaEvent_Release(wma->
mevent);
285 IMediaControl_Release(wma->
pmctrl);
311 IVideoWindow_Release(wma->
vidwin);
313 IBasicAudio_Release(wma->
audio);
314 IMediaSeeking_Release(wma->
seek);
315 IMediaEvent_Release(wma->
mevent);
316 IGraphBuilder_Release(wma->
pgraph);
317 IMediaControl_Release(wma->
pmctrl);
337 IMediaEvent_GetEventHandle(wma->
mevent, (OAEVENT *)&
handle[
n++]);
345 TRACE(
"got stop event\n");
355 hr = IMediaEvent_GetEvent(wma->
mevent, &event_code, &p1, &p2, 0);
357 TRACE(
"got event_code = 0x%02x\n", event_code);
358 IMediaEvent_FreeEventParams(wma->
mevent, event_code, p1, p2);
364 TRACE(
"repeat media as requested\n");
365 IMediaControl_Stop(wma->
pmctrl);
366 IMediaSeeking_SetPositions(wma->
seek,
371 IMediaControl_Run(wma->
pmctrl);
381 TRACE(
"Unknown error (%d)\n", (
int)
r);
386 hr = IMediaControl_Stop(wma->
pmctrl);
388 TRACE(
"Cannot stop filtergraph (hr = %x)\n",
hr);
423 IMediaSeeking_GetTimeFormat(wma->
seek, &
format);
442 IMediaSeeking_SetPositions(wma->
seek, &wma->
seek_start, start_flags,
445 hr = IMediaControl_Run(wma->
pmctrl);
447 TRACE(
"Cannot run filtergraph (hr = %x)\n",
hr);
455 TRACE(
"Can't create thread\n");
484 FIXME(
"MCI_SEEK_TO_END not implemented yet\n");
487 FIXME(
"MCI_TO not implemented yet\n");
490 WARN(
"dwFlag doesn't tell where to seek to...\n");
496 FIXME(
"Cannot set position (hr = %x)\n",
hr);
549 hr = IMediaControl_Pause(wma->
pmctrl);
551 TRACE(
"Cannot pause filtergraph (hr = %x)\n",
hr);
572 hr = IMediaControl_Run(wma->
pmctrl);
574 TRACE(
"Cannot run filtergraph (hr = %x)\n",
hr);
600 switch (lpParms->
dwItem) {
603 TRACE(
"MCI_GETDEVCAPS_CAN_RECORD = %08x\n", lpParms->
dwReturn);
607 TRACE(
"MCI_GETDEVCAPS_HAS_AUDIO = %08x\n", lpParms->
dwReturn);
611 TRACE(
"MCI_GETDEVCAPS_HAS_VIDEO = %08x\n", lpParms->
dwReturn);
615 TRACE(
"MCI_GETDEVCAPS_DEVICE_TYPE = %08x\n", lpParms->
dwReturn);
619 TRACE(
"MCI_GETDEVCAPS_USES_FILES = %08x\n", lpParms->
dwReturn);
623 TRACE(
"MCI_GETDEVCAPS_COMPOUND_DEVICE = %08x\n", lpParms->
dwReturn);
631 TRACE(
"MCI_GETDEVCAPS_CAN_PLAY = %08x\n", lpParms->
dwReturn);
635 TRACE(
"MCI_GETDEVCAPS_CAN_SAVE = %08x\n", lpParms->
dwReturn);
639 TRACE(
"MCI_DGV_GETDEVCAPS_CAN_REVERSE = %08x\n", lpParms->
dwReturn);
643 TRACE(
"MCI_DGV_GETDEVCAPS_CAN_STRETCH = %08x\n", lpParms->
dwReturn);
647 TRACE(
"MCI_DGV_GETDEVCAPS_CAN_LOCK = %08x\n", lpParms->
dwReturn);
651 TRACE(
"MCI_DGV_GETDEVCAPS_CAN_FREEZE = %08x\n", lpParms->
dwReturn);
655 TRACE(
"MCI_DGV_GETDEVCAPS_CAN_STRETCH_INPUT = %08x\n", lpParms->
dwReturn);
659 TRACE(
"MCI_DGV_GETDEVCAPS_HAS_STILL = %08x\n", lpParms->
dwReturn);
663 TRACE(
"MCI_DGV_GETDEVCAPS_CAN_TEST = %08x\n", lpParms->
dwReturn);
667 TRACE(
"MCI_DGV_GETDEVCAPS_MAX_WINDOWS = %u\n", lpParms->
dwReturn);
670 WARN(
"Unknown capability %08x\n", lpParms->
dwItem);
699 TRACE(
"MCI_SET_TIME_FORMAT = MCI_FORMAT_MILLISECONDS\n");
703 TRACE(
"MCI_SET_TIME_FORMAT = MCI_FORMAT_FRAMES\n");
713 FIXME(
"MCI_SET_DOOR_OPEN not implemented yet\n");
715 FIXME(
"MCI_SET_DOOR_CLOSED not implemented yet\n");
717 FIXME(
"MCI_SET_AUDIO not implemented yet\n");
719 FIXME(
"MCI_SET_VIDEO not implemented yet\n");
721 FIXME(
"MCI_SET_ON not implemented yet\n");
723 FIXME(
"MCI_SET_OFF not implemented yet\n");
725 FIXME(
"MCI_SET_AUDIO_LEFT not implemented yet\n");
727 FIXME(
"MCI_SET_AUDIO_RIGHT not implemented yet\n");
730 ERR(
"Unknown flags %08x\n",
dwFlags & ~0x7f03);
754 WARN(
"No status item specified\n");
758 switch (lpParms->
dwItem) {
769 FIXME(
"Cannot set time format (hr = %x)\n",
hr);
773 hr = IMediaSeeking_GetDuration(wma->
seek, &duration);
775 FIXME(
"Cannot read duration (hr = %x)\n",
hr);
780 lpParms->
dwReturn = duration / 10000;
786 hr = IMediaSeeking_GetCurrentPosition(wma->
seek, &curpos);
788 FIXME(
"Cannot get position (hr = %x)\n",
hr);
795 FIXME(
"MCI_STATUS_NUMBER_OF_TRACKS not implemented yet\n");
800 if (
state == State_Stopped)
802 else if (
state == State_Running) {
806 }
else if (
state == State_Paused)
812 FIXME(
"MCI_STATUS_MEDIA_PRESENT not implemented yet\n");
820 FIXME(
"MCI_STATUS_READY not implemented yet\n");
823 FIXME(
"MCI_STATUS_CURRENT_TRACK not implemented yet\n");
856 hr = IVideoWindow_get_Owner(wma->
vidwin, (OAHWND*)&
hWnd);
858 TRACE(
"No video stream, returning no window error\n");
864 FIXME(
"MCI_DGV_WHERE_SOURCE_MAX stub\n");
870 FIXME(
"MCI_DGV_WHERE_DESTINATION_MAX stub\n");
876 FIXME(
"MCI_DGV_WHERE_FRAME_MAX not supported yet\n");
878 FIXME(
"MCI_DGV_WHERE_FRAME not supported yet\n");
883 FIXME(
"MCI_DGV_WHERE_VIDEO_MAX not supported yet\n");
885 FIXME(
"MCI_DGV_WHERE_VIDEO not supported yet\n");
925 TRACE(
"Setting hWnd to %p\n", lpParms->
hWnd);
926 IVideoWindow_get_Visible(wma->
vidwin, &visible);
934 IVideoWindow_put_Owner(wma->
vidwin, (OAHWND)lpParms->
hWnd);
935 IVideoWindow_put_MessageDrain(wma->
vidwin, (OAHWND)lpParms->
hWnd);
936 IVideoWindow_put_Visible(wma->
vidwin, visible);
968 FIXME(
"No support for non-RECT MCI_PUT\n");
979 hr = IVideoWindow_SetWindowPosition(wma->
vidwin,
984 WARN(
"IVideoWindow_SetWindowPosition failed: 0x%x\n",
hr);
986 dwFlags &= ~MCI_DGV_PUT_DESTINATION;
1027 if (
state == State_Running)
1032 IVideoWindow_get_Visible(wma->
vidwin, &visible);
1036 IMediaControl_Pause(wma->
pmctrl);
1039 WARN(
"Could not get image size (hr = %x)\n",
hr);
1057 IVideoWindow_put_Visible(wma->
vidwin, visible);
1087 switch (lpParms->
dwItem) {
1092 if (lpParms->
dwValue > 1000) {
1102 TRACE(
"Setting volume to %ld\n", vol);
1103 hr = IBasicAudio_put_Volume(wma->
audio, vol);
1105 WARN(
"Cannot set volume (hr = %x)\n",
hr);
1129 TRACE(
"(%08lX, %p, %08X, %08lX, %08lX)\n",
1130 dwDevID, hDriv, wMsg, dwParam1, dwParam2);
1146 if (dwDevID == 0xFFFFFFFF)
1193 FIXME(
"Unimplemented command [%08X]\n", wMsg);
1197 WARN(
"Unsupported command [%08X]\n", wMsg);
1201 FIXME(
"Shouldn't receive a MCI_OPEN or CLOSE message\n");
1204 TRACE(
"Sending msg [%08X] to default driver proc\n", wMsg);
1205 return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
static const char * wine_dbgstr_rect(const RECT *prc)
@ AM_SEEKING_NoPositioning
@ AM_SEEKING_AbsolutePositioning
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define MCI_DGV_SETAUDIO_ITEM
#define MCI_DGV_WHERE_WINDOW
#define MCI_DGV_GETDEVCAPS_HAS_STILL
#define MCI_DGV_GETDEVCAPS_CAN_STRETCH
#define MCI_DGV_PUT_DESTINATION
#define MCI_DGV_WHERE_FRAME
#define MCI_DGV_WHERE_VIDEO
#define MCI_DGV_SETAUDIO_VALUE
#define MCI_DGV_SETAUDIO_VOLUME
#define MCI_DGV_WINDOW_STATE
#define MCI_DGV_OPEN_PARENT
#define MCI_DGV_GETDEVCAPS_CAN_LOCK
#define MCI_DGV_WINDOW_TEXT
#define MCI_DGV_UPDATE_HDC
#define MCI_DGV_WINDOW_HWND
#define MCI_DGV_WHERE_SOURCE
#define MCI_DGV_GETDEVCAPS_MAX_WINDOWS
#define MCI_DGV_GETDEVCAPS_MINIMUM_RATE
#define MCI_DGV_GETDEVCAPS_CAN_STR_IN
#define MCI_DGV_GETDEVCAPS_CAN_TEST
#define MCI_DGV_WHERE_MAX
#define MCI_DGV_GETDEVCAPS_CAN_REVERSE
#define MCI_DGV_GETDEVCAPS_CAN_FREEZE
#define MCI_DGV_PLAY_REPEAT
#define MCI_DGV_GETDEVCAPS_MAXIMUM_RATE
#define MCI_DGV_WHERE_DESTINATION
#define DLL_PROCESS_ATTACH
#define HeapFree(x, y, z)
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI mciFreeCommandResource(UINT uTable)
UINT WINAPI mciLoadCommandResource(HINSTANCE hInstance, LPCWSTR lpResName, UINT uType)
#define MCI_FORMAT_RETURN_BASE
#define MAKEMCIRESOURCE(wRet, wRes)
#define MCI_INTEGER_RETURNED
BOOL WINAPI mciDriverNotify(HWND hwndCallback, UINT uDeviceID, UINT uStatus)
#define MCI_RESOURCE_RETURNED
BOOL WINAPI mciSetDriverData(UINT uDeviceID, DWORD dwData)
DWORD WINAPI mciGetDriverData(UINT uDeviceID)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
LRESULT WINAPI DefDriverProc(DWORD_PTR dwDriverIdentifier, HDRVR hDrv, UINT Msg, LPARAM lParam1, LPARAM lParam2)
#define InterlockedExchangePointer(Target, Value)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
static DWORD MCIQTZ_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMSW lpParms)
static DWORD MCIQTZ_drvConfigure(DWORD dwDevID)
static DWORD MCIQTZ_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
static DWORD MCIQTZ_mciPut(UINT wDevID, DWORD dwFlags, MCI_GENERIC_PARMS *lpParms)
static DWORD MCIQTZ_mciWhere(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms)
static DWORD MCIQTZ_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
static HINSTANCE MCIQTZ_hInstance
static DWORD MCIQTZ_drvClose(DWORD dwDevID)
static WINE_MCIQTZ * MCIQTZ_mciGetOpenDev(UINT wDevID)
static DWORD MCIQTZ_mciSetAudio(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SETAUDIO_PARMSW lpParms)
static void MCIQTZ_mciNotify(DWORD_PTR hWndCallBack, WINE_MCIQTZ *wma, UINT wStatus)
static DWORD CALLBACK MCIQTZ_notifyThread(LPVOID parm)
static DWORD MCIQTZ_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParms)
static DWORD MCIQTZ_mciStop(UINT, DWORD, LPMCI_GENERIC_PARMS)
static DWORD MCIQTZ_mciGetDevCaps(UINT wDevID, DWORD dwFlags, LPMCI_GETDEVCAPS_PARMS lpParms)
static DWORD MCIQTZ_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_DGV_OPEN_PARMSW lpOpenParms)
LRESULT CALLBACK MCIQTZ_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg, LPARAM dwParam1, LPARAM dwParam2)
static DWORD MCIQTZ_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
static DWORD MCIQTZ_mciUpdate(UINT wDevID, DWORD dwFlags, LPMCI_DGV_UPDATE_PARMS lpParms)
static DWORD MCIQTZ_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMSW lpParms)
static DWORD MCIQTZ_drvOpen(LPCWSTR str, LPMCI_OPEN_DRIVER_PARMSW modp)
static DWORD MCIQTZ_mciClose(UINT, DWORD, LPMCI_GENERIC_PARMS)
static DWORD MCIQTZ_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
#define MCI_NOTIFY_SUPERSEDED
#define MCI_GETDEVCAPS_CAN_SAVE
#define MCI_GETDEVCAPS_HAS_VIDEO
#define MCI_STATUS_POSITION
#define DRV_QUERYCONFIGURE
#define MCI_OPEN_ELEMENT_ID
#define MCI_GETDEVCAPS_CAN_RECORD
#define MCI_FORMAT_MILLISECONDS
#define MCI_GETDEVCAPS_DEVICE_TYPE
#define MCIERR_UNRECOGNIZED_COMMAND
#define MCI_GETDEVCAPS_COMPOUND_DEVICE
#define MCI_SET_DOOR_OPEN
#define MCI_GETDEVCAPS_USES_FILES
#define MCI_GETDEVCAPS_CAN_PLAY
#define MCIERR_INVALID_DEVICE_ID
#define MCI_SET_TIME_FORMAT
#define MCI_GETDEVCAPS_CAN_EJECT
#define MCIERR_MISSING_PARAMETER
#define MCI_SET_AUDIO_RIGHT
#define MCIERR_NULL_PARAMETER_BLOCK
#define MCI_NOTIFY_ABORTED
#define MCIERR_OUTOFRANGE
#define MCI_STATUS_CURRENT_TRACK
#define MCI_STATUS_NUMBER_OF_TRACKS
#define MCI_SET_DOOR_CLOSED
#define MCI_DEVTYPE_DIGITAL_VIDEO
#define MCI_GETDEVCAPS_ITEM
#define MCI_STATUS_LENGTH
#define MCI_SET_AUDIO_LEFT
#define MCI_SEEK_TO_START
#define MCI_NOTIFY_SUCCESSFUL
#define MCI_STATUS_MEDIA_PRESENT
#define MCIERR_BAD_TIME_FORMAT
#define MCIERR_UNSUPPORTED_FUNCTION
#define MCI_FORMAT_FRAMES
#define MCI_STATUS_TIME_FORMAT
#define MCI_GETDEVCAPS_HAS_AUDIO
#define IsEqualGUID(rguid1, rguid2)
REFERENCE_TIME seek_start
DWORD WINAPI WaitForMultipleObjects(IN DWORD nCount, IN CONST HANDLE *lpHandles, IN BOOL bWaitAll, IN DWORD dwMilliseconds)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
int WINAPI StretchDIBits(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ const VOID *, _In_ const BITMAPINFO *, _In_ UINT, _In_ DWORD)
BOOL WINAPI IsWindow(_In_opt_ HWND)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
int WINAPI MessageBoxA(_In_opt_ HWND hWnd, _In_opt_ LPCSTR lpText, _In_opt_ LPCSTR lpCaption, _In_ UINT uType)
HWND WINAPI GetDesktopWindow(void)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)