[PATCH 29/32] mciqtz32: Add support for mciPut
Maarten Lankhorst
m.b.lankhorst at gmail.com
Fri May 21 15:07:03 CDT 2010
---
dlls/mciqtz32/mciqtz.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 50 insertions(+), 1 deletions(-)
diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c
index efd5a56..61e7af6 100644
--- a/dlls/mciqtz32/mciqtz.c
+++ b/dlls/mciqtz32/mciqtz.c
@@ -779,6 +779,52 @@ static DWORD MCIQTZ_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMS
return 0;
}
+static DWORD MCIQTZ_mciPut(UINT wDevID, DWORD dwFlags, LPMCI_DGV_PUT_PARMS lpParms)
+{
+ WINE_MCIQTZ *wma = MCIQTZ_mciGetOpenDev(wDevID);
+ RECT rc;
+ TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
+
+ if (!lpParms)
+ return MCIERR_NULL_PARAMETER_BLOCK;
+ if (!wma)
+ return MCIERR_INVALID_DEVICE_ID;
+ if (dwFlags & MCI_TEST)
+ return 0;
+
+ if (dwFlags & MCI_DGV_PUT_CLIENT) {
+ FIXME("PUT_CLIENT %s\n", wine_dbgstr_rect(&rc));
+ return MCIERR_UNRECOGNIZED_COMMAND;
+ }
+ if (dwFlags & MCI_DGV_PUT_FRAME) {
+ FIXME("PUT_FRAME %s\n", wine_dbgstr_rect(&rc));
+ return MCIERR_UNRECOGNIZED_COMMAND;
+ }
+ if (dwFlags & MCI_DGV_PUT_VIDEO) {
+ FIXME("PUT_VIDEO %s\n", wine_dbgstr_rect(&rc));
+ return MCIERR_UNRECOGNIZED_COMMAND;
+ }
+
+ if (dwFlags & MCI_DGV_RECT)
+ rc = lpParms->rc;
+ else
+ IVideoWindow_GetWindowPosition(wma->vidwin, &rc.left, &rc.top, &rc.right, &rc.bottom);
+
+ if (dwFlags & MCI_DGV_PUT_DESTINATION) {
+ TRACE("PUT_DESTINATION %s\n", wine_dbgstr_rect(&rc));
+ IBasicVideo_SetDestinationPosition(wma->vidbasic, rc.left, rc.top, rc.right, rc.bottom);
+ }
+ if (dwFlags & MCI_DGV_PUT_SOURCE) {
+ TRACE("PUT_SOURCE %s\n", wine_dbgstr_rect(&rc));
+ IBasicVideo_SetSourcePosition(wma->vidbasic, rc.left, rc.top, rc.right, rc.bottom);
+ }
+ if (dwFlags & MCI_DGV_PUT_WINDOW || dwFlags & MCI_DGV_PUT_DESTINATION) {
+ TRACE("PUT_WINDOW %s\n", wine_dbgstr_rect(&rc));
+ IVideoWindow_SetWindowPosition(wma->vidwin, rc.left, rc.top, rc.right, rc.bottom);
+ }
+ return 0;
+}
+
/******************************************************************************
* MCIAVI_mciUpdate [internal]
*/
@@ -810,7 +856,7 @@ static DWORD MCIQTZ_mciUpdate(UINT wDevID, DWORD dwFlags, LPMCI_DGV_UPDATE_PARMS
* in a single frame drawn, so hide the window here */
IMediaControl_GetState(wma->pmctrl, -1, &old_state);
if (old_state == State_Stopped)
- IVideoWindow_put_Visible(vidwin, OAFALSE);
+ IVideoWindow_put_Visible(wma->vidwin, OAFALSE);
IMediaControl_Pause(wma->pmctrl);
IMediaControl_GetState(wma->pmctrl, -1, &state);
if (FAILED(hr = IBasicVideo_GetCurrentImage(wma->vidbasic, &size, NULL))) {
@@ -836,6 +882,8 @@ out:
IVideoWindow_put_Visible(wma->vidwin, OATRUE);
if (old_state == State_Running)
IMediaControl_Run(wma->pmctrl);
+ else
+ IMediaControl_Stop(wma->pmctrl);
}
else if (dwFlags)
FIXME("Unhandled flags %x\n", dwFlags);
@@ -911,6 +959,7 @@ LRESULT CALLBACK MCIQTZ_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
case MCI_WINDOW:
return MCIQTZ_mciWindow(dwDevID, dwParam1, (LPMCI_DGV_WINDOW_PARMSW)dwParam2);
case MCI_PUT:
+ return MCIQTZ_mciPut(dwDevID, dwParam1, (LPMCI_DGV_PUT_PARMS)dwParam2);
case MCI_RECORD:
case MCI_RESUME:
case MCI_INFO:
--
1.7.0.4
--------------040208090206010703010603--
More information about the wine-patches
mailing list