[pkg-wine-party] [SCM] Debian Wine packaging branch, wheezy, updated. wine-1.4-7-302-gb61b690
Alexandre Julliard
julliard at winehq.org
Sun Jun 17 20:02:55 UTC 2012
The following commit has been merged in the wheezy branch:
commit 7b7612ef42aa26760f35a5703fc08ada11b8fead
Author: Andrew Eikum <aeikum at codeweavers.com>
Date: Wed Mar 28 11:09:32 2012 -0500
mciqtz32: Stop the graph when the file is no longer playing.
(cherry picked from commit 8e88a5a6fab162913a204638bd62953e6fb10445)
diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c
index 3e16235..b05e681 100644
--- a/dlls/mciqtz32/mciqtz.c
+++ b/dlls/mciqtz32/mciqtz.c
@@ -180,6 +180,12 @@ static DWORD MCIQTZ_mciOpen(UINT wDevID, DWORD dwFlags,
goto err;
}
+ hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IMediaEvent, (void**)&wma->mevent);
+ if (FAILED(hr)) {
+ TRACE("Cannot get IMediaEvent interface (hr = %x)\n", hr);
+ goto err;
+ }
+
hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IVideoWindow, (void**)&wma->vidwin);
if (FAILED(hr)) {
TRACE("Cannot get IVideoWindow interface (hr = %x)\n", hr);
@@ -246,6 +252,9 @@ err:
if (wma->pgraph)
IGraphBuilder_Release(wma->pgraph);
wma->pgraph = NULL;
+ if (wma->mevent)
+ IMediaEvent_Release(wma->mevent);
+ wma->mevent = NULL;
if (wma->pmctrl)
IMediaControl_Release(wma->pmctrl);
wma->pmctrl = NULL;
@@ -276,6 +285,7 @@ static DWORD MCIQTZ_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpP
IUnknown_Release(wma->vidwin);
IUnknown_Release(wma->vidbasic);
IUnknown_Release(wma->seek);
+ IMediaEvent_Release(wma->mevent);
IGraphBuilder_Release(wma->pgraph);
IMediaControl_Release(wma->pmctrl);
if (wma->uninit)
@@ -654,9 +664,21 @@ static DWORD MCIQTZ_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMS
IMediaControl_GetState(wma->pmctrl, -1, &state);
if (state == State_Stopped)
lpParms->dwReturn = MCI_MODE_STOP;
- else if (state == State_Running)
+ else if (state == State_Running) {
+ LONG code;
+ LONG_PTR p1, p2;
+
lpParms->dwReturn = MCI_MODE_PLAY;
- else if (state == State_Paused)
+
+ do {
+ hr = IMediaEvent_GetEvent(wma->mevent, &code, &p1, &p2, 0);
+ if (hr == S_OK && code == EC_COMPLETE){
+ lpParms->dwReturn = MCI_MODE_STOP;
+ IMediaControl_Stop(wma->pmctrl);
+ }
+ } while (hr == S_OK);
+
+ } else if (state == State_Paused)
lpParms->dwReturn = MCI_MODE_PAUSE;
break;
}
diff --git a/dlls/mciqtz32/mciqtz_private.h b/dlls/mciqtz32/mciqtz_private.h
index 93834fb..35adc42 100644
--- a/dlls/mciqtz32/mciqtz_private.h
+++ b/dlls/mciqtz32/mciqtz_private.h
@@ -32,6 +32,7 @@ typedef struct {
IGraphBuilder* pgraph;
IMediaControl* pmctrl;
IMediaSeeking* seek;
+ IMediaEvent* mevent;
IVideoWindow* vidwin;
IBasicVideo* vidbasic;
DWORD time_format;
--
Debian Wine packaging
More information about the pkg-wine-party
mailing list