28#include "wine/unicode.h"
40 pControlVideo->IBasicVideo_iface.lpVtbl = lpVtbl;
41 pControlVideo->pFilter = owner;
42 pControlVideo->pInterfaceLock =
lock;
43 pControlVideo->pPin = pPin;
58 LONG VideoWidth, VideoHeight;
68 if (pSourceRect->
top < 0 || pSourceRect->
left < 0 ||
69 pSourceRect->
bottom > VideoHeight || pSourceRect->
right > VideoWidth)
113 hr = ITypeInfo_Invoke(pTypeInfo, &
This->IBasicVideo_iface, dispIdMember,
wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
114 ITypeInfo_Release(pTypeInfo);
125 if (!pAvgTimePerFrame)
127 if (!
This->pPin->pConnectedTo)
130 TRACE(
"(%p/%p)->(%p)\n",
This, iface, pAvgTimePerFrame);
132 vih =
This->pFuncsTable->pfnGetVideoFormat(
This);
142 TRACE(
"(%p/%p)->(%p)\n",
This, iface, pBitRate);
146 if (!
This->pPin->pConnectedTo)
149 vih =
This->pFuncsTable->pfnGetVideoFormat(
This);
159 TRACE(
"(%p/%p)->(%p)\n",
This, iface, pBitErrorRate);
163 if (!
This->pPin->pConnectedTo)
166 vih =
This->pFuncsTable->pfnGetVideoFormat(
This);
176 TRACE(
"(%p/%p)->(%p)\n",
This, iface, pVideoWidth);
180 vih =
This->pFuncsTable->pfnGetVideoFormat(
This);
191 TRACE(
"(%p/%p)->(%p)\n",
This, iface, pVideoHeight);
195 vih =
This->pFuncsTable->pfnGetVideoFormat(
This);
207 TRACE(
"(%p/%p)->(%d)\n",
This, iface, SourceLeft);
208 hr =
This->pFuncsTable->pfnGetSourceRect(
This, &SourceRect);
211 SourceRect.
right = (SourceRect.
right - SourceRect.
left) + SourceLeft;
212 SourceRect.
left = SourceLeft;
216 hr =
This->pFuncsTable->pfnSetSourceRect(
This, &SourceRect);
226 TRACE(
"(%p/%p)->(%p)\n",
This, iface, pSourceLeft);
229 This->pFuncsTable->pfnGetSourceRect(
This, &SourceRect);
230 *pSourceLeft = SourceRect.
left;
241 TRACE(
"(%p/%p)->(%d)\n",
This, iface, SourceWidth);
242 hr =
This->pFuncsTable->pfnGetSourceRect(
This, &SourceRect);
245 SourceRect.
right = SourceRect.
left + SourceWidth;
249 hr =
This->pFuncsTable->pfnSetSourceRect(
This, &SourceRect);
259 TRACE(
"(%p/%p)->(%p)\n",
This, iface, pSourceWidth);
262 This->pFuncsTable->pfnGetSourceRect(
This, &SourceRect);
263 *pSourceWidth = SourceRect.
right - SourceRect.
left;
274 TRACE(
"(%p/%p)->(%d)\n",
This, iface, SourceTop);
275 hr =
This->pFuncsTable->pfnGetSourceRect(
This, &SourceRect);
279 SourceRect.
top = SourceTop;
283 hr =
This->pFuncsTable->pfnSetSourceRect(
This, &SourceRect);
293 TRACE(
"(%p/%p)->(%p)\n",
This, iface, pSourceTop);
296 This->pFuncsTable->pfnGetSourceRect(
This, &SourceRect);
297 *pSourceTop = SourceRect.
top;
308 TRACE(
"(%p/%p)->(%d)\n",
This, iface, SourceHeight);
309 hr =
This->pFuncsTable->pfnGetSourceRect(
This, &SourceRect);
312 SourceRect.
bottom = SourceRect.
top + SourceHeight;
316 hr =
This->pFuncsTable->pfnSetSourceRect(
This, &SourceRect);
326 TRACE(
"(%p/%p)->(%p)\n",
This, iface, pSourceHeight);
329 This->pFuncsTable->pfnGetSourceRect(
This, &SourceRect);
331 *pSourceHeight = SourceRect.
bottom - SourceRect.
top;
342 TRACE(
"(%p/%p)->(%d)\n",
This, iface, DestinationLeft);
343 hr =
This->pFuncsTable->pfnGetTargetRect(
This, &DestRect);
346 DestRect.
right = (DestRect.
right - DestRect.
left) + DestinationLeft;
347 DestRect.
left = DestinationLeft;
351 hr =
This->pFuncsTable->pfnSetTargetRect(
This, &DestRect);
361 TRACE(
"(%p/%p)->(%p)\n",
This, iface, pDestinationLeft);
362 if (!pDestinationLeft)
364 This->pFuncsTable->pfnGetTargetRect(
This, &DestRect);
365 *pDestinationLeft = DestRect.
left;
376 TRACE(
"(%p/%p)->(%d)\n",
This, iface, DestinationWidth);
377 hr =
This->pFuncsTable->pfnGetTargetRect(
This, &DestRect);
380 DestRect.
right = DestRect.
left + DestinationWidth;
384 hr =
This->pFuncsTable->pfnSetTargetRect(
This, &DestRect);
394 TRACE(
"(%p/%p)->(%p)\n",
This, iface, pDestinationWidth);
395 if (!pDestinationWidth)
397 This->pFuncsTable->pfnGetTargetRect(
This, &DestRect);
398 *pDestinationWidth = DestRect.
right - DestRect.
left;
409 TRACE(
"(%p/%p)->(%d)\n",
This, iface, DestinationTop);
410 hr =
This->pFuncsTable->pfnGetTargetRect(
This, &DestRect);
414 DestRect.
top = DestinationTop;
418 hr =
This->pFuncsTable->pfnSetTargetRect(
This, &DestRect);
428 TRACE(
"(%p/%p)->(%p)\n",
This, iface, pDestinationTop);
429 if (!pDestinationTop)
431 This->pFuncsTable->pfnGetTargetRect(
This, &DestRect);
432 *pDestinationTop = DestRect.
top;
443 TRACE(
"(%p/%p)->(%d)\n",
This, iface, DestinationHeight);
444 hr =
This->pFuncsTable->pfnGetTargetRect(
This, &DestRect);
447 DestRect.
bottom = DestRect.
top + DestinationHeight;
451 hr =
This->pFuncsTable->pfnSetTargetRect(
This, &DestRect);
461 TRACE(
"(%p/%p)->(%p)\n",
This, iface, pDestinationHeight);
462 if (!pDestinationHeight)
464 This->pFuncsTable->pfnGetTargetRect(
This, &DestRect);
465 *pDestinationHeight = DestRect.
bottom - DestRect.
top;
480 return This->pFuncsTable->pfnSetSourceRect(
This, &SourceRect);
488 TRACE(
"(%p/%p)->(%p, %p, %p, %p)\n",
This, iface, pLeft, pTop, pWidth, pHeight);
489 if (!pLeft || !pTop || !pWidth || !pHeight)
491 This->pFuncsTable->pfnGetSourceRect(
This, &SourceRect);
493 *pLeft = SourceRect.
left;
494 *pTop = SourceRect.
top;
495 *pWidth = SourceRect.
right - SourceRect.
left;
496 *pHeight = SourceRect.
bottom - SourceRect.
top;
506 return This->pFuncsTable->pfnSetDefaultSourceRect(
This);
519 return This->pFuncsTable->pfnSetTargetRect(
This, &DestRect);
527 TRACE(
"(%p/%p)->(%p, %p, %p, %p)\n",
This, iface, pLeft, pTop, pWidth, pHeight);
528 if (!pLeft || !pTop || !pWidth || !pHeight)
530 This->pFuncsTable->pfnGetTargetRect(
This, &DestRect);
532 *pLeft = DestRect.
left;
533 *pTop = DestRect.
top;
534 *pWidth = DestRect.
right - DestRect.
left;
535 *pHeight = DestRect.
bottom - DestRect.
top;
545 return This->pFuncsTable->pfnSetDefaultTargetRect(
This);
553 TRACE(
"(%p/%p)->(%p, %p)\n",
This, iface, pWidth, pHeight);
554 if (!pWidth || !pHeight)
557 vih =
This->pFuncsTable->pfnGetVideoFormat(
This);
568 TRACE(
"(%p/%p)->(%d, %d, %p, %p)\n",
This, iface, StartIndex,
Entries, pRetrieved, pPalette);
569 if (!pRetrieved || !pPalette)
589 return This->pFuncsTable->pfnIsDefaultSourceRect(
This);
596 return This->pFuncsTable->pfnIsDefaultTargetRect(
This);
static const ENTRY Entries[]
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
_Must_inspect_result_ _In_ ULONG _Out_writes_bytes_ pBufferSize PVOID _Inout_ PULONG pBufferSize
static VARIANTARG static DISPID
HRESULT WINAPI BaseControlVideoImpl_GetTypeInfoCount(IBasicVideo *iface, UINT *pctinfo)
HRESULT WINAPI BaseControlVideoImpl_GetCurrentImage(IBasicVideo *iface, LONG *pBufferSize, LONG *pDIBImage)
HRESULT WINAPI BaseControlVideoImpl_get_SourceLeft(IBasicVideo *iface, LONG *pSourceLeft)
HRESULT WINAPI BaseControlVideoImpl_GetVideoSize(IBasicVideo *iface, LONG *pWidth, LONG *pHeight)
HRESULT WINAPI BaseControlVideoImpl_SetDefaultDestinationPosition(IBasicVideo *iface)
HRESULT WINAPI BaseControlVideoImpl_GetDestinationPosition(IBasicVideo *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight)
HRESULT WINAPI BaseControlVideoImpl_put_SourceTop(IBasicVideo *iface, LONG SourceTop)
HRESULT WINAPI BaseControlVideoImpl_get_SourceWidth(IBasicVideo *iface, LONG *pSourceWidth)
HRESULT WINAPI BaseControlVideoImpl_put_SourceHeight(IBasicVideo *iface, LONG SourceHeight)
static HRESULT BaseControlVideoImpl_CheckSourceRect(BaseControlVideo *This, RECT *pSourceRect)
HRESULT WINAPI BaseControlVideoImpl_get_DestinationWidth(IBasicVideo *iface, LONG *pDestinationWidth)
HRESULT WINAPI BaseControlVideoImpl_SetSourcePosition(IBasicVideo *iface, LONG Left, LONG Top, LONG Width, LONG Height)
HRESULT WINAPI BaseControlVideoImpl_get_SourceTop(IBasicVideo *iface, LONG *pSourceTop)
HRESULT WINAPI BaseControlVideo_Destroy(BaseControlVideo *pControlVideo)
HRESULT WINAPI BaseControlVideoImpl_put_DestinationWidth(IBasicVideo *iface, LONG DestinationWidth)
HRESULT WINAPI BaseControlVideoImpl_IsUsingDefaultDestination(IBasicVideo *iface)
HRESULT WINAPI BaseControlVideoImpl_put_SourceLeft(IBasicVideo *iface, LONG SourceLeft)
HRESULT WINAPI BaseControlVideoImpl_GetTypeInfo(IBasicVideo *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
HRESULT WINAPI BaseControlVideoImpl_GetSourcePosition(IBasicVideo *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight)
HRESULT WINAPI BaseControlVideoImpl_get_DestinationLeft(IBasicVideo *iface, LONG *pDestinationLeft)
HRESULT WINAPI BaseControlVideoImpl_get_DestinationHeight(IBasicVideo *iface, LONG *pDestinationHeight)
HRESULT WINAPI BaseControlVideoImpl_IsUsingDefaultSource(IBasicVideo *iface)
HRESULT WINAPI BaseControlVideoImpl_get_BitRate(IBasicVideo *iface, LONG *pBitRate)
static BaseControlVideo * impl_from_IBasicVideo(IBasicVideo *iface)
HRESULT WINAPI BaseControlVideoImpl_get_DestinationTop(IBasicVideo *iface, LONG *pDestinationTop)
HRESULT WINAPI BaseControlVideoImpl_Invoke(IBasicVideo *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
HRESULT WINAPI BaseControlVideoImpl_put_SourceWidth(IBasicVideo *iface, LONG SourceWidth)
HRESULT WINAPI BaseControlVideoImpl_GetIDsOfNames(IBasicVideo *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
HRESULT WINAPI BaseControlVideoImpl_get_VideoHeight(IBasicVideo *iface, LONG *pVideoHeight)
HRESULT WINAPI BaseControlVideoImpl_get_SourceHeight(IBasicVideo *iface, LONG *pSourceHeight)
HRESULT WINAPI BaseControlVideoImpl_get_AvgTimePerFrame(IBasicVideo *iface, REFTIME *pAvgTimePerFrame)
HRESULT WINAPI BaseControlVideo_Init(BaseControlVideo *pControlVideo, const IBasicVideoVtbl *lpVtbl, BaseFilter *owner, CRITICAL_SECTION *lock, BasePin *pPin, const BaseControlVideoFuncTable *pFuncsTable)
HRESULT WINAPI BaseControlVideoImpl_GetVideoPaletteEntries(IBasicVideo *iface, LONG StartIndex, LONG Entries, LONG *pRetrieved, LONG *pPalette)
static HRESULT BaseControlVideoImpl_CheckTargetRect(BaseControlVideo *This, RECT *pTargetRect)
HRESULT WINAPI BaseControlVideoImpl_get_BitErrorRate(IBasicVideo *iface, LONG *pBitErrorRate)
HRESULT WINAPI BaseControlVideoImpl_put_DestinationTop(IBasicVideo *iface, LONG DestinationTop)
HRESULT WINAPI BaseControlVideoImpl_put_DestinationHeight(IBasicVideo *iface, LONG DestinationHeight)
HRESULT WINAPI BaseControlVideoImpl_put_DestinationLeft(IBasicVideo *iface, LONG DestinationLeft)
HRESULT WINAPI BaseControlVideoImpl_SetDefaultSourcePosition(IBasicVideo *iface)
HRESULT WINAPI BaseControlVideoImpl_get_VideoWidth(IBasicVideo *iface, LONG *pVideoWidth)
HRESULT WINAPI BaseControlVideoImpl_SetDestinationPosition(IBasicVideo *iface, LONG Left, LONG Top, LONG Width, LONG Height)
HRESULT WINAPI BaseDispatchImpl_GetTypeInfoCount(BaseDispatch *This, UINT *pctinfo)
HRESULT WINAPI BaseDispatchImpl_GetIDsOfNames(BaseDispatch *This, REFIID riid, OLECHAR **rgszNames, UINT cNames, LCID lcid, DISPID *rgdispid)
HRESULT WINAPI BaseDispatch_Init(BaseDispatch *This, REFIID riid)
HRESULT WINAPI BaseDispatch_Destroy(BaseDispatch *This)
HRESULT WINAPI BaseDispatchImpl_GetTypeInfo(BaseDispatch *This, REFIID riid, UINT itinfo, LCID lcid, ITypeInfo **pptinfo)
const struct BasePinFuncTable * pFuncsTable
#define CONTAINING_RECORD(address, type, field)
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
_In_ HFONT _Out_ PUINT Height
#define VFW_E_NO_PALETTE_AVAILABLE
#define VFW_E_NOT_CONNECTED
_In_ DWORD _Out_ _In_ WORD wFlags
BOOL WINAPI IsRectEmpty(_In_ LPCRECT)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)