Author: akhaldi
Date: Sun Feb 26 17:53:31 2017
New Revision: 73958
URL:
http://svn.reactos.org/svn/reactos?rev=73958&view=rev
Log:
[MCIQTZ32] Sync with Wine Staging 2.2. CORE-12823
71fbaba mciqtz32: Implement MCI_DGV_PLAY_REPEAT.
Modified:
trunk/reactos/dll/win32/mciqtz32/mciqtz.c
trunk/reactos/dll/win32/mciqtz32/mciqtz_private.h
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/mciqtz32/mciqtz.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciqtz32/mciqtz.…
==============================================================================
--- trunk/reactos/dll/win32/mciqtz32/mciqtz.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mciqtz32/mciqtz.c [iso-8859-1] Sun Feb 26 17:53:31 2017
@@ -362,6 +362,18 @@
}
} while (hr == S_OK && event_code != EC_COMPLETE);
if (hr == S_OK && event_code == EC_COMPLETE) {
+ /* Repeat the music by seeking and running again */
+ if (wma->mci_flags & MCI_DGV_PLAY_REPEAT) {
+ TRACE("repeat media as requested\n");
+ IMediaControl_Stop(wma->pmctrl);
+ IMediaSeeking_SetPositions(wma->seek,
+ &wma->seek_start,
+ AM_SEEKING_AbsolutePositioning,
+ &wma->seek_stop,
+ AM_SEEKING_AbsolutePositioning);
+ IMediaControl_Run(wma->pmctrl);
+ continue;
+ }
old = InterlockedExchangePointer(&wma->callback, NULL);
if (old)
mciDriverNotify(old, wma->notify_devid, MCI_NOTIFY_SUCCESSFUL);
@@ -390,9 +402,8 @@
{
WINE_MCIQTZ* wma;
HRESULT hr;
- REFERENCE_TIME time1 = 0, time2 = 0;
GUID format;
- DWORD pos1;
+ DWORD start_flags;
TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
@@ -411,23 +422,29 @@
mciDriverNotify(old, wma->notify_devid, MCI_NOTIFY_ABORTED);
}
+ wma->mci_flags = dwFlags;
IMediaSeeking_GetTimeFormat(wma->seek, &format);
if (dwFlags & MCI_FROM) {
if (IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME))
- time1 = lpParms->dwFrom * 10000;
+ wma->seek_start = lpParms->dwFrom * 10000;
else
- time1 = lpParms->dwFrom;
- pos1 = AM_SEEKING_AbsolutePositioning;
- } else
- pos1 = AM_SEEKING_NoPositioning;
+ wma->seek_start = lpParms->dwFrom;
+ start_flags = AM_SEEKING_AbsolutePositioning;
+ } else {
+ wma->seek_start = 0;
+ start_flags = AM_SEEKING_NoPositioning;
+ }
if (dwFlags & MCI_TO) {
if (IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME))
- time2 = lpParms->dwTo * 10000;
+ wma->seek_stop = lpParms->dwTo * 10000;
else
- time2 = lpParms->dwTo;
- } else
- IMediaSeeking_GetDuration(wma->seek, &time2);
- IMediaSeeking_SetPositions(wma->seek, &time1, pos1, &time2,
AM_SEEKING_AbsolutePositioning);
+ wma->seek_stop = lpParms->dwTo;
+ } else {
+ wma->seek_stop = 0;
+ IMediaSeeking_GetDuration(wma->seek, &wma->seek_stop);
+ }
+ IMediaSeeking_SetPositions(wma->seek, &wma->seek_start, start_flags,
+ &wma->seek_stop, AM_SEEKING_AbsolutePositioning);
hr = IMediaControl_Run(wma->pmctrl);
if (FAILED(hr)) {
Modified: trunk/reactos/dll/win32/mciqtz32/mciqtz_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciqtz32/mciqtz_…
==============================================================================
--- trunk/reactos/dll/win32/mciqtz32/mciqtz_private.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mciqtz32/mciqtz_private.h [iso-8859-1] Sun Feb 26 17:53:31
2017
@@ -37,6 +37,9 @@
IBasicVideo* vidbasic;
IBasicAudio* audio;
DWORD time_format;
+ DWORD mci_flags;
+ REFERENCE_TIME seek_start;
+ REFERENCE_TIME seek_stop;
UINT command_table;
HWND parent;
MCIDEVICEID notify_devid;
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Feb 26 17:53:31 2017
@@ -92,7 +92,7 @@
reactos/dll/win32/mapi32 # Synced to WineStaging-2.2
reactos/dll/win32/mciavi32 # Synced to WineStaging-1.9.16
reactos/dll/win32/mcicda # Synced to WineStaging-1.9.16
-reactos/dll/win32/mciqtz32 # Synced to WineStaging-1.9.16
+reactos/dll/win32/mciqtz32 # Synced to WineStaging-2.2
reactos/dll/win32/mciseq # Synced to WineStaging-1.9.11
reactos/dll/win32/mciwave # Synced to WineStaging-1.9.11
reactos/dll/win32/mgmtapi # Synced to WineStaging-1.9.11