ReactOS  0.4.15-dev-1177-g6cb3b62
vfwcapture.c File Reference
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wtypes.h"
#include "wingdi.h"
#include "winuser.h"
#include "dshow.h"
#include "qcap_main.h"
#include "wine/debug.h"
#include "capture.h"
#include "uuids.h"
#include "vfwmsgs.h"
#include "amvideo.h"
#include "strmif.h"
#include "ddraw.h"
#include "ocidl.h"
#include "oleauto.h"
Include dependency graph for vfwcapture.c:

Go to the source code of this file.

Classes

struct  VfwCapture
 
struct  VfwPinImpl
 

Macros

#define COBJMACROS
 

Typedefs

typedef struct VfwCapture VfwCapture
 
typedef struct VfwPinImpl VfwPinImpl
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (qcap)
 
static HRESULT VfwPin_Construct (IBaseFilter *, LPCRITICAL_SECTION, IPin **)
 
static VfwCaptureimpl_from_IUnknown (IUnknown *iface)
 
static VfwCaptureimpl_from_BaseFilter (BaseFilter *iface)
 
static VfwCaptureimpl_from_IBaseFilter (IBaseFilter *iface)
 
static VfwCaptureimpl_from_IAMStreamConfig (IAMStreamConfig *iface)
 
static VfwCaptureimpl_from_IAMVideoProcAmp (IAMVideoProcAmp *iface)
 
static VfwCaptureimpl_from_IPersistPropertyBag (IPersistPropertyBag *iface)
 
static HRESULT WINAPI unknown_inner_QueryInterface (IUnknown *iface, REFIID riid, void **ret_iface)
 
static ULONG WINAPI unknown_inner_AddRef (IUnknown *iface)
 
static ULONG WINAPI unknown_inner_Release (IUnknown *iface)
 
static IPin *WINAPI VfwCapture_GetPin (BaseFilter *iface, int pos)
 
static LONG WINAPI VfwCapture_GetPinCount (BaseFilter *iface)
 
IUnknown *WINAPI QCAP_createVFWCaptureFilter (IUnknown *pUnkOuter, HRESULT *phr)
 
static HRESULT WINAPI VfwCapture_QueryInterface (IBaseFilter *iface, REFIID riid, void **ret_iface)
 
static ULONG WINAPI VfwCapture_AddRef (IBaseFilter *iface)
 
static ULONG WINAPI VfwCapture_Release (IBaseFilter *iface)
 
static HRESULT WINAPI VfwCapture_Stop (IBaseFilter *iface)
 
static HRESULT WINAPI VfwCapture_Pause (IBaseFilter *iface)
 
static HRESULT WINAPI VfwCapture_Run (IBaseFilter *iface, REFERENCE_TIME tStart)
 
static HRESULT WINAPI VfwCapture_FindPin (IBaseFilter *iface, LPCWSTR Id, IPin **ppPin)
 
static HRESULT WINAPI AMStreamConfig_QueryInterface (IAMStreamConfig *iface, REFIID riid, void **ret_iface)
 
static ULONG WINAPI AMStreamConfig_AddRef (IAMStreamConfig *iface)
 
static ULONG WINAPI AMStreamConfig_Release (IAMStreamConfig *iface)
 
static HRESULT WINAPI AMStreamConfig_SetFormat (IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt)
 
static HRESULT WINAPI AMStreamConfig_GetFormat (IAMStreamConfig *iface, AM_MEDIA_TYPE **pmt)
 
static HRESULT WINAPI AMStreamConfig_GetNumberOfCapabilities (IAMStreamConfig *iface, int *piCount, int *piSize)
 
static HRESULT WINAPI AMStreamConfig_GetStreamCaps (IAMStreamConfig *iface, int iIndex, AM_MEDIA_TYPE **pmt, BYTE *pSCC)
 
static HRESULT WINAPI AMVideoProcAmp_QueryInterface (IAMVideoProcAmp *iface, REFIID riid, void **ret_iface)
 
static ULONG WINAPI AMVideoProcAmp_AddRef (IAMVideoProcAmp *iface)
 
static ULONG WINAPI AMVideoProcAmp_Release (IAMVideoProcAmp *iface)
 
static HRESULT WINAPI AMVideoProcAmp_GetRange (IAMVideoProcAmp *iface, LONG Property, LONG *pMin, LONG *pMax, LONG *pSteppingDelta, LONG *pDefault, LONG *pCapsFlags)
 
static HRESULT WINAPI AMVideoProcAmp_Set (IAMVideoProcAmp *iface, LONG Property, LONG lValue, LONG Flags)
 
static HRESULT WINAPI AMVideoProcAmp_Get (IAMVideoProcAmp *iface, LONG Property, LONG *lValue, LONG *Flags)
 
static HRESULT WINAPI PPB_QueryInterface (IPersistPropertyBag *iface, REFIID riid, void **ret_iface)
 
static ULONG WINAPI PPB_AddRef (IPersistPropertyBag *iface)
 
static ULONG WINAPI PPB_Release (IPersistPropertyBag *iface)
 
static HRESULT WINAPI PPB_GetClassID (IPersistPropertyBag *iface, CLSID *pClassID)
 
static HRESULT WINAPI PPB_InitNew (IPersistPropertyBag *iface)
 
static HRESULT WINAPI PPB_Load (IPersistPropertyBag *iface, IPropertyBag *pPropBag, IErrorLog *pErrorLog)
 
static HRESULT WINAPI PPB_Save (IPersistPropertyBag *iface, IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties)
 
static VfwPinImplimpl_from_IKsPropertySet (IKsPropertySet *iface)
 
static HRESULT WINAPI KSP_QueryInterface (IKsPropertySet *iface, REFIID riid, void **ret_iface)
 
static ULONG WINAPI KSP_AddRef (IKsPropertySet *iface)
 
static ULONG WINAPI KSP_Release (IKsPropertySet *iface)
 
static HRESULT WINAPI KSP_Set (IKsPropertySet *iface, REFGUID guidPropSet, DWORD dwPropID, LPVOID pInstanceData, DWORD cbInstanceData, LPVOID pPropData, DWORD cbPropData)
 
static HRESULT WINAPI KSP_Get (IKsPropertySet *iface, REFGUID guidPropSet, DWORD dwPropID, LPVOID pInstanceData, DWORD cbInstanceData, LPVOID pPropData, DWORD cbPropData, DWORD *pcbReturned)
 
static HRESULT WINAPI KSP_QuerySupported (IKsPropertySet *iface, REFGUID guidPropSet, DWORD dwPropID, DWORD *pTypeSupport)
 
static VfwPinImplimpl_from_BasePin (BasePin *pin)
 
static HRESULT WINAPI VfwPin_GetMediaType (BasePin *pin, int iPosition, AM_MEDIA_TYPE *pmt)
 
static LONG WINAPI VfwPin_GetMediaTypeVersion (BasePin *iface)
 
static HRESULT WINAPI VfwPin_DecideBufferSize (BaseOutputPin *iface, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
 
static VfwPinImplimpl_from_IPin (IPin *iface)
 
static HRESULT WINAPI VfwPin_QueryInterface (IPin *iface, REFIID riid, LPVOID *ppv)
 
static ULONG WINAPI VfwPin_Release (IPin *iface)
 
static HRESULT WINAPI VfwPin_EnumMediaTypes (IPin *iface, IEnumMediaTypes **ppEnum)
 
static HRESULT WINAPI VfwPin_QueryInternalConnections (IPin *iface, IPin **apPin, ULONG *cPin)
 

Variables

static const IBaseFilterVtbl VfwCapture_Vtbl
 
static const IAMStreamConfigVtbl IAMStreamConfig_VTable
 
static const IAMVideoProcAmpVtbl IAMVideoProcAmp_VTable
 
static const IPersistPropertyBagVtbl IPersistPropertyBag_VTable
 
static const IPinVtbl VfwPin_Vtbl
 
static const IUnknownVtbl unknown_inner_vtbl
 
static const BaseFilterFuncTable BaseFuncTable
 
static const IKsPropertySetVtbl IKsPropertySet_VTable
 
static const BaseOutputPinFuncTable output_BaseOutputFuncTable
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 21 of file vfwcapture.c.

Typedef Documentation

◆ VfwCapture

◆ VfwPinImpl

Function Documentation

◆ AMStreamConfig_AddRef()

static ULONG WINAPI AMStreamConfig_AddRef ( IAMStreamConfig *  iface)
static

Definition at line 336 of file vfwcapture.c.

337 {
339 
340  return IUnknown_AddRef(This->outer_unk);
341 }
static VfwCapture * impl_from_IAMStreamConfig(IAMStreamConfig *iface)
Definition: vfwcapture.c:84

◆ AMStreamConfig_GetFormat()

static HRESULT WINAPI AMStreamConfig_GetFormat ( IAMStreamConfig *  iface,
AM_MEDIA_TYPE **  pmt 
)
static

Definition at line 394 of file vfwcapture.c.

395 {
397 
398  TRACE("%p -> (%p)\n", iface, pmt);
399  return qcap_driver_get_format(This->driver_info, pmt);
400 }
HRESULT qcap_driver_get_format(const Capture *, AM_MEDIA_TYPE **) DECLSPEC_HIDDEN
Definition: v4l.c:939
#define TRACE(s)
Definition: solgame.cpp:4
static VfwCapture * impl_from_IAMStreamConfig(IAMStreamConfig *iface)
Definition: vfwcapture.c:84

◆ AMStreamConfig_GetNumberOfCapabilities()

static HRESULT WINAPI AMStreamConfig_GetNumberOfCapabilities ( IAMStreamConfig *  iface,
int piCount,
int piSize 
)
static

Definition at line 403 of file vfwcapture.c.

405 {
406  FIXME("%p: %p %p - stub, intentional\n", iface, piCount, piSize);
407  *piCount = 0;
408  return E_NOTIMPL; /* Not implemented for this interface */
409 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ AMStreamConfig_GetStreamCaps()

static HRESULT WINAPI AMStreamConfig_GetStreamCaps ( IAMStreamConfig *  iface,
int  iIndex,
AM_MEDIA_TYPE **  pmt,
BYTE pSCC 
)
static

Definition at line 412 of file vfwcapture.c.

414 {
415  FIXME("%p: %d %p %p - stub, intentional\n", iface, iIndex, pmt, pSCC);
416  return E_NOTIMPL; /* Not implemented for this interface */
417 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ AMStreamConfig_QueryInterface()

static HRESULT WINAPI AMStreamConfig_QueryInterface ( IAMStreamConfig *  iface,
REFIID  riid,
void **  ret_iface 
)
static

Definition at line 328 of file vfwcapture.c.

330 {
332 
333  return IUnknown_QueryInterface(This->outer_unk, riid, ret_iface);
334 }
REFIID riid
Definition: precomp.h:44
static VfwCapture * impl_from_IAMStreamConfig(IAMStreamConfig *iface)
Definition: vfwcapture.c:84

◆ AMStreamConfig_Release()

static ULONG WINAPI AMStreamConfig_Release ( IAMStreamConfig *  iface)
static

Definition at line 343 of file vfwcapture.c.

344 {
346 
347  return IUnknown_Release(This->outer_unk);
348 }
static VfwCapture * impl_from_IAMStreamConfig(IAMStreamConfig *iface)
Definition: vfwcapture.c:84

◆ AMStreamConfig_SetFormat()

static HRESULT WINAPI AMStreamConfig_SetFormat ( IAMStreamConfig *  iface,
AM_MEDIA_TYPE pmt 
)
static

Definition at line 351 of file vfwcapture.c.

352 {
353  HRESULT hr;
355  BasePin *pin;
356 
357  TRACE("(%p): %p->%p\n", iface, pmt, pmt ? pmt->pbFormat : NULL);
358 
359  if (This->filter.state != State_Stopped)
360  {
361  TRACE("Returning not stopped error\n");
362  return VFW_E_NOT_STOPPED;
363  }
364 
365  if (!pmt)
366  {
367  TRACE("pmt is NULL\n");
368  return E_POINTER;
369  }
370 
371  dump_AM_MEDIA_TYPE(pmt);
372 
373  pin = (BasePin *)This->pOutputPin;
374  if (pin->pConnectedTo != NULL)
375  {
376  hr = IPin_QueryAccept(pin->pConnectedTo, pmt);
377  TRACE("Would accept: %d\n", hr);
378  if (hr == S_FALSE)
379  return VFW_E_INVALIDMEDIATYPE;
380  }
381 
382  hr = qcap_driver_set_format(This->driver_info, pmt);
383  if (SUCCEEDED(hr) && This->filter.filterInfo.pGraph && pin->pConnectedTo )
384  {
385  hr = IFilterGraph_Reconnect(This->filter.filterInfo.pGraph, This->pOutputPin);
386  if (SUCCEEDED(hr))
387  TRACE("Reconnection completed, with new media format..\n");
388  }
389  TRACE("Returning: %d\n", hr);
390  return hr;
391 }
HRESULT qcap_driver_set_format(Capture *, AM_MEDIA_TYPE *) DECLSPEC_HIDDEN
Definition: v4l.c:934
HRESULT hr
Definition: shlfolder.c:183
Definition: regsvr.c:103
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *pmt)
Definition: enummedia.c:38
#define TRACE(s)
Definition: solgame.cpp:4
if(!(yy_init))
Definition: macro.lex.yy.c:714
LONG HRESULT
Definition: typedefs.h:79
#define VFW_E_INVALIDMEDIATYPE
Definition: vfwmsgs.h:39
static VfwCapture * impl_from_IAMStreamConfig(IAMStreamConfig *iface)
Definition: vfwcapture.c:84
#define VFW_E_NOT_STOPPED
Definition: vfwmsgs.h:75
#define E_POINTER
Definition: winerror.h:2365
#define SUCCEEDED(hr)
Definition: intsafe.h:49

◆ AMVideoProcAmp_AddRef()

static ULONG WINAPI AMVideoProcAmp_AddRef ( IAMVideoProcAmp iface)
static

Definition at line 438 of file vfwcapture.c.

439 {
441 
442  return IUnknown_AddRef(This->outer_unk);
443 }
static VfwCapture * impl_from_IAMVideoProcAmp(IAMVideoProcAmp *iface)
Definition: vfwcapture.c:89

◆ AMVideoProcAmp_Get()

static HRESULT WINAPI AMVideoProcAmp_Get ( IAMVideoProcAmp iface,
LONG  Property,
LONG lValue,
LONG Flags 
)
static

Definition at line 472 of file vfwcapture.c.

474 {
476 
477  return qcap_driver_get_prop(This->driver_info, Property, lValue, Flags);
478 }
static VfwCapture * impl_from_IAMVideoProcAmp(IAMVideoProcAmp *iface)
Definition: vfwcapture.c:89
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
HRESULT qcap_driver_get_prop(Capture *, VideoProcAmpProperty, LONG *, LONG *) DECLSPEC_HIDDEN
Definition: v4l.c:951

◆ AMVideoProcAmp_GetRange()

static HRESULT WINAPI AMVideoProcAmp_GetRange ( IAMVideoProcAmp iface,
LONG  Property,
LONG pMin,
LONG pMax,
LONG pSteppingDelta,
LONG pDefault,
LONG pCapsFlags 
)
static

Definition at line 453 of file vfwcapture.c.

455 {
457 
458  return qcap_driver_get_prop_range( This->driver_info, Property, pMin, pMax,
459  pSteppingDelta, pDefault, pCapsFlags );
460 }
static VfwCapture * impl_from_IAMVideoProcAmp(IAMVideoProcAmp *iface)
Definition: vfwcapture.c:89
HRESULT qcap_driver_get_prop_range(Capture *, VideoProcAmpProperty, LONG *, LONG *, LONG *, LONG *, LONG *) DECLSPEC_HIDDEN
Definition: v4l.c:944

◆ AMVideoProcAmp_QueryInterface()

static HRESULT WINAPI AMVideoProcAmp_QueryInterface ( IAMVideoProcAmp iface,
REFIID  riid,
void **  ret_iface 
)
static

Definition at line 430 of file vfwcapture.c.

432 {
434 
435  return IUnknown_QueryInterface(This->outer_unk, riid, ret_iface);
436 }
static VfwCapture * impl_from_IAMVideoProcAmp(IAMVideoProcAmp *iface)
Definition: vfwcapture.c:89
REFIID riid
Definition: precomp.h:44

◆ AMVideoProcAmp_Release()

static ULONG WINAPI AMVideoProcAmp_Release ( IAMVideoProcAmp iface)
static

Definition at line 445 of file vfwcapture.c.

446 {
448 
449  return IUnknown_Release(This->outer_unk);
450 }
static VfwCapture * impl_from_IAMVideoProcAmp(IAMVideoProcAmp *iface)
Definition: vfwcapture.c:89

◆ AMVideoProcAmp_Set()

static HRESULT WINAPI AMVideoProcAmp_Set ( IAMVideoProcAmp iface,
LONG  Property,
LONG  lValue,
LONG  Flags 
)
static

Definition at line 463 of file vfwcapture.c.

465 {
467 
468  return qcap_driver_set_prop(This->driver_info, Property, lValue, Flags);
469 }
static VfwCapture * impl_from_IAMVideoProcAmp(IAMVideoProcAmp *iface)
Definition: vfwcapture.c:89
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
HRESULT qcap_driver_set_prop(Capture *, VideoProcAmpProperty, LONG, LONG) DECLSPEC_HIDDEN
Definition: v4l.c:957

◆ impl_from_BaseFilter()

static VfwCapture* impl_from_BaseFilter ( BaseFilter iface)
inlinestatic

Definition at line 74 of file vfwcapture.c.

75 {
76  return CONTAINING_RECORD(iface, VfwCapture, filter);
77 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005

Referenced by VfwCapture_GetPin().

◆ impl_from_BasePin()

static VfwPinImpl* impl_from_BasePin ( BasePin pin)
inlinestatic

Definition at line 663 of file vfwcapture.c.

664 {
665  return CONTAINING_RECORD(pin, VfwPinImpl, pin.pin);
666 }
Definition: regsvr.c:103
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by VfwPin_GetMediaType().

◆ impl_from_IAMStreamConfig()

static VfwCapture* impl_from_IAMStreamConfig ( IAMStreamConfig *  iface)
inlinestatic

Definition at line 84 of file vfwcapture.c.

85 {
86  return CONTAINING_RECORD(iface, VfwCapture, IAMStreamConfig_iface);
87 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by AMStreamConfig_AddRef(), AMStreamConfig_GetFormat(), AMStreamConfig_QueryInterface(), AMStreamConfig_Release(), and AMStreamConfig_SetFormat().

◆ impl_from_IAMVideoProcAmp()

static VfwCapture* impl_from_IAMVideoProcAmp ( IAMVideoProcAmp iface)
inlinestatic

Definition at line 89 of file vfwcapture.c.

90 {
91  return CONTAINING_RECORD(iface, VfwCapture, IAMVideoProcAmp_iface);
92 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by AMVideoProcAmp_AddRef(), AMVideoProcAmp_Get(), AMVideoProcAmp_GetRange(), AMVideoProcAmp_QueryInterface(), AMVideoProcAmp_Release(), and AMVideoProcAmp_Set().

◆ impl_from_IBaseFilter()

static VfwCapture* impl_from_IBaseFilter ( IBaseFilter iface)
inlinestatic

Definition at line 79 of file vfwcapture.c.

80 {
81  return CONTAINING_RECORD(iface, VfwCapture, filter.IBaseFilter_iface);
82 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005

Referenced by VfwCapture_AddRef(), VfwCapture_Pause(), VfwCapture_QueryInterface(), VfwCapture_Release(), VfwCapture_Run(), and VfwCapture_Stop().

◆ impl_from_IKsPropertySet()

static VfwPinImpl* impl_from_IKsPropertySet ( IKsPropertySet iface)
inlinestatic

Definition at line 585 of file vfwcapture.c.

586 {
587  return CONTAINING_RECORD(iface, VfwPinImpl, IKsPropertySet_iface);
588 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by KSP_AddRef(), KSP_QueryInterface(), and KSP_Release().

◆ impl_from_IPersistPropertyBag()

static VfwCapture* impl_from_IPersistPropertyBag ( IPersistPropertyBag iface)
inlinestatic

Definition at line 94 of file vfwcapture.c.

95 {
96  return CONTAINING_RECORD(iface, VfwCapture, IPersistPropertyBag_iface);
97 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by PPB_AddRef(), PPB_GetClassID(), PPB_InitNew(), PPB_Load(), PPB_QueryInterface(), PPB_Release(), and PPB_Save().

◆ impl_from_IPin()

static VfwPinImpl* impl_from_IPin ( IPin iface)
inlinestatic

Definition at line 746 of file vfwcapture.c.

747 {
748  return CONTAINING_RECORD(iface, VfwPinImpl, pin.pin.IPin_iface);
749 }
Definition: regsvr.c:103
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by VfwPin_EnumMediaTypes(), VfwPin_QueryInterface(), and VfwPin_Release().

◆ impl_from_IUnknown()

static VfwCapture* impl_from_IUnknown ( IUnknown iface)
inlinestatic

Definition at line 69 of file vfwcapture.c.

70 {
71  return CONTAINING_RECORD(iface, VfwCapture, IUnknown_inner);
72 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by unknown_inner_AddRef(), unknown_inner_QueryInterface(), and unknown_inner_Release().

◆ KSP_AddRef()

static ULONG WINAPI KSP_AddRef ( IKsPropertySet iface)
static

Definition at line 597 of file vfwcapture.c.

598 {
600 
601  return IPin_AddRef(&This->pin.pin.IPin_iface);
602 }
static VfwPinImpl * impl_from_IKsPropertySet(IKsPropertySet *iface)
Definition: vfwcapture.c:585

◆ KSP_Get()

static HRESULT WINAPI KSP_Get ( IKsPropertySet iface,
REFGUID  guidPropSet,
DWORD  dwPropID,
LPVOID  pInstanceData,
DWORD  cbInstanceData,
LPVOID  pPropData,
DWORD  cbPropData,
DWORD pcbReturned 
)
static

Definition at line 621 of file vfwcapture.c.

624 {
625  LPGUID pGuid;
626 
627  TRACE("()\n");
628 
629  if (!IsEqualIID(guidPropSet, &AMPROPSETID_Pin))
630  return E_PROP_SET_UNSUPPORTED;
631  if (pPropData == NULL && pcbReturned == NULL)
632  return E_POINTER;
633  if (pcbReturned)
634  *pcbReturned = sizeof(GUID);
635  if (pPropData == NULL)
636  return S_OK;
637  if (cbPropData < sizeof(GUID))
638  return E_UNEXPECTED;
639  pGuid = pPropData;
640  *pGuid = PIN_CATEGORY_CAPTURE;
641  FIXME("() Not adding a pin with PIN_CATEGORY_PREVIEW\n");
642  return S_OK;
643 }
#define E_PROP_SET_UNSUPPORTED
Definition: vfwmsgs.h:176
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
struct _GUID GUID
#define S_OK
Definition: intsafe.h:51
#define E_UNEXPECTED
Definition: winerror.h:2456
#define E_POINTER
Definition: winerror.h:2365
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ KSP_QueryInterface()

static HRESULT WINAPI KSP_QueryInterface ( IKsPropertySet iface,
REFIID  riid,
void **  ret_iface 
)
static

Definition at line 590 of file vfwcapture.c.

591 {
593 
594  return IPin_QueryInterface(&This->pin.pin.IPin_iface, riid, ret_iface);
595 }
REFIID riid
Definition: precomp.h:44
static VfwPinImpl * impl_from_IKsPropertySet(IKsPropertySet *iface)
Definition: vfwcapture.c:585

◆ KSP_QuerySupported()

static HRESULT WINAPI KSP_QuerySupported ( IKsPropertySet iface,
REFGUID  guidPropSet,
DWORD  dwPropID,
DWORD pTypeSupport 
)
static

Definition at line 646 of file vfwcapture.c.

648 {
649  FIXME("%p: stub\n", iface);
650  return E_NOTIMPL;
651 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ KSP_Release()

static ULONG WINAPI KSP_Release ( IKsPropertySet iface)
static

Definition at line 604 of file vfwcapture.c.

605 {
607 
608  return IPin_Release(&This->pin.pin.IPin_iface);
609 }
static VfwPinImpl * impl_from_IKsPropertySet(IKsPropertySet *iface)
Definition: vfwcapture.c:585

◆ KSP_Set()

static HRESULT WINAPI KSP_Set ( IKsPropertySet iface,
REFGUID  guidPropSet,
DWORD  dwPropID,
LPVOID  pInstanceData,
DWORD  cbInstanceData,
LPVOID  pPropData,
DWORD  cbPropData 
)
static

Definition at line 612 of file vfwcapture.c.

615 {
616  FIXME("%p: stub\n", iface);
617  return E_NOTIMPL;
618 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ PPB_AddRef()

static ULONG WINAPI PPB_AddRef ( IPersistPropertyBag iface)
static

Definition at line 497 of file vfwcapture.c.

498 {
500 
501  return IUnknown_AddRef(This->outer_unk);
502 }
static VfwCapture * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: vfwcapture.c:94

◆ PPB_GetClassID()

static HRESULT WINAPI PPB_GetClassID ( IPersistPropertyBag iface,
CLSID pClassID 
)
static

Definition at line 512 of file vfwcapture.c.

513 {
515 
516  FIXME("%p - stub\n", This);
517 
518  return E_NOTIMPL;
519 }
#define FIXME(fmt,...)
Definition: debug.h:111
static VfwCapture * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: vfwcapture.c:94
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ PPB_InitNew()

static HRESULT WINAPI PPB_InitNew ( IPersistPropertyBag iface)
static

Definition at line 521 of file vfwcapture.c.

522 {
524 
525  FIXME("%p - stub\n", This);
526 
527  return E_NOTIMPL;
528 }
#define FIXME(fmt,...)
Definition: debug.h:111
static VfwCapture * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: vfwcapture.c:94
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ PPB_Load()

static HRESULT WINAPI PPB_Load ( IPersistPropertyBag iface,
IPropertyBag pPropBag,
IErrorLog pErrorLog 
)
static

Definition at line 531 of file vfwcapture.c.

533 {
535  HRESULT hr;
536  VARIANT var;
537  const OLECHAR VFWIndex[] = {'V','F','W','I','n','d','e','x',0};
538 
539  TRACE("%p/%p-> (%p, %p)\n", iface, This, pPropBag, pErrorLog);
540 
541  V_VT(&var) = VT_I4;
542  hr = IPropertyBag_Read(pPropBag, VFWIndex, &var, pErrorLog);
543 
544  if (SUCCEEDED(hr))
545  {
546  VfwPinImpl *pin;
547 
548  This->driver_info = qcap_driver_init( This->pOutputPin,
549  var.__VARIANT_NAME_1.__VARIANT_NAME_2.__VARIANT_NAME_3.ulVal );
550  if (This->driver_info)
551  {
552  pin = (VfwPinImpl *)This->pOutputPin;
553  pin->parent = This;
554  This->init = TRUE;
555  hr = S_OK;
556  }
557  else
558  hr = E_FAIL;
559  }
560 
561  return hr;
562 }
const char * var
Definition: shader.c:5666
WCHAR OLECHAR
Definition: compat.h:2040
Capture * qcap_driver_init(IPin *, USHORT) DECLSPEC_HIDDEN
Definition: v4l.c:916
Definition: compat.h:2046
HRESULT hr
Definition: shlfolder.c:183
#define TRUE
Definition: types.h:120
#define E_FAIL
Definition: ddrawi.h:102
Definition: regsvr.c:103
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static VfwCapture * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: vfwcapture.c:94
#define V_VT(A)
Definition: oleauto.h:211
#define S_OK
Definition: intsafe.h:51
#define SUCCEEDED(hr)
Definition: intsafe.h:49

◆ PPB_QueryInterface()

static HRESULT WINAPI PPB_QueryInterface ( IPersistPropertyBag iface,
REFIID  riid,
void **  ret_iface 
)
static

Definition at line 490 of file vfwcapture.c.

491 {
493 
494  return IUnknown_QueryInterface(This->outer_unk, riid, ret_iface);
495 }
REFIID riid
Definition: precomp.h:44
static VfwCapture * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: vfwcapture.c:94

◆ PPB_Release()

static ULONG WINAPI PPB_Release ( IPersistPropertyBag iface)
static

Definition at line 504 of file vfwcapture.c.

505 {
507 
508  return IUnknown_Release(This->outer_unk);
509 }
static VfwCapture * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: vfwcapture.c:94

◆ PPB_Save()

static HRESULT WINAPI PPB_Save ( IPersistPropertyBag iface,
IPropertyBag pPropBag,
BOOL  fClearDirty,
BOOL  fSaveAllProperties 
)
static

Definition at line 565 of file vfwcapture.c.

567 {
569  FIXME("%p - stub\n", This);
570  return E_NOTIMPL;
571 }
#define FIXME(fmt,...)
Definition: debug.h:111
static VfwCapture * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: vfwcapture.c:94
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ QCAP_createVFWCaptureFilter()

IUnknown* WINAPI QCAP_createVFWCaptureFilter ( IUnknown pUnkOuter,
HRESULT phr 
)

Definition at line 216 of file vfwcapture.c.

217 {
218  VfwCapture *pVfwCapture;
219  HRESULT hr;
220 
221  TRACE("%p - %p\n", pUnkOuter, phr);
222 
223  *phr = E_OUTOFMEMORY;
224  pVfwCapture = CoTaskMemAlloc( sizeof(VfwCapture) );
225  if (!pVfwCapture)
226  return NULL;
227 
228  BaseFilter_Init(&pVfwCapture->filter, &VfwCapture_Vtbl, &CLSID_VfwCapture, (DWORD_PTR)(__FILE__ ": VfwCapture.csFilter"), &BaseFuncTable);
229 
230  pVfwCapture->IUnknown_inner.lpVtbl = &unknown_inner_vtbl;
231  pVfwCapture->IAMStreamConfig_iface.lpVtbl = &IAMStreamConfig_VTable;
232  pVfwCapture->IAMVideoProcAmp_iface.lpVtbl = &IAMVideoProcAmp_VTable;
234  pVfwCapture->init = FALSE;
235 
236  if (pUnkOuter)
237  pVfwCapture->outer_unk = pUnkOuter;
238  else
239  pVfwCapture->outer_unk = &pVfwCapture->IUnknown_inner;
240 
242  &pVfwCapture->filter.csFilter, &pVfwCapture->pOutputPin);
243  if (FAILED(hr))
244  {
245  CoTaskMemFree(pVfwCapture);
246  return NULL;
247  }
248  TRACE("-- created at %p\n", pVfwCapture);
249 
251  *phr = S_OK;
252  return &pVfwCapture->IUnknown_inner;
253 }
static HRESULT VfwPin_Construct(IBaseFilter *, LPCRITICAL_SECTION, IPin **)
Definition: vfwcapture.c:721
static const IAMStreamConfigVtbl IAMStreamConfig_VTable
Definition: vfwcapture.c:48
IAMVideoProcAmp IAMVideoProcAmp_iface
Definition: vfwcapture.c:60
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
static const IPersistPropertyBagVtbl IPersistPropertyBag_VTable
Definition: vfwcapture.c:50
IPin * pOutputPin
Definition: vfwcapture.c:66
HRESULT hr
Definition: shlfolder.c:183
#define TRUE
Definition: types.h:120
IUnknown * outer_unk
Definition: vfwcapture.c:62
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
static const IAMVideoProcAmpVtbl IAMVideoProcAmp_VTable
Definition: vfwcapture.c:49
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
BaseFilter filter
Definition: vfwcapture.c:58
IPersistPropertyBag IPersistPropertyBag_iface
Definition: vfwcapture.c:61
IUnknown IUnknown_inner
Definition: vfwcapture.c:57
IBaseFilter IBaseFilter_iface
Definition: strmbase.h:163
CRITICAL_SECTION csFilter
Definition: strmbase.h:165
uint32_t DWORD_PTR
Definition: typedefs.h:65
static const IUnknownVtbl unknown_inner_vtbl
Definition: vfwcapture.c:188
#define S_OK
Definition: intsafe.h:51
DWORD ObjectRefCount(BOOL increment)
Definition: qcap_main.c:193
HRESULT WINAPI BaseFilter_Init(BaseFilter *This, const IBaseFilterVtbl *Vtbl, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseFilterFuncTable *pBaseFuncsTable)
Definition: filter.c:196
BOOL init
Definition: vfwcapture.c:63
IAMStreamConfig IAMStreamConfig_iface
Definition: vfwcapture.c:59
static const BaseFilterFuncTable BaseFuncTable
Definition: vfwcapture.c:211
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
static const IBaseFilterVtbl VfwCapture_Vtbl
Definition: vfwcapture.c:47

◆ unknown_inner_AddRef()

static ULONG WINAPI unknown_inner_AddRef ( IUnknown iface)
static

Definition at line 144 of file vfwcapture.c.

145 {
147  ULONG ref = BaseFilterImpl_AddRef(&This->filter.IBaseFilter_iface);
148 
149  TRACE("(%p) ref=%d\n", This, ref);
150 
151  return ref;
152 }
Definition: send.c:48
GLenum GLint ref
Definition: glext.h:6028
static VfwCapture * impl_from_IUnknown(IUnknown *iface)
Definition: vfwcapture.c:69
#define TRACE(s)
Definition: solgame.cpp:4
ULONG WINAPI BaseFilterImpl_AddRef(IBaseFilter *iface)
Definition: filter.c:54
unsigned int ULONG
Definition: retypes.h:1

◆ unknown_inner_QueryInterface()

static HRESULT WINAPI unknown_inner_QueryInterface ( IUnknown iface,
REFIID  riid,
void **  ret_iface 
)
static

Definition at line 109 of file vfwcapture.c.

110 {
112 
113  TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ret_iface);
114 
115  *ret_iface = NULL;
116 
118  *ret_iface = &This->IUnknown_inner;
119  else if (IsEqualIID(riid, &IID_IPersist) || IsEqualIID(riid, &IID_IMediaFilter) ||
121  *ret_iface = &This->filter.IBaseFilter_iface;
123  *ret_iface = &This->IPersistPropertyBag_iface;
124  else if (IsEqualIID(riid, &IID_IAMFilterMiscFlags))
125  FIXME("IAMFilterMiscFlags not supported yet!\n");
127  FIXME("ISpecifyPropertyPages not supported yet!\n");
128  else if (IsEqualIID(riid, &IID_IAMVfwCaptureDialogs))
129  FIXME("IAMVfwCaptureDialogs not supported yet!\n");
130  else if (IsEqualIID(riid, &IID_IAMStreamConfig))
131  *ret_iface = &This->IAMStreamConfig_iface;
132  else if (IsEqualIID(riid, &IID_IAMVideoProcAmp))
133  *ret_iface = &This->IAMVideoProcAmp_iface;
134  else
135  WARN("(%p, %s, %p): not found\n", This, debugstr_guid(riid), ret_iface);
136 
137  if (!*ret_iface)
138  return E_NOINTERFACE;
139 
140  IUnknown_AddRef((IUnknown*)*ret_iface);
141  return S_OK;
142 }
const GUID IID_IBaseFilter
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
const GUID IID_IPersist
Definition: proxy.cpp:14
#define WARN(fmt,...)
Definition: debug.h:112
const GUID IID_ISpecifyPropertyPages
Definition: proxy.cpp:12
const GUID IID_IPersistPropertyBag
Definition: proxy.cpp:11
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
static VfwCapture * impl_from_IUnknown(IUnknown *iface)
Definition: vfwcapture.c:69
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:51
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ unknown_inner_Release()

static ULONG WINAPI unknown_inner_Release ( IUnknown iface)
static

Definition at line 154 of file vfwcapture.c.

155 {
157  ULONG ref = InterlockedDecrement(&This->filter.refCount);
158 
159  TRACE("(%p) ref=%d\n", This, ref);
160 
161  if (!ref)
162  {
163  IPin *conn = NULL;
164 
165  TRACE("destroying everything\n");
166  if (This->init)
167  {
168  if (This->filter.state != State_Stopped)
169  qcap_driver_stop(This->driver_info, &This->filter.state);
170  qcap_driver_destroy(This->driver_info);
171  }
172  IPin_ConnectedTo(This->pOutputPin, &conn);
173  if (conn)
174  {
175  IPin_Disconnect(conn);
176  IPin_Disconnect(This->pOutputPin);
177  IPin_Release(conn);
178  }
179  IPin_Release(This->pOutputPin);
180  BaseFilter_Destroy(&This->filter);
183  }
184 
185  return ref;
186 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
Definition: send.c:48
#define FALSE
Definition: types.h:117
GLenum GLint ref
Definition: glext.h:6028
HRESULT qcap_driver_destroy(Capture *) DECLSPEC_HIDDEN
Definition: v4l.c:929
smooth NULL
Definition: ftsmooth.c:416
static VfwCapture * impl_from_IUnknown(IUnknown *iface)
Definition: vfwcapture.c:69
HRESULT WINAPI BaseFilter_Destroy(BaseFilter *This)
Definition: filter.c:214
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT qcap_driver_stop(Capture *, FILTER_STATE *) DECLSPEC_HIDDEN
Definition: v4l.c:973
#define InterlockedDecrement
Definition: armddk.h:52
DWORD ObjectRefCount(BOOL increment)
Definition: qcap_main.c:193
Definition: axcore.idl:91
unsigned int ULONG
Definition: retypes.h:1

◆ VfwCapture_AddRef()

static ULONG WINAPI VfwCapture_AddRef ( IBaseFilter iface)
static

Definition at line 262 of file vfwcapture.c.

263 {
265 
266  return IUnknown_AddRef(This->outer_unk);
267 }
static VfwCapture * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: vfwcapture.c:79

◆ VfwCapture_FindPin()

static HRESULT WINAPI VfwCapture_FindPin ( IBaseFilter iface,
LPCWSTR  Id,
IPin **  ppPin 
)
static

IBaseFilter methods

Definition at line 302 of file vfwcapture.c.

303 {
304  FIXME("(%s, %p) - stub\n", debugstr_w(Id), ppPin);
305  return E_NOTIMPL;
306 }
DWORD Id
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ VfwCapture_GetPin()

static IPin* WINAPI VfwCapture_GetPin ( BaseFilter iface,
int  pos 
)
static

Definition at line 195 of file vfwcapture.c.

196 {
198 
199  if (pos >= 1 || pos < 0)
200  return NULL;
201 
202  IPin_AddRef(This->pOutputPin);
203  return This->pOutputPin;
204 }
smooth NULL
Definition: ftsmooth.c:416
static VfwCapture * impl_from_BaseFilter(BaseFilter *iface)
Definition: vfwcapture.c:74

◆ VfwCapture_GetPinCount()

static LONG WINAPI VfwCapture_GetPinCount ( BaseFilter iface)
static

Definition at line 206 of file vfwcapture.c.

207 {
208  return 1;
209 }

◆ VfwCapture_Pause()

static HRESULT WINAPI VfwCapture_Pause ( IBaseFilter iface)
static

Definition at line 286 of file vfwcapture.c.

287 {
289 
290  TRACE("()\n");
291  return qcap_driver_pause(This->driver_info, &This->filter.state);
292 }
static VfwCapture * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: vfwcapture.c:79
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT qcap_driver_pause(Capture *, FILTER_STATE *) DECLSPEC_HIDDEN
Definition: v4l.c:968

◆ VfwCapture_QueryInterface()

static HRESULT WINAPI VfwCapture_QueryInterface ( IBaseFilter iface,
REFIID  riid,
void **  ret_iface 
)
static

Definition at line 255 of file vfwcapture.c.

256 {
258 
259  return IUnknown_QueryInterface(This->outer_unk, riid, ret_iface);
260 }
REFIID riid
Definition: precomp.h:44
static VfwCapture * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: vfwcapture.c:79

◆ VfwCapture_Release()

static ULONG WINAPI VfwCapture_Release ( IBaseFilter iface)
static

Definition at line 269 of file vfwcapture.c.

270 {
272 
273  return IUnknown_Release(This->outer_unk);
274 }
static VfwCapture * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: vfwcapture.c:79

◆ VfwCapture_Run()

static HRESULT WINAPI VfwCapture_Run ( IBaseFilter iface,
REFERENCE_TIME  tStart 
)
static

Definition at line 294 of file vfwcapture.c.

295 {
297  TRACE("(%s)\n", wine_dbgstr_longlong(tStart));
298  return qcap_driver_run(This->driver_info, &This->filter.state);
299 }
static VfwCapture * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: vfwcapture.c:79
#define TRACE(s)
Definition: solgame.cpp:4
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49
HRESULT qcap_driver_run(Capture *, FILTER_STATE *) DECLSPEC_HIDDEN
Definition: v4l.c:963

◆ VfwCapture_Stop()

static HRESULT WINAPI VfwCapture_Stop ( IBaseFilter iface)
static

IMediaFilter methods

Definition at line 278 of file vfwcapture.c.

279 {
281 
282  TRACE("()\n");
283  return qcap_driver_stop(This->driver_info, &This->filter.state);
284 }
static VfwCapture * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: vfwcapture.c:79
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT qcap_driver_stop(Capture *, FILTER_STATE *) DECLSPEC_HIDDEN
Definition: v4l.c:973

◆ VfwPin_Construct()

static HRESULT VfwPin_Construct ( IBaseFilter pBaseFilter,
LPCRITICAL_SECTION  pCritSec,
IPin **  ppPin 
)
static

Definition at line 721 of file vfwcapture.c.

723 {
724  static const WCHAR wszOutputPinName[] = { 'O','u','t','p','u','t',0 };
725  PIN_INFO piOutput;
726  HRESULT hr;
727 
728  *ppPin = NULL;
729 
730  piOutput.dir = PINDIR_OUTPUT;
731  piOutput.pFilter = pBaseFilter;
732  lstrcpyW(piOutput.achName, wszOutputPinName);
733 
734  hr = BaseOutputPin_Construct(&VfwPin_Vtbl, sizeof(VfwPinImpl), &piOutput, &output_BaseOutputFuncTable, pCritSec, ppPin);
735 
736  if (SUCCEEDED(hr))
737  {
738  VfwPinImpl *pPinImpl = (VfwPinImpl*)*ppPin;
739  pPinImpl->IKsPropertySet_iface.lpVtbl = &IKsPropertySet_VTable;
741  }
742 
743  return hr;
744 }
static const IKsPropertySetVtbl IKsPropertySet_VTable
Definition: vfwcapture.c:653
IKsPropertySet IKsPropertySet_iface
Definition: vfwcapture.c:103
HRESULT hr
Definition: shlfolder.c:183
#define TRUE
Definition: types.h:120
static const BaseOutputPinFuncTable output_BaseOutputFuncTable
Definition: vfwcapture.c:708
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR wszOutputPinName[]
Definition: filesource.c:38
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
#define lstrcpyW
Definition: compat.h:497
DWORD ObjectRefCount(BOOL increment)
Definition: qcap_main.c:193
static const IPinVtbl VfwPin_Vtbl
Definition: vfwcapture.c:51
HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO *pPinInfo, const BaseOutputPinFuncTable *pBaseOutputFuncsTable, LPCRITICAL_SECTION pCritSec, IPin **ppPin)
Definition: pin.c:791
#define SUCCEEDED(hr)
Definition: intsafe.h:49

Referenced by QCAP_createVFWCaptureFilter().

◆ VfwPin_DecideBufferSize()

static HRESULT WINAPI VfwPin_DecideBufferSize ( BaseOutputPin iface,
IMemAllocator pAlloc,
ALLOCATOR_PROPERTIES ppropInputRequest 
)
static

Definition at line 692 of file vfwcapture.c.

693 {
694  ALLOCATOR_PROPERTIES actual;
695 
696  /* What we put here doesn't matter, the
697  driver function should override it then commit */
698  if (!ppropInputRequest->cBuffers)
699  ppropInputRequest->cBuffers = 3;
700  if (!ppropInputRequest->cbBuffer)
701  ppropInputRequest->cbBuffer = 230400;
702  if (!ppropInputRequest->cbAlign)
703  ppropInputRequest->cbAlign = 1;
704 
705  return IMemAllocator_SetProperties(pAlloc, ppropInputRequest, &actual);
706 }

◆ VfwPin_EnumMediaTypes()

static HRESULT WINAPI VfwPin_EnumMediaTypes ( IPin iface,
IEnumMediaTypes **  ppEnum 
)
static

Definition at line 792 of file vfwcapture.c.

793 {
794  VfwPinImpl *This = impl_from_IPin(iface);
795  AM_MEDIA_TYPE *pmt;
796  HRESULT hr;
797 
798  hr = qcap_driver_get_format(This->parent->driver_info, &pmt);
799  if (SUCCEEDED(hr)) {
800  hr = BasePinImpl_EnumMediaTypes(iface, ppEnum);
801  DeleteMediaType(pmt);
802  }
803  TRACE("%p -- %x\n", This, hr);
804  return hr;
805 }
HRESULT qcap_driver_get_format(const Capture *, AM_MEDIA_TYPE **) DECLSPEC_HIDDEN
Definition: v4l.c:939
HRESULT hr
Definition: shlfolder.c:183
static void DeleteMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: filtergraph.c:741
static VfwPinImpl * impl_from_IPin(IPin *iface)
Definition: vfwcapture.c:746
HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEnum)
Definition: pin.c:318
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
#define SUCCEEDED(hr)
Definition: intsafe.h:49

◆ VfwPin_GetMediaType()

static HRESULT WINAPI VfwPin_GetMediaType ( BasePin pin,
int  iPosition,
AM_MEDIA_TYPE pmt 
)
static

Definition at line 668 of file vfwcapture.c.

669 {
671  AM_MEDIA_TYPE *vfw_pmt;
672  HRESULT hr;
673 
674  if (iPosition < 0)
675  return E_INVALIDARG;
676  if (iPosition > 0)
677  return VFW_S_NO_MORE_ITEMS;
678 
679  hr = qcap_driver_get_format(This->parent->driver_info, &vfw_pmt);
680  if (SUCCEEDED(hr)) {
681  CopyMediaType(pmt, vfw_pmt);
682  DeleteMediaType(vfw_pmt);
683  }
684  return hr;
685 }
#define VFW_S_NO_MORE_ITEMS
Definition: vfwmsgs.h:19
HRESULT qcap_driver_get_format(const Capture *, AM_MEDIA_TYPE **) DECLSPEC_HIDDEN
Definition: v4l.c:939
HRESULT hr
Definition: shlfolder.c:183
Definition: regsvr.c:103
static void DeleteMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: filtergraph.c:741
#define E_INVALIDARG
Definition: ddrawi.h:101
static VfwPinImpl * impl_from_BasePin(BasePin *pin)
Definition: vfwcapture.c:663
LONG HRESULT
Definition: typedefs.h:79
static HRESULT CopyMediaType(AM_MEDIA_TYPE *pDest, const AM_MEDIA_TYPE *pSrc)
Definition: filtergraph.c:706
#define SUCCEEDED(hr)
Definition: intsafe.h:49

◆ VfwPin_GetMediaTypeVersion()

static LONG WINAPI VfwPin_GetMediaTypeVersion ( BasePin iface)
static

Definition at line 687 of file vfwcapture.c.

688 {
689  return 1;
690 }

◆ VfwPin_QueryInterface()

static HRESULT WINAPI VfwPin_QueryInterface ( IPin iface,
REFIID  riid,
LPVOID ppv 
)
static

Definition at line 751 of file vfwcapture.c.

752 {
753  VfwPinImpl *This = impl_from_IPin(iface);
754 
755  TRACE("%s %p\n", debugstr_guid(riid), ppv);
756 
757  *ppv = NULL;
759  *ppv = This;
760  else if (IsEqualIID(riid, &IID_IKsPropertySet))
761  *ppv = &This->IKsPropertySet_iface;
762  else if (IsEqualIID(riid, &IID_IAMStreamConfig))
763  return IUnknown_QueryInterface((IUnknown *)This->parent, riid, ppv);
764 
765  if (*ppv)
766  {
767  IUnknown_AddRef((IUnknown *)(*ppv));
768  return S_OK;
769  }
770 
771  FIXME("No interface for %s!\n", debugstr_guid(riid));
772  return E_NOINTERFACE;
773 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static VfwPinImpl * impl_from_IPin(IPin *iface)
Definition: vfwcapture.c:746
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IKsPropertySet
Definition: controlnode.cpp:13
#define S_OK
Definition: intsafe.h:51
const GUID IID_IPin
Definition: pincontrol.cpp:15
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ VfwPin_QueryInternalConnections()

static HRESULT WINAPI VfwPin_QueryInternalConnections ( IPin iface,
IPin **  apPin,
ULONG cPin 
)
static

Definition at line 808 of file vfwcapture.c.

809 {
810  TRACE("(%p)->(%p, %p)\n", iface, apPin, cPin);
811  return E_NOTIMPL;
812 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ VfwPin_Release()

static ULONG WINAPI VfwPin_Release ( IPin iface)
static

Definition at line 776 of file vfwcapture.c.

777 {
778  VfwPinImpl *This = impl_from_IPin(iface);
779  ULONG refCount = InterlockedDecrement(&This->pin.pin.refCount);
780 
781  TRACE("() -> new refcount: %u\n", refCount);
782 
783  if (!refCount)
784  {
787  }
788  return refCount;
789 }
HRESULT WINAPI BaseOutputPin_Destroy(BaseOutputPin *This)
Definition: pin.c:821
static VfwPinImpl * impl_from_IPin(IPin *iface)
Definition: vfwcapture.c:746
#define FALSE
Definition: types.h:117
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
DWORD ObjectRefCount(BOOL increment)
Definition: qcap_main.c:193
unsigned int ULONG
Definition: retypes.h:1

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( qcap  )

Variable Documentation

◆ BaseFuncTable

const BaseFilterFuncTable BaseFuncTable
static
Initial value:
= {
}
static LONG WINAPI VfwCapture_GetPinCount(BaseFilter *iface)
Definition: vfwcapture.c:206
static IPin *WINAPI VfwCapture_GetPin(BaseFilter *iface, int pos)
Definition: vfwcapture.c:195

Definition at line 211 of file vfwcapture.c.

Referenced by QCAP_createVFWCaptureFilter().

◆ IAMStreamConfig_VTable

static const IAMStreamConfigVtbl IAMStreamConfig_VTable
static
Initial value:
=
{
}
static ULONG WINAPI AMStreamConfig_AddRef(IAMStreamConfig *iface)
Definition: vfwcapture.c:336
static HRESULT WINAPI AMStreamConfig_GetNumberOfCapabilities(IAMStreamConfig *iface, int *piCount, int *piSize)
Definition: vfwcapture.c:403
static HRESULT WINAPI AMStreamConfig_QueryInterface(IAMStreamConfig *iface, REFIID riid, void **ret_iface)
Definition: vfwcapture.c:328
static HRESULT WINAPI AMStreamConfig_GetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE **pmt)
Definition: vfwcapture.c:394
static HRESULT WINAPI AMStreamConfig_GetStreamCaps(IAMStreamConfig *iface, int iIndex, AM_MEDIA_TYPE **pmt, BYTE *pSCC)
Definition: vfwcapture.c:412
static HRESULT WINAPI AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt)
Definition: vfwcapture.c:351
static ULONG WINAPI AMStreamConfig_Release(IAMStreamConfig *iface)
Definition: vfwcapture.c:343

Definition at line 48 of file vfwcapture.c.

Referenced by QCAP_createVFWCaptureFilter().

◆ IAMVideoProcAmp_VTable

static const IAMVideoProcAmpVtbl IAMVideoProcAmp_VTable
static
Initial value:
=
{
}
static HRESULT WINAPI AMVideoProcAmp_GetRange(IAMVideoProcAmp *iface, LONG Property, LONG *pMin, LONG *pMax, LONG *pSteppingDelta, LONG *pDefault, LONG *pCapsFlags)
Definition: vfwcapture.c:453
static ULONG WINAPI AMVideoProcAmp_AddRef(IAMVideoProcAmp *iface)
Definition: vfwcapture.c:438
static ULONG WINAPI AMVideoProcAmp_Release(IAMVideoProcAmp *iface)
Definition: vfwcapture.c:445
static HRESULT WINAPI AMVideoProcAmp_QueryInterface(IAMVideoProcAmp *iface, REFIID riid, void **ret_iface)
Definition: vfwcapture.c:430
static HRESULT WINAPI AMVideoProcAmp_Set(IAMVideoProcAmp *iface, LONG Property, LONG lValue, LONG Flags)
Definition: vfwcapture.c:463
static HRESULT WINAPI AMVideoProcAmp_Get(IAMVideoProcAmp *iface, LONG Property, LONG *lValue, LONG *Flags)
Definition: vfwcapture.c:472

Definition at line 49 of file vfwcapture.c.

Referenced by QCAP_createVFWCaptureFilter().

◆ IKsPropertySet_VTable

const IKsPropertySetVtbl IKsPropertySet_VTable
static
Initial value:
=
{
}
static ULONG WINAPI KSP_Release(IKsPropertySet *iface)
Definition: vfwcapture.c:604
static HRESULT WINAPI KSP_QuerySupported(IKsPropertySet *iface, REFGUID guidPropSet, DWORD dwPropID, DWORD *pTypeSupport)
Definition: vfwcapture.c:646
static HRESULT WINAPI KSP_Set(IKsPropertySet *iface, REFGUID guidPropSet, DWORD dwPropID, LPVOID pInstanceData, DWORD cbInstanceData, LPVOID pPropData, DWORD cbPropData)
Definition: vfwcapture.c:612
static HRESULT WINAPI KSP_Get(IKsPropertySet *iface, REFGUID guidPropSet, DWORD dwPropID, LPVOID pInstanceData, DWORD cbInstanceData, LPVOID pPropData, DWORD cbPropData, DWORD *pcbReturned)
Definition: vfwcapture.c:621
static HRESULT WINAPI KSP_QueryInterface(IKsPropertySet *iface, REFIID riid, void **ret_iface)
Definition: vfwcapture.c:590
static ULONG WINAPI KSP_AddRef(IKsPropertySet *iface)
Definition: vfwcapture.c:597

Definition at line 653 of file vfwcapture.c.

Referenced by VfwPin_Construct().

◆ IPersistPropertyBag_VTable

static const IPersistPropertyBagVtbl IPersistPropertyBag_VTable
static
Initial value:
=
{
}
static HRESULT WINAPI PPB_InitNew(IPersistPropertyBag *iface)
Definition: vfwcapture.c:521
static HRESULT WINAPI PPB_QueryInterface(IPersistPropertyBag *iface, REFIID riid, void **ret_iface)
Definition: vfwcapture.c:490
static HRESULT WINAPI PPB_Save(IPersistPropertyBag *iface, IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties)
Definition: vfwcapture.c:565
static ULONG WINAPI PPB_Release(IPersistPropertyBag *iface)
Definition: vfwcapture.c:504
static HRESULT WINAPI PPB_Load(IPersistPropertyBag *iface, IPropertyBag *pPropBag, IErrorLog *pErrorLog)
Definition: vfwcapture.c:531
static ULONG WINAPI PPB_AddRef(IPersistPropertyBag *iface)
Definition: vfwcapture.c:497
static HRESULT WINAPI PPB_GetClassID(IPersistPropertyBag *iface, CLSID *pClassID)
Definition: vfwcapture.c:512

Definition at line 50 of file vfwcapture.c.

Referenced by QCAP_createVFWCaptureFilter().

◆ output_BaseOutputFuncTable

const BaseOutputPinFuncTable output_BaseOutputFuncTable
static
Initial value:
= {
{
},
}
static HRESULT WINAPI VfwPin_DecideBufferSize(BaseOutputPin *iface, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
Definition: vfwcapture.c:692
HRESULT WINAPI BaseOutputPinImpl_BreakConnect(BaseOutputPin *This)
Definition: pin.c:654
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc)
Definition: pin.c:683
static HRESULT WINAPI VfwPin_GetMediaType(BasePin *pin, int iPosition, AM_MEDIA_TYPE *pmt)
Definition: vfwcapture.c:668
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin *This, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:712
static LONG WINAPI VfwPin_GetMediaTypeVersion(BasePin *iface)
Definition: vfwcapture.c:687

Definition at line 708 of file vfwcapture.c.

Referenced by VfwPin_Construct().

◆ unknown_inner_vtbl

const IUnknownVtbl unknown_inner_vtbl
static
Initial value:
=
{
}
static ULONG WINAPI unknown_inner_Release(IUnknown *iface)
Definition: vfwcapture.c:154
static ULONG WINAPI unknown_inner_AddRef(IUnknown *iface)
Definition: vfwcapture.c:144
static HRESULT WINAPI unknown_inner_QueryInterface(IUnknown *iface, REFIID riid, void **ret_iface)
Definition: vfwcapture.c:109

Definition at line 188 of file vfwcapture.c.

Referenced by QCAP_createVFWCaptureFilter().

◆ VfwCapture_Vtbl

static const IBaseFilterVtbl VfwCapture_Vtbl
static
Initial value:
=
{
}
HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter *iface, IReferenceClock *pClock)
Definition: filter.c:101
static HRESULT WINAPI VfwCapture_Run(IBaseFilter *iface, REFERENCE_TIME tStart)
Definition: vfwcapture.c:294
HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter *iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
Definition: filter.c:87
static HRESULT WINAPI VfwCapture_Pause(IBaseFilter *iface)
Definition: vfwcapture.c:286
HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter *iface, CLSID *pClsid)
Definition: filter.c:77
static HRESULT WINAPI VfwCapture_Stop(IBaseFilter *iface)
Definition: vfwcapture.c:278
static HRESULT WINAPI VfwCapture_QueryInterface(IBaseFilter *iface, REFIID riid, void **ret_iface)
Definition: vfwcapture.c:255
HRESULT WINAPI BaseFilterImpl_QueryVendorInfo(IBaseFilter *iface, LPWSTR *pVendorInfo)
Definition: filter.c:178
static ULONG WINAPI VfwCapture_Release(IBaseFilter *iface)
Definition: vfwcapture.c:269
static HRESULT WINAPI VfwCapture_FindPin(IBaseFilter *iface, LPCWSTR Id, IPin **ppPin)
Definition: vfwcapture.c:302
HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter *iface, IEnumPins **ppEnum)
Definition: filter.c:135
HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter *iface, FILTER_INFO *pInfo)
Definition: filter.c:145
static ULONG WINAPI VfwCapture_AddRef(IBaseFilter *iface)
Definition: vfwcapture.c:262
HRESULT WINAPI BaseFilterImpl_GetSyncSource(IBaseFilter *iface, IReferenceClock **ppClock)
Definition: filter.c:119
HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter *iface, IFilterGraph *pGraph, LPCWSTR pName)
Definition: filter.c:159

Definition at line 47 of file vfwcapture.c.

Referenced by QCAP_createVFWCaptureFilter().

◆ VfwPin_Vtbl

static const IPinVtbl VfwPin_Vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI VfwPin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEnum)
Definition: vfwcapture.c:792
HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin *iface)
Definition: pin.c:527
HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin *iface)
Definition: pin.c:545
HRESULT WINAPI BasePinImpl_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:311
HRESULT WINAPI BasePinImpl_QueryDirection(IPin *iface, PIN_DIRECTION *pPinDir)
Definition: pin.c:285
HRESULT WINAPI BasePinImpl_ConnectedTo(IPin *iface, IPin **ppPin)
Definition: pin.c:222
HRESULT WINAPI BasePinImpl_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
Definition: pin.c:338
HRESULT WINAPI BaseOutputPinImpl_BeginFlush(IPin *iface)
Definition: pin.c:536
HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin *iface, PIN_INFO *pInfo)
Definition: pin.c:273
HRESULT WINAPI BasePinImpl_QueryId(IPin *iface, LPWSTR *Id)
Definition: pin.c:296
static ULONG WINAPI VfwPin_Release(IPin *iface)
Definition: vfwcapture.c:776
HRESULT WINAPI BaseOutputPinImpl_Connect(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:405
HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:490
static HRESULT WINAPI VfwPin_QueryInternalConnections(IPin *iface, IPin **apPin, ULONG *cPin)
Definition: vfwcapture.c:808
static HRESULT WINAPI VfwPin_QueryInterface(IPin *iface, REFIID riid, LPVOID *ppv)
Definition: vfwcapture.c:751
ULONG WINAPI BasePinImpl_AddRef(IPin *iface)
Definition: pin.c:187
HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *pmt)
Definition: pin.c:248
HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin *iface)
Definition: pin.c:497

Definition at line 51 of file vfwcapture.c.

Referenced by VfwPin_Construct().