ReactOS 0.4.17-dev-966-gf06eace
vfwcapture.c File Reference
#include "qcap_private.h"
#include "winternl.h"
Include dependency graph for vfwcapture.c:

Go to the source code of this file.

Classes

struct  vfw_capture
 

Macros

#define V4L_CALL(func, params)   WINE_UNIX_CALL( unix_ ## func, params )
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (quartz)
 
static struct vfw_capture * impl_from_strmbase_filter (struct strmbase_filter *iface)
 
static struct vfw_capture * impl_from_IAMStreamConfig (IAMStreamConfig *iface)
 
static struct vfw_capture * impl_from_IAMVideoControl (IAMVideoControl *iface)
 
static struct vfw_capture * impl_from_IAMVideoProcAmp (IAMVideoProcAmp *iface)
 
static struct vfw_capture * impl_from_IAMFilterMiscFlags (IAMFilterMiscFlags *iface)
 
static struct vfw_capture * impl_from_IPersistPropertyBag (IPersistPropertyBag *iface)
 
static struct strmbase_pin * vfw_capture_get_pin (struct strmbase_filter *iface, unsigned int index)
 
static void vfw_capture_destroy (struct strmbase_filter *iface)
 
static HRESULT vfw_capture_query_interface (struct strmbase_filter *iface, REFIID iid, void **out)
 
static unsigned int get_image_size (struct vfw_capture *filter)
 
static DWORD WINAPI stream_thread (void *arg)
 
static HRESULT vfw_capture_init_stream (struct strmbase_filter *iface)
 
static HRESULT vfw_capture_start_stream (struct strmbase_filter *iface, REFERENCE_TIME time)
 
static HRESULT vfw_capture_stop_stream (struct strmbase_filter *iface)
 
static HRESULT vfw_capture_cleanup_stream (struct strmbase_filter *iface)
 
static HRESULT vfw_capture_wait_state (struct strmbase_filter *iface, DWORD timeout)
 
static HRESULT WINAPI AMStreamConfig_QueryInterface (IAMStreamConfig *iface, REFIID iid, void **out)
 
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 **mt)
 
static HRESULT WINAPI AMStreamConfig_GetNumberOfCapabilities (IAMStreamConfig *iface, int *count, int *size)
 
static HRESULT WINAPI AMStreamConfig_GetStreamCaps (IAMStreamConfig *iface, int index, AM_MEDIA_TYPE **pmt, BYTE *vscc)
 
static HRESULT WINAPI AMVideoProcAmp_QueryInterface (IAMVideoProcAmp *iface, REFIID iid, void **out)
 
static ULONG WINAPI AMVideoProcAmp_AddRef (IAMVideoProcAmp *iface)
 
static ULONG WINAPI AMVideoProcAmp_Release (IAMVideoProcAmp *iface)
 
static HRESULT WINAPI AMVideoProcAmp_GetRange (IAMVideoProcAmp *iface, LONG property, LONG *min, LONG *max, LONG *step, LONG *default_value, LONG *flags)
 
static HRESULT WINAPI AMVideoProcAmp_Set (IAMVideoProcAmp *iface, LONG property, LONG value, LONG flags)
 
static HRESULT WINAPI AMVideoProcAmp_Get (IAMVideoProcAmp *iface, LONG property, LONG *value, LONG *flags)
 
static HRESULT WINAPI PPB_QueryInterface (IPersistPropertyBag *iface, REFIID iid, void **out)
 
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 *bag, IErrorLog *error_log)
 
static HRESULT WINAPI PPB_Save (IPersistPropertyBag *iface, IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties)
 
static struct vfw_capture * impl_from_IKsPropertySet (IKsPropertySet *iface)
 
static HRESULT WINAPI KSP_QueryInterface (IKsPropertySet *iface, REFIID iid, void **out)
 
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 struct vfw_capture * impl_from_strmbase_pin (struct strmbase_pin *pin)
 
static HRESULT source_query_accept (struct strmbase_pin *pin, const AM_MEDIA_TYPE *mt)
 
static HRESULT source_get_media_type (struct strmbase_pin *pin, unsigned int index, AM_MEDIA_TYPE *mt)
 
static HRESULT source_query_interface (struct strmbase_pin *iface, REFIID iid, void **out)
 
static HRESULT WINAPI VfwPin_DecideBufferSize (struct strmbase_source *iface, IMemAllocator *allocator, ALLOCATOR_PROPERTIES *req_props)
 
static HRESULT WINAPI misc_flags_QueryInterface (IAMFilterMiscFlags *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI misc_flags_AddRef (IAMFilterMiscFlags *iface)
 
static ULONG WINAPI misc_flags_Release (IAMFilterMiscFlags *iface)
 
static ULONG WINAPI misc_flags_GetMiscFlags (IAMFilterMiscFlags *iface)
 
static HRESULT WINAPI video_control_QueryInterface (IAMVideoControl *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI video_control_AddRef (IAMVideoControl *iface)
 
static ULONG WINAPI video_control_Release (IAMVideoControl *iface)
 
static HRESULT WINAPI video_control_GetCaps (IAMVideoControl *iface, IPin *pin, LONG *flags)
 
static HRESULT WINAPI video_control_SetMode (IAMVideoControl *iface, IPin *pin, LONG mode)
 
static HRESULT WINAPI video_control_GetMode (IAMVideoControl *iface, IPin *pin, LONG *mode)
 
static HRESULT WINAPI video_control_GetCurrentActualFrameRate (IAMVideoControl *iface, IPin *pin, LONGLONG *frame_rate)
 
static HRESULT WINAPI video_control_GetMaxAvailableFrameRate (IAMVideoControl *iface, IPin *pin, LONG index, SIZE dimensions, LONGLONG *frame_rate)
 
static HRESULT WINAPI video_control_GetFrameRateList (IAMVideoControl *iface, IPin *pin, LONG index, SIZE dimensions, LONG *list_size, LONGLONG **frame_rate)
 
static BOOL WINAPI load_capture_funcs (INIT_ONCE *once, void *param, void **context)
 
HRESULT vfw_capture_create (IUnknown *outer, IUnknown **out)
 

Variables

static const struct strmbase_filter_ops filter_ops
 
static const IAMStreamConfigVtbl IAMStreamConfig_VTable
 
static const IAMVideoProcAmpVtbl IAMVideoProcAmp_VTable
 
static const IPersistPropertyBagVtbl IPersistPropertyBag_VTable
 
static const IKsPropertySetVtbl IKsPropertySet_VTable
 
static const struct strmbase_source_ops source_ops
 
static const IAMFilterMiscFlagsVtbl IAMFilterMiscFlags_VTable
 
static const IAMVideoControlVtbl IAMVideoControl_VTable
 
static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT
 

Macro Definition Documentation

◆ V4L_CALL

#define V4L_CALL (   func,
  params 
)    WINE_UNIX_CALL( unix_ ## func, params )

Definition at line 29 of file vfwcapture.c.

Function Documentation

◆ AMStreamConfig_AddRef()

static ULONG WINAPI AMStreamConfig_AddRef ( IAMStreamConfig *  iface)
static

Definition at line 321 of file vfwcapture.c.

322{
324 return IPin_AddRef(&filter->source.pin.IPin_iface);
325}
Definition: filter.c:165
static struct vfw_capture * impl_from_IAMStreamConfig(IAMStreamConfig *iface)
Definition: vfwcapture.c:62

◆ AMStreamConfig_GetFormat()

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

Definition at line 386 of file vfwcapture.c.

387{
390 HRESULT hr;
391
392 TRACE("filter %p, mt %p.\n", filter, mt);
393
394 if (!(*mt = CoTaskMemAlloc(sizeof(**mt))))
395 return E_OUTOFMEMORY;
396
398
399 if (filter->source.pin.peer)
400 {
401 hr = CopyMediaType(*mt, &filter->source.pin.mt);
402 }
403 else
404 {
405 if ((format = CoTaskMemAlloc(sizeof(VIDEOINFOHEADER))))
406 {
407 struct get_format_params params = { filter->device, *mt, format };
408#ifndef __REACTOS__
410#else
411 hr = E_NOTIMPL;
412 (void)params;
413 ERR("libv4l not implemented: get_format\n");
414#endif
415 (*mt)->cbFormat = sizeof(VIDEOINFOHEADER);
416 (*mt)->pbFormat = (BYTE *)format;
417 hr = S_OK;
418 }
419 else
420 {
422 }
423 }
424
426
427 if (SUCCEEDED(hr))
429 else
431 return hr;
432}
#define ERR(fmt,...)
Definition: precomp.h:57
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_NOTIMPL
Definition: ddrawi.h:99
HRESULT hr
Definition: delayimp.cpp:582
void *WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: malloc.c:381
void WINAPI CoTaskMemFree(void *ptr)
Definition: malloc.c:389
struct tagVIDEOINFOHEADER VIDEOINFOHEADER
GLenum const GLfloat * params
Definition: glext.h:5645
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI CopyMediaType(AM_MEDIA_TYPE *pDest, const AM_MEDIA_TYPE *pSrc)
Definition: mediatype.c:150
void strmbase_dump_media_type(const AM_MEDIA_TYPE *mt)
Definition: mediatype.c:58
IBaseFilter * filter
Definition: filtergraph.c:75
AM_MEDIA_TYPE * mt
Definition: qcap_private.h:79
static const struct pixel_format * get_format(INT pf_index, INT *pf_count)
Definition: swimpl.c:274
#define V4L_CALL(func, params)
Definition: vfwcapture.c:29
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
unsigned char BYTE
Definition: xxhash.c:193

◆ AMStreamConfig_GetNumberOfCapabilities()

static HRESULT WINAPI AMStreamConfig_GetNumberOfCapabilities ( IAMStreamConfig *  iface,
int *  count,
int *  size 
)
static

Definition at line 434 of file vfwcapture.c.

436{
438 struct get_caps_count_params params = { filter->device, count };
439
440 TRACE("filter %p, count %p, size %p.\n", filter, count, size);
441
442 if (!count || !size)
443 return E_POINTER;
444
445#ifdef __REACTOS__
446 *size = sizeof(VIDEO_STREAM_CONFIG_CAPS);
447 (void)params;
448 ERR("libv4l not implemented: get_caps_count\n");
449#else
450 V4L_CALL( get_caps_count, &params );
451#endif
452
453 *size = sizeof(VIDEO_STREAM_CONFIG_CAPS);
454
455 return S_OK;
456}
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
#define E_POINTER
Definition: winerror.h:3480

◆ AMStreamConfig_GetStreamCaps()

static HRESULT WINAPI AMStreamConfig_GetStreamCaps ( IAMStreamConfig *  iface,
int  index,
AM_MEDIA_TYPE **  pmt,
BYTE *  vscc 
)
static

Definition at line 458 of file vfwcapture.c.

460{
463 AM_MEDIA_TYPE *mt;
464 int count;
465 struct get_caps_count_params count_params = { filter->device, &count };
466 struct get_caps_params caps_params;
467
468 TRACE("filter %p, index %d, pmt %p, vscc %p.\n", filter, index, pmt, vscc);
469
470#ifdef __REACTOS__
471 (void)count_params;
472 ERR("libv4l not implemented: get_caps_count\n");
473 *pmt = NULL;
474 return E_NOTIMPL;
475#else
476 V4L_CALL( get_caps_count, &count_params );
477#endif
478 if (index > count)
479 return S_FALSE;
480
481 if (!(mt = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE))))
482 return E_OUTOFMEMORY;
483
484 if (!(format = CoTaskMemAlloc(sizeof(VIDEOINFOHEADER))))
485 {
487 return E_OUTOFMEMORY;
488 }
489
490 caps_params.device = filter->device;
491 caps_params.index = index;
492 caps_params.mt = mt;
493 caps_params.format = format;
494 caps_params.caps = (VIDEO_STREAM_CONFIG_CAPS *)vscc;
495#ifdef __REACTOS__
496 (void)caps_params;
497 ERR("libv4l not implemented: get_caps\n");
498#else
499 V4L_CALL( get_caps, &caps_params );
500#endif
501 mt->cbFormat = sizeof(VIDEOINFOHEADER);
502 mt->pbFormat = (BYTE *)format;
503 *pmt = mt;
504 return S_OK;
505}
#define index(s, c)
Definition: various.h:29
#define NULL
Definition: types.h:112
GLuint index
Definition: glext.h:6031
VIDEOINFOHEADER * format
Definition: qcap_private.h:96
AM_MEDIA_TYPE * mt
Definition: qcap_private.h:95
#define S_FALSE
Definition: winerror.h:3451

◆ AMStreamConfig_QueryInterface()

static HRESULT WINAPI AMStreamConfig_QueryInterface ( IAMStreamConfig *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 315 of file vfwcapture.c.

316{
318 return IPin_QueryInterface(&filter->source.pin.IPin_iface, iid, out);
319}
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383

◆ AMStreamConfig_Release()

static ULONG WINAPI AMStreamConfig_Release ( IAMStreamConfig *  iface)
static

Definition at line 327 of file vfwcapture.c.

328{
330 return IPin_Release(&filter->source.pin.IPin_iface);
331}

◆ AMStreamConfig_SetFormat()

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

Definition at line 334 of file vfwcapture.c.

335{
338 HRESULT hr;
339
340 TRACE("filter %p, mt %p.\n", This, pmt);
342
343 if (This->filter.state != State_Stopped)
344 {
345 TRACE("Returning not stopped error\n");
346 return VFW_E_NOT_STOPPED;
347 }
348
349 if (!pmt)
350 {
351 TRACE("pmt is NULL\n");
352 return E_POINTER;
353 }
354
355 if (!IsEqualGUID(&pmt->majortype, &MEDIATYPE_Video))
356 return E_FAIL;
357
358 if (This->source.pin.peer)
359 {
360 hr = IPin_QueryAccept(This->source.pin.peer, pmt);
361 TRACE("QueryAccept() returned %#lx.\n", hr);
362 if (hr == S_FALSE)
364 }
365
366 params.device = This->device;
367 params.mt = pmt;
368#ifndef __REACTOS__
370#else
371 hr = E_NOTIMPL;
372 (void)params;
373 ERR("libv4l not implemented: start\n");
374#endif
375
376 if (SUCCEEDED(hr) && This->filter.graph && This->source.pin.peer)
377 {
378 hr = IFilterGraph_Reconnect(This->filter.graph, &This->source.pin.IPin_iface);
379 if (SUCCEEDED(hr))
380 TRACE("Reconnection completed, with new media format..\n");
381 }
382 TRACE("Returning %#lx.\n", hr);
383 return hr;
384}
#define E_FAIL
Definition: ddrawi.h:102
static HRESULT set_format(MMDevice *dev)
Definition: devenum.c:460
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define VFW_E_INVALIDMEDIATYPE
Definition: vfwmsgs.h:39
#define VFW_E_NOT_STOPPED
Definition: vfwmsgs.h:75

◆ AMVideoProcAmp_AddRef()

static ULONG WINAPI AMVideoProcAmp_AddRef ( IAMVideoProcAmp *  iface)
static

Definition at line 524 of file vfwcapture.c.

525{
527 return IUnknown_AddRef(filter->filter.outer_unk);
528}
static struct vfw_capture * impl_from_IAMVideoProcAmp(IAMVideoProcAmp *iface)
Definition: vfwcapture.c:72

◆ AMVideoProcAmp_Get()

static HRESULT WINAPI AMVideoProcAmp_Get ( IAMVideoProcAmp *  iface,
LONG  property,
LONG *  value,
LONG *  flags 
)
static

Definition at line 571 of file vfwcapture.c.

573{
575 struct get_prop_params params = { filter->device, property, value, flags };
576
577 TRACE("filter %p, property %#lx, value %p, flags %p.\n", filter, property, value, flags);
578
579#ifdef __REACTOS__
580 (void)params;
581 ERR("libv4l not implemented: get_prop\n");
582 return E_NOTIMPL;
583#else
584 return V4L_CALL( get_prop, &params );
585#endif
586}
GLbitfield flags
Definition: glext.h:7161
static dispex_prop_t * get_prop(jsdisp_t *This, DISPID id)
Definition: dispex.c:87
VideoProcAmpProperty property
Definition: qcap_private.h:120
Definition: pdh_main.c:64

◆ AMVideoProcAmp_GetRange()

static HRESULT WINAPI AMVideoProcAmp_GetRange ( IAMVideoProcAmp *  iface,
LONG  property,
LONG *  min,
LONG *  max,
LONG *  step,
LONG *  default_value,
LONG *  flags 
)
static

Definition at line 536 of file vfwcapture.c.

538{
541
542 TRACE("filter %p, property %#lx, min %p, max %p, step %p, default_value %p, flags %p.\n",
544
545#ifdef __REACTOS__
546 (void)params;
547 ERR("libv4l not implemented: get_prop_range\n");
548 return E_NOTIMPL;
549#else
550 return V4L_CALL( get_prop_range, &params );
551#endif
552}
#define min(a, b)
Definition: monoChain.cc:55
VideoProcAmpProperty property
Definition: qcap_private.h:109
#define max(a, b)
Definition: svc.c:63

◆ AMVideoProcAmp_QueryInterface()

static HRESULT WINAPI AMVideoProcAmp_QueryInterface ( IAMVideoProcAmp *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 518 of file vfwcapture.c.

519{
521 return IUnknown_QueryInterface(filter->filter.outer_unk, iid, out);
522}

◆ AMVideoProcAmp_Release()

static ULONG WINAPI AMVideoProcAmp_Release ( IAMVideoProcAmp *  iface)
static

Definition at line 530 of file vfwcapture.c.

531{
533 return IUnknown_Release(filter->filter.outer_unk);
534}

◆ AMVideoProcAmp_Set()

static HRESULT WINAPI AMVideoProcAmp_Set ( IAMVideoProcAmp *  iface,
LONG  property,
LONG  value,
LONG  flags 
)
static

Definition at line 554 of file vfwcapture.c.

556{
558 struct set_prop_params params = { filter->device, property, value, flags };
559
560 TRACE("filter %p, property %#lx, value %ld, flags %#lx.\n", filter, property, value, flags);
561
562#ifdef __REACTOS__
563 (void)params;
564 ERR("libv4l not implemented: set_prop\n");
565 return E_NOTIMPL;
566#else
567 return V4L_CALL( set_prop, &params );
568#endif
569}
static UINT set_prop(MSISUMMARYINFO *si, UINT uiProperty, UINT type, INT iValue, FILETIME *pftValue, awcstring *str)
Definition: suminfo.c:841
VideoProcAmpProperty property
Definition: qcap_private.h:128

◆ get_image_size()

static unsigned int get_image_size ( struct vfw_capture *  filter)
static

Definition at line 140 of file vfwcapture.c.

141{
142 const VIDEOINFOHEADER *format = (const VIDEOINFOHEADER *)filter->source.pin.mt.pbFormat;
143
144 return format->bmiHeader.biWidth * format->bmiHeader.biHeight * format->bmiHeader.biBitCount / 8;
145}

Referenced by stream_thread(), and VfwPin_DecideBufferSize().

◆ impl_from_IAMFilterMiscFlags()

static struct vfw_capture * impl_from_IAMFilterMiscFlags ( IAMFilterMiscFlags *  iface)
inlinestatic

Definition at line 77 of file vfwcapture.c.

78{
79 return CONTAINING_RECORD(iface, struct vfw_capture, IAMFilterMiscFlags_iface);
80}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by misc_flags_AddRef(), misc_flags_QueryInterface(), and misc_flags_Release().

◆ impl_from_IAMStreamConfig()

static struct vfw_capture * impl_from_IAMStreamConfig ( IAMStreamConfig *  iface)
inlinestatic

◆ impl_from_IAMVideoControl()

◆ impl_from_IAMVideoProcAmp()

static struct vfw_capture * impl_from_IAMVideoProcAmp ( IAMVideoProcAmp *  iface)
inlinestatic

◆ impl_from_IKsPropertySet()

static struct vfw_capture * impl_from_IKsPropertySet ( IKsPropertySet *  iface)
inlinestatic

Definition at line 683 of file vfwcapture.c.

684{
685 return CONTAINING_RECORD(iface, struct vfw_capture, IKsPropertySet_iface);
686}

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

◆ impl_from_IPersistPropertyBag()

static struct vfw_capture * impl_from_IPersistPropertyBag ( IPersistPropertyBag *  iface)
inlinestatic

Definition at line 82 of file vfwcapture.c.

83{
84 return CONTAINING_RECORD(iface, struct vfw_capture, IPersistPropertyBag_iface);
85}

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

◆ impl_from_strmbase_filter()

◆ impl_from_strmbase_pin()

static struct vfw_capture * impl_from_strmbase_pin ( struct strmbase_pin *  pin)
inlinestatic

Definition at line 758 of file vfwcapture.c.

759{
760 return CONTAINING_RECORD(pin, struct vfw_capture, source.pin);
761}

Referenced by source_get_media_type(), source_query_accept(), source_query_interface(), and VfwPin_DecideBufferSize().

◆ KSP_AddRef()

static ULONG WINAPI KSP_AddRef ( IKsPropertySet *  iface)
static

Definition at line 694 of file vfwcapture.c.

695{
697 return IPin_AddRef(&filter->source.pin.IPin_iface);
698}
static struct vfw_capture * impl_from_IKsPropertySet(IKsPropertySet *iface)
Definition: vfwcapture.c:683

◆ 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 716 of file vfwcapture.c.

719{
720 LPGUID pGuid;
721
722 TRACE("()\n");
723
724 if (!IsEqualIID(guidPropSet, &AMPROPSETID_Pin))
726 if (pPropData == NULL && pcbReturned == NULL)
727 return E_POINTER;
728 if (pcbReturned)
729 *pcbReturned = sizeof(GUID);
730 if (pPropData == NULL)
731 return S_OK;
732 if (cbPropData < sizeof(GUID))
733 return E_UNEXPECTED;
734 pGuid = pPropData;
735 *pGuid = PIN_CATEGORY_CAPTURE;
736 FIXME("() Not adding a pin with PIN_CATEGORY_PREVIEW\n");
737 return S_OK;
738}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_PROP_SET_UNSUPPORTED
Definition: vfwmsgs.h:176
#define E_UNEXPECTED
Definition: winerror.h:3528

◆ KSP_QueryInterface()

static HRESULT WINAPI KSP_QueryInterface ( IKsPropertySet *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 688 of file vfwcapture.c.

689{
691 return IPin_QueryInterface(&filter->source.pin.IPin_iface, iid, out);
692}

◆ KSP_QuerySupported()

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

Definition at line 741 of file vfwcapture.c.

743{
744 FIXME("%p: stub\n", iface);
745 return E_NOTIMPL;
746}

◆ KSP_Release()

static ULONG WINAPI KSP_Release ( IKsPropertySet *  iface)
static

Definition at line 700 of file vfwcapture.c.

701{
703 return IPin_Release(&filter->source.pin.IPin_iface);
704}

◆ 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 707 of file vfwcapture.c.

710{
711 FIXME("%p: stub\n", iface);
712 return E_NOTIMPL;
713}

◆ load_capture_funcs()

static BOOL WINAPI load_capture_funcs ( INIT_ONCE *  once,
void *  param,
void **  context 
)
static

Definition at line 975 of file vfwcapture.c.

976{
978 return TRUE;
979}
#define TRUE
Definition: types.h:120
#define __wine_init_unix_call()
Definition: unixlib.h:13

Referenced by vfw_capture_create().

◆ misc_flags_AddRef()

static ULONG WINAPI misc_flags_AddRef ( IAMFilterMiscFlags *  iface)
static

Definition at line 859 of file vfwcapture.c.

860{
862 return IUnknown_AddRef(filter->filter.outer_unk);
863}
static struct vfw_capture * impl_from_IAMFilterMiscFlags(IAMFilterMiscFlags *iface)
Definition: vfwcapture.c:77

◆ misc_flags_GetMiscFlags()

static ULONG WINAPI misc_flags_GetMiscFlags ( IAMFilterMiscFlags *  iface)
static

Definition at line 871 of file vfwcapture.c.

872{
874}
@ AM_FILTER_MISC_FLAGS_IS_SOURCE
Definition: axextend.idl:1245

◆ misc_flags_QueryInterface()

static HRESULT WINAPI misc_flags_QueryInterface ( IAMFilterMiscFlags *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 853 of file vfwcapture.c.

854{
856 return IUnknown_QueryInterface(filter->filter.outer_unk, riid, ppv);
857}
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39

◆ misc_flags_Release()

static ULONG WINAPI misc_flags_Release ( IAMFilterMiscFlags *  iface)
static

Definition at line 865 of file vfwcapture.c.

866{
868 return IUnknown_Release(filter->filter.outer_unk);
869}

◆ PPB_AddRef()

static ULONG WINAPI PPB_AddRef ( IPersistPropertyBag *  iface)
static

Definition at line 604 of file vfwcapture.c.

605{
607 return IUnknown_AddRef(filter->filter.outer_unk);
608}
static struct vfw_capture * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: vfwcapture.c:82

◆ PPB_GetClassID()

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

Definition at line 617 of file vfwcapture.c.

618{
620
621 FIXME("%p - stub\n", This);
622
623 return E_NOTIMPL;
624}

◆ PPB_InitNew()

static HRESULT WINAPI PPB_InitNew ( IPersistPropertyBag *  iface)
static

Definition at line 626 of file vfwcapture.c.

627{
629
630 FIXME("%p - stub\n", This);
631
632 return E_NOTIMPL;
633}

◆ PPB_Load()

static HRESULT WINAPI PPB_Load ( IPersistPropertyBag *  iface,
IPropertyBag *  bag,
IErrorLog *  error_log 
)
static

Definition at line 635 of file vfwcapture.c.

636{
638 struct create_params params;
639 HRESULT hr;
640 VARIANT var;
641
642 TRACE("filter %p, bag %p, error_log %p.\n", filter, bag, error_log);
643
644 V_VT(&var) = VT_I4;
645 if (FAILED(hr = IPropertyBag_Read(bag, L"VFWIndex", &var, error_log)))
646 return hr;
647
648 params.index = V_I4(&var);
649 params.device = &filter->device;
650#ifdef __REACTOS__
651 (void)params;
652 ERR("libv4l not implemented: create\n");
653 hr = E_NOTIMPL;
654#else
655 hr = V4L_CALL( create, &params );
656#endif
657
658 if (SUCCEEDED(hr)) filter->init = TRUE;
659 return hr;
660}
@ VT_I4
Definition: compat.h:2298
#define L(x)
Definition: resources.c:13
#define FAILED(hr)
Definition: intsafe.h:51
const char * var
Definition: shader.c:5879
static const struct access_res create[16]
Definition: package.c:7546
#define V_VT(A)
Definition: oleauto.h:211
#define V_I4(A)
Definition: oleauto.h:247

◆ PPB_QueryInterface()

static HRESULT WINAPI PPB_QueryInterface ( IPersistPropertyBag *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 598 of file vfwcapture.c.

599{
601 return IUnknown_QueryInterface(filter->filter.outer_unk, iid, out);
602}

◆ PPB_Release()

static ULONG WINAPI PPB_Release ( IPersistPropertyBag *  iface)
static

Definition at line 610 of file vfwcapture.c.

611{
613 return IUnknown_Release(filter->filter.outer_unk);
614}

◆ PPB_Save()

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

Definition at line 663 of file vfwcapture.c.

665{
667 FIXME("%p - stub\n", This);
668 return E_NOTIMPL;
669}

◆ source_get_media_type()

static HRESULT source_get_media_type ( struct strmbase_pin *  pin,
unsigned int  index,
AM_MEDIA_TYPE *  mt 
)
static

Definition at line 779 of file vfwcapture.c.

781{
785 HRESULT hr;
786
787 if (!(format = CoTaskMemAlloc(sizeof(*format))))
788 return E_OUTOFMEMORY;
789
790 params.device = filter->device;
791 params.index = index;
792 params.mt = mt;
793 params.format = format;
794#ifdef __REACTOS__
795 (void)params;
796 ERR("libv4l not implemented: get_media_type\n");
797 hr = E_NOTIMPL;
798 if (TRUE)
799#else
800 if ((hr = V4L_CALL( get_media_type, &params )) != S_OK)
801#endif
802 if ((hr = V4L_CALL( get_media_type, &params )) != S_OK)
803 {
805 return hr;
806 }
807 mt->cbFormat = sizeof(VIDEOINFOHEADER);
808 mt->pbFormat = (BYTE *)format;
809 return S_OK;
810}
BOOL get_media_type(const WCHAR *filename, GUID *majortype, GUID *subtype, GUID *source_clsid)
Definition: filesource.c:198
VIDEOINFOHEADER * format
Definition: qcap_private.h:88
AM_MEDIA_TYPE * mt
Definition: qcap_private.h:87
static struct vfw_capture * impl_from_strmbase_pin(struct strmbase_pin *pin)
Definition: vfwcapture.c:758

◆ source_query_accept()

static HRESULT source_query_accept ( struct strmbase_pin *  pin,
const AM_MEDIA_TYPE *  mt 
)
static

Definition at line 763 of file vfwcapture.c.

764{
766 struct check_format_params params = { filter->device, mt };
767
768 if (!mt) return E_POINTER;
769
770#ifdef __REACTOS__
771 (void)params;
772 ERR("libv4l not implemented: check_format\n");
773 return E_NOTIMPL;
774#else
775 return V4L_CALL( check_format, &params );
776#endif
777}
static BOOL check_format(LPSTR path, LPSTR inf)
Definition: misc.c:87
const AM_MEDIA_TYPE * mt
Definition: qcap_private.h:67

◆ source_query_interface()

static HRESULT source_query_interface ( struct strmbase_pin *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 812 of file vfwcapture.c.

813{
815
817 *out = &filter->IKsPropertySet_iface;
818 else if (IsEqualGUID(iid, &IID_IAMStreamConfig))
819 *out = &filter->IAMStreamConfig_iface;
820 else
821 return E_NOINTERFACE;
822
823 IUnknown_AddRef((IUnknown *)*out);
824 return S_OK;
825}
const GUID IID_IKsPropertySet
Definition: controlnode.cpp:13
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ stream_thread()

static DWORD WINAPI stream_thread ( void *  arg)
static

Definition at line 147 of file vfwcapture.c.

148{
149 struct vfw_capture *filter = arg;
150 const unsigned int image_size = get_image_size(filter);
152
153 for (;;)
154 {
156 HRESULT hr;
157 BYTE *data;
158
159 EnterCriticalSection(&filter->state_cs);
160
161 while (filter->state == State_Paused)
162 SleepConditionVariableCS(&filter->state_cv, &filter->state_cs, INFINITE);
163
164 if (filter->state == State_Stopped)
165 {
166 LeaveCriticalSection(&filter->state_cs);
167 break;
168 }
169
170 LeaveCriticalSection(&filter->state_cs);
171
172 if (FAILED(hr = IMemAllocator_GetBuffer(filter->source.pAllocator, &sample, NULL, NULL, 0)))
173 {
174 ERR("Failed to get sample, hr %#lx.\n", hr);
175 break;
176 }
177
178 IMediaSample_SetActualDataLength(sample, image_size);
179 IMediaSample_GetPointer(sample, &data);
180
181 params.device = filter->device;
182 params.data = data;
183#ifndef __REACTOS__
184 if (!V4L_CALL( read_frame, &params ))
185 {
186 IMediaSample_Release(sample);
187 break;
188 }
189#else
190 ERR("libv4l not implemented: read_frame\n");
191 (void)params;
192 break;
193#endif
194
195 hr = IMemInputPin_Receive(filter->source.pMemInputPin, sample);
196 IMediaSample_Release(sample);
197 if (FAILED(hr))
198 {
199 ERR("IMemInputPin::Receive() returned %#lx.\n", hr);
200 break;
201 }
202 }
203
204 return 0;
205}
BOOL WINAPI SleepConditionVariableCS(PCONDITION_VARIABLE ConditionVariable, PCRITICAL_SECTION CriticalSection, DWORD Timeout)
Definition: sync.c:59
#define INFINITE
Definition: serial.h:102
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define read_frame
Definition: intsym.h:241
static GLint image_size(GLint width, GLint height, GLenum format, GLenum type)
Definition: mipmap.c:4858
FILTER_STATE state
Definition: filter.c:177
Definition: wave.c:25
static unsigned int get_image_size(struct vfw_capture *filter)
Definition: vfwcapture.c:140
void * arg
Definition: msvc.h:10

Referenced by vfw_capture_init_stream().

◆ vfw_capture_cleanup_stream()

static HRESULT vfw_capture_cleanup_stream ( struct strmbase_filter *  iface)
static

Definition at line 270 of file vfwcapture.c.

271{
273 HRESULT hr;
274
275 if (!filter->source.pin.peer)
276 return S_OK;
277
278 EnterCriticalSection(&filter->state_cs);
279 filter->state = State_Stopped;
280 LeaveCriticalSection(&filter->state_cs);
281 WakeConditionVariable(&filter->state_cv);
282
284 CloseHandle(filter->thread);
285 filter->thread = NULL;
286
287 hr = IMemAllocator_Decommit(filter->source.pAllocator);
288 if (hr != S_OK && hr != VFW_E_NOT_COMMITTED)
289 ERR("Failed to decommit allocator, hr %#lx.\n", hr);
290
291 return S_OK;
292}
#define CloseHandle
Definition: compat.h:739
VOID WINAPI WakeConditionVariable(PCONDITION_VARIABLE ConditionVariable)
Definition: sync.c:98
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
static struct vfw_capture * impl_from_strmbase_filter(struct strmbase_filter *iface)
Definition: vfwcapture.c:57
#define VFW_E_NOT_COMMITTED
Definition: vfwmsgs.h:56

◆ vfw_capture_create()

HRESULT vfw_capture_create ( IUnknown *  outer,
IUnknown **  out 
)

Definition at line 984 of file vfwcapture.c.

985{
986 struct vfw_capture *object;
987
988#ifndef __REACTOS__
989 if (!InitOnceExecuteOnce(&init_once, load_capture_funcs, NULL, NULL) || !__wine_unixlib_handle)
990 return E_FAIL;
991#endif
992
993 if (!(object = calloc(1, sizeof(*object))))
994 return E_OUTOFMEMORY;
995
996 strmbase_filter_init(&object->filter, outer, &CLSID_VfwCapture, &filter_ops);
997
998 object->IAMStreamConfig_iface.lpVtbl = &IAMStreamConfig_VTable;
999 object->IAMVideoControl_iface.lpVtbl = &IAMVideoControl_VTable;
1000 object->IAMVideoProcAmp_iface.lpVtbl = &IAMVideoProcAmp_VTable;
1001 object->IAMFilterMiscFlags_iface.lpVtbl = &IAMFilterMiscFlags_VTable;
1002 object->IPersistPropertyBag_iface.lpVtbl = &IPersistPropertyBag_VTable;
1003
1004 strmbase_source_init(&object->source, &object->filter, L"Output", &source_ops);
1005
1006 object->IKsPropertySet_iface.lpVtbl = &IKsPropertySet_VTable;
1007
1008 object->state = State_Stopped;
1011 object->state_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": vfw_capture.state_cs");
1012
1013 TRACE("Created VFW capture filter %p.\n", object);
1014 *out = &object->filter.IUnknown_inner;
1015 return S_OK;
1016}
BOOL WINAPI InitOnceExecuteOnce(_Inout_ PINIT_ONCE InitOnce, _In_ __callback PINIT_ONCE_FN InitFn, _Inout_opt_ PVOID Parameter, _Outptr_opt_result_maybenull_ LPVOID *Context)
Definition: InitOnce.c:12
VOID WINAPI InitializeConditionVariable(PCONDITION_VARIABLE ConditionVariable)
Definition: sync.c:22
BOOL WINAPI InitializeCriticalSectionEx(OUT LPCRITICAL_SECTION lpCriticalSection, IN DWORD dwSpinCount, IN DWORD flags)
Definition: sync.c:107
static IUnknown * outer
Definition: compobj.c:82
#define calloc
Definition: rosglue.h:14
void strmbase_source_init(struct strmbase_source *pin, struct strmbase_filter *filter, const WCHAR *name, const struct strmbase_source_ops *func_table)
Definition: pin.c:765
void strmbase_filter_init(struct strmbase_filter *filter, IUnknown *outer, const CLSID *clsid, const struct strmbase_filter_ops *func_table)
Definition: filter.c:517
#define DWORD_PTR
Definition: treelist.c:76
static const IAMStreamConfigVtbl IAMStreamConfig_VTable
Definition: vfwcapture.c:507
static const IKsPropertySetVtbl IKsPropertySet_VTable
Definition: vfwcapture.c:748
static const IAMVideoProcAmpVtbl IAMVideoProcAmp_VTable
Definition: vfwcapture.c:588
static INIT_ONCE init_once
Definition: vfwcapture.c:981
static BOOL WINAPI load_capture_funcs(INIT_ONCE *once, void *param, void **context)
Definition: vfwcapture.c:975
static const struct strmbase_source_ops source_ops
Definition: vfwcapture.c:843
static const IAMFilterMiscFlagsVtbl IAMFilterMiscFlags_VTable
Definition: vfwcapture.c:876
static const struct strmbase_filter_ops filter_ops
Definition: vfwcapture.c:303
static const IPersistPropertyBagVtbl IPersistPropertyBag_VTable
Definition: vfwcapture.c:671
static const IAMVideoControlVtbl IAMVideoControl_VTable
Definition: vfwcapture.c:961
#define RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO
Definition: winnt_old.h:1156

◆ vfw_capture_destroy()

static void vfw_capture_destroy ( struct strmbase_filter *  iface)
static

Definition at line 97 of file vfwcapture.c.

98{
100
101 if (filter->init)
102 {
103#ifndef __REACTOS__
104 struct destroy_params params = { filter->device };
106#endif
107 }
108
109 if (filter->source.pin.peer)
110 {
111 IPin_Disconnect(filter->source.pin.peer);
112 IPin_Disconnect(&filter->source.pin.IPin_iface);
113 }
114 filter->state_cs.DebugInfo->Spare[0] = 0;
115 DeleteCriticalSection(&filter->state_cs);
118 free(filter);
119}
void destroy(_Tp *__pointer)
Definition: _construct.h:278
#define free
Definition: debug_ros.c:5
void strmbase_filter_cleanup(struct strmbase_filter *filter)
Definition: filter.c:540
void strmbase_source_cleanup(struct strmbase_source *pin)
Definition: pin.c:778
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)

◆ vfw_capture_get_pin()

static struct strmbase_pin * vfw_capture_get_pin ( struct strmbase_filter *  iface,
unsigned int  index 
)
static

Definition at line 87 of file vfwcapture.c.

88{
90
91 if (index >= 1)
92 return NULL;
93
94 return &filter->source.pin;
95}

◆ vfw_capture_init_stream()

static HRESULT vfw_capture_init_stream ( struct strmbase_filter *  iface)
static

Definition at line 207 of file vfwcapture.c.

208{
210 HRESULT hr;
211
212 if (!filter->source.pin.peer)
213 return S_OK;
214
215 if (FAILED(hr = IMemAllocator_Commit(filter->source.pAllocator)))
216 ERR("Failed to commit allocator, hr %#lx.\n", hr);
217
218 EnterCriticalSection(&filter->state_cs);
219 filter->state = State_Paused;
220 LeaveCriticalSection(&filter->state_cs);
221
222 filter->thread = CreateThread(NULL, 0, stream_thread, filter, 0, NULL);
223
224 return S_OK;
225}
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
static DWORD WINAPI stream_thread(void *arg)
Definition: vfwcapture.c:147

◆ vfw_capture_query_interface()

static HRESULT vfw_capture_query_interface ( struct strmbase_filter *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 121 of file vfwcapture.c.

122{
124
126 *out = &filter->IPersistPropertyBag_iface;
127 else if (IsEqualGUID(iid, &IID_IAMVideoControl))
128 *out = &filter->IAMVideoControl_iface;
129 else if (IsEqualGUID(iid, &IID_IAMVideoProcAmp))
130 *out = &filter->IAMVideoProcAmp_iface;
131 else if (IsEqualGUID(iid, &IID_IAMFilterMiscFlags))
132 *out = &filter->IAMFilterMiscFlags_iface;
133 else
134 return E_NOINTERFACE;
135
136 IUnknown_AddRef((IUnknown *)*out);
137 return S_OK;
138}
const GUID IID_IPersistPropertyBag
Definition: proxy.cpp:11

◆ vfw_capture_start_stream()

static HRESULT vfw_capture_start_stream ( struct strmbase_filter *  iface,
REFERENCE_TIME  time 
)
static

Definition at line 227 of file vfwcapture.c.

228{
230 struct start_params params;
231 HRESULT hr;
232
233 if (!filter->source.pin.peer)
234 return S_OK;
235
236 params.device = filter->device;
237#ifndef __REACTOS__
238 if (FAILED(hr = V4L_CALL( start, &params )))
239 {
240 ERR("start stream failed.\n");
241 return hr;
242 }
243#else
244 hr = E_NOTIMPL;
245 (void)params;
246 ERR("libv4l not implemented: start\n");
247 return hr;
248#endif
249
250 EnterCriticalSection(&filter->state_cs);
251 filter->state = State_Running;
252 LeaveCriticalSection(&filter->state_cs);
253 WakeConditionVariable(&filter->state_cv);
254 return S_OK;
255}
GLuint start
Definition: gl.h:1545

◆ vfw_capture_stop_stream()

static HRESULT vfw_capture_stop_stream ( struct strmbase_filter *  iface)
static

Definition at line 257 of file vfwcapture.c.

258{
260
261 if (!filter->source.pin.peer)
262 return S_OK;
263
264 EnterCriticalSection(&filter->state_cs);
265 filter->state = State_Paused;
266 LeaveCriticalSection(&filter->state_cs);
267 return S_OK;
268}

◆ vfw_capture_wait_state()

static HRESULT vfw_capture_wait_state ( struct strmbase_filter *  iface,
DWORD  timeout 
)
static

Definition at line 294 of file vfwcapture.c.

295{
297
298 if (filter->source.pin.peer && filter->filter.state == State_Paused)
299 return VFW_S_CANT_CUE;
300 return S_OK;
301}
#define VFW_S_CANT_CUE
Definition: vfwmsgs.h:33

◆ VfwPin_DecideBufferSize()

static HRESULT WINAPI VfwPin_DecideBufferSize ( struct strmbase_source *  iface,
IMemAllocator *  allocator,
ALLOCATOR_PROPERTIES *  req_props 
)
static

Definition at line 827 of file vfwcapture.c.

829{
830 struct vfw_capture *filter = impl_from_strmbase_pin(&iface->pin);
831 ALLOCATOR_PROPERTIES ret_props;
832
833 if (!req_props->cBuffers)
834 req_props->cBuffers = 3;
835 if (!req_props->cbBuffer)
836 req_props->cbBuffer = get_image_size(filter);
837 if (!req_props->cbAlign)
838 req_props->cbAlign = 1;
839
840 return IMemAllocator_SetProperties(allocator, req_props, &ret_props);
841}
struct strmbase_pin pin
Definition: strmbase.h:79

◆ video_control_AddRef()

static ULONG WINAPI video_control_AddRef ( IAMVideoControl *  iface)
static

Definition at line 890 of file vfwcapture.c.

891{
893 return IUnknown_AddRef(filter->filter.outer_unk);
894}
static struct vfw_capture * impl_from_IAMVideoControl(IAMVideoControl *iface)
Definition: vfwcapture.c:67

◆ video_control_GetCaps()

static HRESULT WINAPI video_control_GetCaps ( IAMVideoControl *  iface,
IPin *  pin,
LONG *  flags 
)
static

Definition at line 902 of file vfwcapture.c.

903{
905
906 FIXME("filter %p, pin %p, flags %p: stub.\n", filter, pin, flags);
907
908 return E_NOTIMPL;
909}

◆ video_control_GetCurrentActualFrameRate()

static HRESULT WINAPI video_control_GetCurrentActualFrameRate ( IAMVideoControl *  iface,
IPin *  pin,
LONGLONG *  frame_rate 
)
static

Definition at line 929 of file vfwcapture.c.

931{
933
934 FIXME("filter %p, pin %p, frame rate %p: stub.\n", filter, pin, frame_rate);
935
936 return E_NOTIMPL;
937}

◆ video_control_GetFrameRateList()

static HRESULT WINAPI video_control_GetFrameRateList ( IAMVideoControl *  iface,
IPin *  pin,
LONG  index,
SIZE  dimensions,
LONG *  list_size,
LONGLONG **  frame_rate 
)
static

Definition at line 950 of file vfwcapture.c.

952{
954
955 FIXME("filter %p, pin %p, index %ld, dimensions (%ldx%ld), list size %p, frame rate %p, stub.\n",
956 filter, pin, index, dimensions.cx, dimensions.cy, list_size, frame_rate);
957
958 return E_NOTIMPL;
959}
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28

◆ video_control_GetMaxAvailableFrameRate()

static HRESULT WINAPI video_control_GetMaxAvailableFrameRate ( IAMVideoControl *  iface,
IPin *  pin,
LONG  index,
SIZE  dimensions,
LONGLONG *  frame_rate 
)
static

Definition at line 939 of file vfwcapture.c.

941{
943
944 FIXME("filter %p, pin %p, index %ld, dimensions (%ldx%ld), frame rate %p, stub.\n",
945 filter, pin, index, dimensions.cx, dimensions.cy, frame_rate);
946
947 return E_NOTIMPL;
948}

◆ video_control_GetMode()

static HRESULT WINAPI video_control_GetMode ( IAMVideoControl *  iface,
IPin *  pin,
LONG *  mode 
)
static

Definition at line 920 of file vfwcapture.c.

921{
923
924 FIXME("filter %p, pin %p, mode %p: stub.\n", filter, pin, mode);
925
926 return E_NOTIMPL;
927}
GLenum mode
Definition: glext.h:6217

◆ video_control_QueryInterface()

static HRESULT WINAPI video_control_QueryInterface ( IAMVideoControl *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 884 of file vfwcapture.c.

885{
887 return IUnknown_QueryInterface(filter->filter.outer_unk, riid, ppv);
888}

◆ video_control_Release()

static ULONG WINAPI video_control_Release ( IAMVideoControl *  iface)
static

Definition at line 896 of file vfwcapture.c.

897{
899 return IUnknown_Release(filter->filter.outer_unk);
900}

◆ video_control_SetMode()

static HRESULT WINAPI video_control_SetMode ( IAMVideoControl *  iface,
IPin *  pin,
LONG  mode 
)
static

Definition at line 911 of file vfwcapture.c.

912{
914
915 FIXME("filter %p, pin %p, mode %ld, stub.\n", filter, pin, mode);
916
917 return E_NOTIMPL;
918}

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( quartz  )

Variable Documentation

◆ filter_ops

const struct strmbase_filter_ops filter_ops
static
Initial value:
=
{
.filter_get_pin = vfw_capture_get_pin,
.filter_destroy = vfw_capture_destroy,
.filter_query_interface = vfw_capture_query_interface,
.filter_init_stream = vfw_capture_init_stream,
.filter_start_stream = vfw_capture_start_stream,
.filter_stop_stream = vfw_capture_stop_stream,
.filter_cleanup_stream = vfw_capture_cleanup_stream,
.filter_wait_state = vfw_capture_wait_state,
}
static HRESULT vfw_capture_init_stream(struct strmbase_filter *iface)
Definition: vfwcapture.c:207
static HRESULT vfw_capture_wait_state(struct strmbase_filter *iface, DWORD timeout)
Definition: vfwcapture.c:294
static void vfw_capture_destroy(struct strmbase_filter *iface)
Definition: vfwcapture.c:97
static HRESULT vfw_capture_stop_stream(struct strmbase_filter *iface)
Definition: vfwcapture.c:257
static HRESULT vfw_capture_start_stream(struct strmbase_filter *iface, REFERENCE_TIME time)
Definition: vfwcapture.c:227
static struct strmbase_pin * vfw_capture_get_pin(struct strmbase_filter *iface, unsigned int index)
Definition: vfwcapture.c:87
static HRESULT vfw_capture_query_interface(struct strmbase_filter *iface, REFIID iid, void **out)
Definition: vfwcapture.c:121
static HRESULT vfw_capture_cleanup_stream(struct strmbase_filter *iface)
Definition: vfwcapture.c:270

Definition at line 303 of file vfwcapture.c.

Referenced by vfw_capture_create().

◆ IAMFilterMiscFlags_VTable

const IAMFilterMiscFlagsVtbl IAMFilterMiscFlags_VTable
static
Initial value:
=
{
}
static ULONG WINAPI misc_flags_Release(IAMFilterMiscFlags *iface)
Definition: vfwcapture.c:865
static ULONG WINAPI misc_flags_AddRef(IAMFilterMiscFlags *iface)
Definition: vfwcapture.c:859
static HRESULT WINAPI misc_flags_QueryInterface(IAMFilterMiscFlags *iface, REFIID riid, void **ppv)
Definition: vfwcapture.c:853
static ULONG WINAPI misc_flags_GetMiscFlags(IAMFilterMiscFlags *iface)
Definition: vfwcapture.c:871

Definition at line 876 of file vfwcapture.c.

Referenced by vfw_capture_create().

◆ IAMStreamConfig_VTable

const IAMStreamConfigVtbl IAMStreamConfig_VTable
static
Initial value:
=
{
}
static ULONG WINAPI AMStreamConfig_AddRef(IAMStreamConfig *iface)
Definition: vfwcapture.c:321
static HRESULT WINAPI AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt)
Definition: vfwcapture.c:334
static ULONG WINAPI AMStreamConfig_Release(IAMStreamConfig *iface)
Definition: vfwcapture.c:327
static HRESULT WINAPI AMStreamConfig_GetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE **mt)
Definition: vfwcapture.c:386
static HRESULT WINAPI AMStreamConfig_GetStreamCaps(IAMStreamConfig *iface, int index, AM_MEDIA_TYPE **pmt, BYTE *vscc)
Definition: vfwcapture.c:458
static HRESULT WINAPI AMStreamConfig_GetNumberOfCapabilities(IAMStreamConfig *iface, int *count, int *size)
Definition: vfwcapture.c:434
static HRESULT WINAPI AMStreamConfig_QueryInterface(IAMStreamConfig *iface, REFIID iid, void **out)
Definition: vfwcapture.c:315

Definition at line 507 of file vfwcapture.c.

Referenced by vfw_capture_create().

◆ IAMVideoControl_VTable

const IAMVideoControlVtbl IAMVideoControl_VTable
static
Initial value:
=
{
}
static HRESULT WINAPI video_control_GetCurrentActualFrameRate(IAMVideoControl *iface, IPin *pin, LONGLONG *frame_rate)
Definition: vfwcapture.c:929
static HRESULT WINAPI video_control_GetFrameRateList(IAMVideoControl *iface, IPin *pin, LONG index, SIZE dimensions, LONG *list_size, LONGLONG **frame_rate)
Definition: vfwcapture.c:950
static HRESULT WINAPI video_control_GetMaxAvailableFrameRate(IAMVideoControl *iface, IPin *pin, LONG index, SIZE dimensions, LONGLONG *frame_rate)
Definition: vfwcapture.c:939
static HRESULT WINAPI video_control_GetCaps(IAMVideoControl *iface, IPin *pin, LONG *flags)
Definition: vfwcapture.c:902
static HRESULT WINAPI video_control_SetMode(IAMVideoControl *iface, IPin *pin, LONG mode)
Definition: vfwcapture.c:911
static ULONG WINAPI video_control_AddRef(IAMVideoControl *iface)
Definition: vfwcapture.c:890
static HRESULT WINAPI video_control_GetMode(IAMVideoControl *iface, IPin *pin, LONG *mode)
Definition: vfwcapture.c:920
static ULONG WINAPI video_control_Release(IAMVideoControl *iface)
Definition: vfwcapture.c:896
static HRESULT WINAPI video_control_QueryInterface(IAMVideoControl *iface, REFIID riid, void **ppv)
Definition: vfwcapture.c:884

Definition at line 961 of file vfwcapture.c.

Referenced by vfw_capture_create().

◆ IAMVideoProcAmp_VTable

const IAMVideoProcAmpVtbl IAMVideoProcAmp_VTable
static
Initial value:
=
{
}
static ULONG WINAPI AMVideoProcAmp_AddRef(IAMVideoProcAmp *iface)
Definition: vfwcapture.c:524
static HRESULT WINAPI AMVideoProcAmp_GetRange(IAMVideoProcAmp *iface, LONG property, LONG *min, LONG *max, LONG *step, LONG *default_value, LONG *flags)
Definition: vfwcapture.c:536
static ULONG WINAPI AMVideoProcAmp_Release(IAMVideoProcAmp *iface)
Definition: vfwcapture.c:530
static HRESULT WINAPI AMVideoProcAmp_QueryInterface(IAMVideoProcAmp *iface, REFIID iid, void **out)
Definition: vfwcapture.c:518
static HRESULT WINAPI AMVideoProcAmp_Set(IAMVideoProcAmp *iface, LONG property, LONG value, LONG flags)
Definition: vfwcapture.c:554
static HRESULT WINAPI AMVideoProcAmp_Get(IAMVideoProcAmp *iface, LONG property, LONG *value, LONG *flags)
Definition: vfwcapture.c:571

Definition at line 588 of file vfwcapture.c.

Referenced by vfw_capture_create().

◆ IKsPropertySet_VTable

const IKsPropertySetVtbl IKsPropertySet_VTable
static
Initial value:
=
{
}
static HRESULT WINAPI KSP_QueryInterface(IKsPropertySet *iface, REFIID iid, void **out)
Definition: vfwcapture.c:688
static HRESULT WINAPI KSP_Set(IKsPropertySet *iface, REFGUID guidPropSet, DWORD dwPropID, LPVOID pInstanceData, DWORD cbInstanceData, LPVOID pPropData, DWORD cbPropData)
Definition: vfwcapture.c:707
static HRESULT WINAPI KSP_Get(IKsPropertySet *iface, REFGUID guidPropSet, DWORD dwPropID, LPVOID pInstanceData, DWORD cbInstanceData, LPVOID pPropData, DWORD cbPropData, DWORD *pcbReturned)
Definition: vfwcapture.c:716
static ULONG WINAPI KSP_Release(IKsPropertySet *iface)
Definition: vfwcapture.c:700
static ULONG WINAPI KSP_AddRef(IKsPropertySet *iface)
Definition: vfwcapture.c:694
static HRESULT WINAPI KSP_QuerySupported(IKsPropertySet *iface, REFGUID guidPropSet, DWORD dwPropID, DWORD *pTypeSupport)
Definition: vfwcapture.c:741

Definition at line 748 of file vfwcapture.c.

Referenced by vfw_capture_create().

◆ init_once

◆ IPersistPropertyBag_VTable

const IPersistPropertyBagVtbl IPersistPropertyBag_VTable
static
Initial value:
=
{
}
static HRESULT WINAPI PPB_InitNew(IPersistPropertyBag *iface)
Definition: vfwcapture.c:626
static HRESULT WINAPI PPB_QueryInterface(IPersistPropertyBag *iface, REFIID iid, void **out)
Definition: vfwcapture.c:598
static HRESULT WINAPI PPB_GetClassID(IPersistPropertyBag *iface, CLSID *pClassID)
Definition: vfwcapture.c:617
static ULONG WINAPI PPB_AddRef(IPersistPropertyBag *iface)
Definition: vfwcapture.c:604
static ULONG WINAPI PPB_Release(IPersistPropertyBag *iface)
Definition: vfwcapture.c:610
static HRESULT WINAPI PPB_Load(IPersistPropertyBag *iface, IPropertyBag *bag, IErrorLog *error_log)
Definition: vfwcapture.c:635
static HRESULT WINAPI PPB_Save(IPersistPropertyBag *iface, IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties)
Definition: vfwcapture.c:663

Definition at line 671 of file vfwcapture.c.

Referenced by vfw_capture_create().

◆ source_ops

const struct strmbase_source_ops source_ops
static
Initial value:
=
{
.base.pin_query_accept = source_query_accept,
.base.pin_get_media_type = source_get_media_type,
.base.pin_query_interface = source_query_interface,
.pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection,
.pfnDecideBufferSize = VfwPin_DecideBufferSize,
.pfnDecideAllocator = BaseOutputPinImpl_DecideAllocator,
}
HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(struct strmbase_source *pin, IMemInputPin *peer, IMemAllocator **allocator)
Definition: pin.c:680
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *pin, IPin *peer, const AM_MEDIA_TYPE *mt)
Definition: pin.c:710
static HRESULT source_get_media_type(struct strmbase_pin *pin, unsigned int index, AM_MEDIA_TYPE *mt)
Definition: vfwcapture.c:779
static HRESULT source_query_accept(struct strmbase_pin *pin, const AM_MEDIA_TYPE *mt)
Definition: vfwcapture.c:763
static HRESULT WINAPI VfwPin_DecideBufferSize(struct strmbase_source *iface, IMemAllocator *allocator, ALLOCATOR_PROPERTIES *req_props)
Definition: vfwcapture.c:827
static HRESULT source_query_interface(struct strmbase_pin *iface, REFIID iid, void **out)
Definition: vfwcapture.c:812

Definition at line 843 of file vfwcapture.c.

Referenced by vfw_capture_create().