static HRESULT WINAPI IBasicVideo_fnget_SourceTop(IBasicVideo* iface,long* plTop) { CFilterGraph_THIS(iface,basvid); QUERYBASICVIDEO TRACE("(%p)->()\n",This); hr = IBasicVideo_get_SourceTop(pVideo,plTop); IBasicVideo_Release(pVideo); return hr; }
/*************************************************************************** * MCIQTZ_mciWhere [internal] */ static DWORD MCIQTZ_mciWhere(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms) { WINE_MCIQTZ* wma; IVideoWindow* pVideoWindow; IBasicVideo *pBasicVideo; HRESULT hr; HWND hWnd; RECT rc; DWORD ret = MCIERR_UNRECOGNIZED_COMMAND; TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms); if (!lpParms) return MCIERR_NULL_PARAMETER_BLOCK; wma = MCIQTZ_mciGetOpenDev(wDevID); if (!wma) return MCIERR_INVALID_DEVICE_ID; /* Find if there is a video stream and get the display window */ hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IVideoWindow, (LPVOID*)&pVideoWindow); if (FAILED(hr)) { ERR("Cannot get IVideoWindow interface (hr = %x)\n", hr); return MCIERR_INTERNAL; } hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IBasicVideo, (LPVOID*)&pBasicVideo); if (FAILED(hr)) { ERR("Cannot get IBasicVideo interface (hr = %x)\n", hr); IUnknown_Release(pVideoWindow); return MCIERR_INTERNAL; } hr = IVideoWindow_get_Owner(pVideoWindow, (OAHWND*)&hWnd); if (FAILED(hr)) { TRACE("No video stream, returning no window error\n"); IUnknown_Release(pVideoWindow); return MCIERR_NO_WINDOW; } if (dwFlags & MCI_DGV_WHERE_SOURCE) { if (dwFlags & MCI_DGV_WHERE_MAX) FIXME("MCI_DGV_WHERE_SOURCE_MAX stub %s\n", wine_dbgstr_rect(&rc)); IBasicVideo_get_SourceLeft(pBasicVideo, &rc.left); IBasicVideo_get_SourceTop(pBasicVideo, &rc.top); IBasicVideo_get_SourceWidth(pBasicVideo, &rc.right); IBasicVideo_get_SourceHeight(pBasicVideo, &rc.bottom); /* Undo conversion done below */ rc.right += rc.left; rc.bottom += rc.top; TRACE("MCI_DGV_WHERE_SOURCE %s\n", wine_dbgstr_rect(&rc)); } if (dwFlags & MCI_DGV_WHERE_DESTINATION) { if (dwFlags & MCI_DGV_WHERE_MAX) { GetClientRect(hWnd, &rc); TRACE("MCI_DGV_WHERE_DESTINATION_MAX %s\n", wine_dbgstr_rect(&rc)); } else { FIXME("MCI_DGV_WHERE_DESTINATION not supported yet\n"); goto out; } } if (dwFlags & MCI_DGV_WHERE_FRAME) { if (dwFlags & MCI_DGV_WHERE_MAX) FIXME("MCI_DGV_WHERE_FRAME_MAX not supported yet\n"); else FIXME("MCI_DGV_WHERE_FRAME not supported yet\n"); goto out; } if (dwFlags & MCI_DGV_WHERE_VIDEO) { if (dwFlags & MCI_DGV_WHERE_MAX) FIXME("MCI_DGV_WHERE_VIDEO_MAX not supported yet\n"); else FIXME("MCI_DGV_WHERE_VIDEO not supported yet\n"); goto out; } if (dwFlags & MCI_DGV_WHERE_WINDOW) { if (dwFlags & MCI_DGV_WHERE_MAX) { GetWindowRect(GetDesktopWindow(), &rc); TRACE("MCI_DGV_WHERE_WINDOW_MAX %s\n", wine_dbgstr_rect(&rc)); } else { GetWindowRect(hWnd, &rc); TRACE("MCI_DGV_WHERE_WINDOW %s\n", wine_dbgstr_rect(&rc)); } } ret = 0; out: /* In MCI, RECT structure is used differently: rc.right = width & rc.bottom = height * So convert the normal RECT into a MCI RECT before returning */ IVideoWindow_Release(pVideoWindow); IBasicVideo_Release(pBasicVideo); lpParms->rc.left = rc.left; lpParms->rc.top = rc.top; lpParms->rc.right = rc.right - rc.left; lpParms->rc.bottom = rc.bottom - rc.top; return ret; }