27#define V4L_CALL( func, params ) E_NOTIMPL
29#define V4L_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params )
94 return &
filter->source.pin;
109 if (
filter->source.pin.peer)
111 IPin_Disconnect(
filter->source.pin.peer);
112 IPin_Disconnect(&
filter->source.pin.IPin_iface);
114 filter->state_cs.DebugInfo->Spare[0] = 0;
126 *
out = &
filter->IPersistPropertyBag_iface;
131 else if (
IsEqualGUID(iid, &IID_IAMFilterMiscFlags))
132 *
out = &
filter->IAMFilterMiscFlags_iface;
144 return format->bmiHeader.biWidth *
format->bmiHeader.biHeight *
format->bmiHeader.biBitCount / 8;
174 ERR(
"Failed to get sample, hr %#lx.\n",
hr);
186 IMediaSample_Release(
sample);
190 ERR(
"libv4l not implemented: read_frame\n");
196 IMediaSample_Release(
sample);
199 ERR(
"IMemInputPin::Receive() returned %#lx.\n",
hr);
212 if (!
filter->source.pin.peer)
216 ERR(
"Failed to commit allocator, hr %#lx.\n",
hr);
233 if (!
filter->source.pin.peer)
240 ERR(
"start stream failed.\n");
246 ERR(
"libv4l not implemented: start\n");
261 if (!
filter->source.pin.peer)
275 if (!
filter->source.pin.peer)
287 hr = IMemAllocator_Decommit(
filter->source.pAllocator);
289 ERR(
"Failed to decommit allocator, hr %#lx.\n",
hr);
318 return IPin_QueryInterface(&
filter->source.pin.IPin_iface, iid,
out);
324 return IPin_AddRef(&
filter->source.pin.IPin_iface);
330 return IPin_Release(&
filter->source.pin.IPin_iface);
343 if (
This->filter.state != State_Stopped)
345 TRACE(
"Returning not stopped error\n");
351 TRACE(
"pmt is NULL\n");
355 if (!
IsEqualGUID(&pmt->majortype, &MEDIATYPE_Video))
358 if (
This->source.pin.peer)
360 hr = IPin_QueryAccept(
This->source.pin.peer, pmt);
361 TRACE(
"QueryAccept() returned %#lx.\n",
hr);
373 ERR(
"libv4l not implemented: start\n");
378 hr = IFilterGraph_Reconnect(
This->filter.graph, &
This->source.pin.IPin_iface);
380 TRACE(
"Reconnection completed, with new media format..\n");
382 TRACE(
"Returning %#lx.\n",
hr);
399 if (
filter->source.pin.peer)
413 ERR(
"libv4l not implemented: get_format\n");
446 *
size =
sizeof(VIDEO_STREAM_CONFIG_CAPS);
448 ERR(
"libv4l not implemented: get_caps_count\n");
453 *
size =
sizeof(VIDEO_STREAM_CONFIG_CAPS);
472 ERR(
"libv4l not implemented: get_caps_count\n");
476 V4L_CALL( get_caps_count, &count_params );
494 caps_params.
caps = (VIDEO_STREAM_CONFIG_CAPS *)vscc;
497 ERR(
"libv4l not implemented: get_caps\n");
542 TRACE(
"filter %p, property %#lx, min %p, max %p, step %p, default_value %p, flags %p.\n",
547 ERR(
"libv4l not implemented: get_prop_range\n");
564 ERR(
"libv4l not implemented: set_prop\n");
581 ERR(
"libv4l not implemented: get_prop\n");
642 TRACE(
"filter %p, bag %p, error_log %p.\n",
filter, bag, error_log);
645 if (
FAILED(
hr = IPropertyBag_Read(bag,
L"VFWIndex", &
var, error_log)))
652 ERR(
"libv4l not implemented: create\n");
664 BOOL fClearDirty,
BOOL fSaveAllProperties )
691 return IPin_QueryInterface(&
filter->source.pin.IPin_iface, iid,
out);
697 return IPin_AddRef(&
filter->source.pin.IPin_iface);
703 return IPin_Release(&
filter->source.pin.IPin_iface);
711 FIXME(
"%p: stub\n", iface);
724 if (!
IsEqualIID(guidPropSet, &ROPSETID_Pin))
726 if (pPropData ==
NULL && pcbReturned ==
NULL)
729 *pcbReturned =
sizeof(
GUID);
730 if (pPropData ==
NULL)
732 if (cbPropData <
sizeof(
GUID))
735 *pGuid = PIN_CATEGORY_CAPTURE;
736 FIXME(
"() Not adding a pin with PIN_CATEGORY_PREVIEW\n");
744 FIXME(
"%p: stub\n", iface);
772 ERR(
"libv4l not implemented: check_format\n");
796 ERR(
"libv4l not implemented: get_media_type\n");
840 return IMemAllocator_SetProperties(
allocator, req_props, &ret_props);
934 FIXME(
"filter %p, pin %p, frame rate %p: stub.\n",
filter, pin, frame_rate);
944 FIXME(
"filter %p, pin %p, index %ld, dimensions (%ldx%ld), frame rate %p, stub.\n",
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);
993 if (!(
object =
calloc(1,
sizeof(*
object))))
1008 object->state = State_Stopped;
1011 object->state_cs.DebugInfo->Spare[0] = (
DWORD_PTR)(__FILE__
": vfw_capture.state_cs");
1013 TRACE(
"Created VFW capture filter %p.\n",
object);
1014 *
out = &
object->filter.IUnknown_inner;
void destroy(_Tp *__pointer)
@ AM_FILTER_MISC_FLAGS_IS_SOURCE
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
const GUID IID_IKsPropertySet
BOOL get_media_type(const WCHAR *filename, GUID *majortype, GUID *subtype, GUID *source_clsid)
void *WINAPI CoTaskMemAlloc(SIZE_T size)
void WINAPI CoTaskMemFree(void *ptr)
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)
BOOL WINAPI InitOnceExecuteOnce(_Inout_ PINIT_ONCE InitOnce, _In_ __callback PINIT_ONCE_FN InitFn, _Inout_opt_ PVOID Parameter, _Outptr_opt_result_maybenull_ LPVOID *Context)
BOOL WINAPI SleepConditionVariableCS(PCONDITION_VARIABLE ConditionVariable, PCRITICAL_SECTION CriticalSection, DWORD Timeout)
VOID WINAPI InitializeConditionVariable(PCONDITION_VARIABLE ConditionVariable)
BOOL WINAPI InitializeCriticalSectionEx(OUT LPCRITICAL_SECTION lpCriticalSection, IN DWORD dwSpinCount, IN DWORD flags)
VOID WINAPI WakeConditionVariable(PCONDITION_VARIABLE ConditionVariable)
static HRESULT set_format(MMDevice *dev)
static UINT set_prop(MSISUMMARYINFO *si, UINT uiProperty, UINT type, INT iValue, FILETIME *pftValue, awcstring *str)
struct tagVIDEOINFOHEADER VIDEOINFOHEADER
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum const GLfloat * params
static dispex_prop_t * get_prop(jsdisp_t *This, DISPID id)
static GLint image_size(GLint width, GLint height, GLenum format, GLenum type)
static const struct access_res create[16]
static BOOL check_format(LPSTR path, LPSTR inf)
const GUID IID_IPersistPropertyBag
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
UINT64 video_capture_device_t
HRESULT WINAPI CopyMediaType(AM_MEDIA_TYPE *pDest, const AM_MEDIA_TYPE *pSrc)
HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(struct strmbase_source *pin, IMemInputPin *peer, IMemAllocator **allocator)
void strmbase_source_init(struct strmbase_source *pin, struct strmbase_filter *filter, const WCHAR *name, const struct strmbase_source_ops *func_table)
void strmbase_dump_media_type(const AM_MEDIA_TYPE *mt)
void strmbase_filter_cleanup(struct strmbase_filter *filter)
void strmbase_source_cleanup(struct strmbase_source *pin)
void strmbase_filter_init(struct strmbase_filter *filter, IUnknown *outer, const CLSID *clsid, const struct strmbase_filter_ops *func_table)
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *pin, IPin *peer, const AM_MEDIA_TYPE *mt)
video_capture_device_t device
VIDEO_STREAM_CONFIG_CAPS * caps
VideoProcAmpProperty property
VideoProcAmpProperty property
VideoProcAmpProperty property
IPersistPropertyBag IPersistPropertyBag_iface
IAMFilterMiscFlags IAMFilterMiscFlags_iface
IKsPropertySet IKsPropertySet_iface
IAMStreamConfig IAMStreamConfig_iface
IAMVideoProcAmp IAMVideoProcAmp_iface
CONDITION_VARIABLE state_cv
video_capture_device_t device
CRITICAL_SECTION state_cs
IAMVideoControl IAMVideoControl_iface
static const struct pixel_format * get_format(INT pf_index, INT *pf_count)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
#define CONTAINING_RECORD(address, type, field)
static struct vfw_capture * impl_from_strmbase_filter(struct strmbase_filter *iface)
static const IAMStreamConfigVtbl IAMStreamConfig_VTable
static const IKsPropertySetVtbl IKsPropertySet_VTable
static ULONG WINAPI AMVideoProcAmp_AddRef(IAMVideoProcAmp *iface)
static struct vfw_capture * impl_from_IAMVideoControl(IAMVideoControl *iface)
static HRESULT WINAPI PPB_InitNew(IPersistPropertyBag *iface)
static HRESULT WINAPI KSP_QueryInterface(IKsPropertySet *iface, REFIID iid, void **out)
static struct vfw_capture * impl_from_strmbase_pin(struct strmbase_pin *pin)
static HRESULT source_get_media_type(struct strmbase_pin *pin, unsigned int index, AM_MEDIA_TYPE *mt)
static HRESULT vfw_capture_init_stream(struct strmbase_filter *iface)
static struct vfw_capture * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
static struct vfw_capture * impl_from_IAMFilterMiscFlags(IAMFilterMiscFlags *iface)
static HRESULT WINAPI video_control_GetCurrentActualFrameRate(IAMVideoControl *iface, IPin *pin, LONGLONG *frame_rate)
static struct vfw_capture * impl_from_IKsPropertySet(IKsPropertySet *iface)
static HRESULT WINAPI PPB_QueryInterface(IPersistPropertyBag *iface, REFIID iid, void **out)
static HRESULT WINAPI PPB_GetClassID(IPersistPropertyBag *iface, CLSID *pClassID)
static HRESULT source_query_accept(struct strmbase_pin *pin, const AM_MEDIA_TYPE *mt)
static const IAMVideoProcAmpVtbl IAMVideoProcAmp_VTable
static ULONG WINAPI misc_flags_Release(IAMFilterMiscFlags *iface)
static HRESULT WINAPI KSP_Set(IKsPropertySet *iface, REFGUID guidPropSet, DWORD dwPropID, LPVOID pInstanceData, DWORD cbInstanceData, LPVOID pPropData, DWORD cbPropData)
static ULONG WINAPI AMStreamConfig_AddRef(IAMStreamConfig *iface)
static struct vfw_capture * impl_from_IAMVideoProcAmp(IAMVideoProcAmp *iface)
HRESULT vfw_capture_create(IUnknown *outer, IUnknown **out)
static HRESULT WINAPI video_control_GetFrameRateList(IAMVideoControl *iface, IPin *pin, LONG index, SIZE dimensions, LONG *list_size, LONGLONG **frame_rate)
static ULONG WINAPI misc_flags_AddRef(IAMFilterMiscFlags *iface)
static HRESULT vfw_capture_wait_state(struct strmbase_filter *iface, DWORD timeout)
static HRESULT WINAPI AMVideoProcAmp_GetRange(IAMVideoProcAmp *iface, LONG property, LONG *min, LONG *max, LONG *step, LONG *default_value, LONG *flags)
static INIT_ONCE init_once
static HRESULT WINAPI AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt)
static ULONG WINAPI AMVideoProcAmp_Release(IAMVideoProcAmp *iface)
static HRESULT WINAPI KSP_Get(IKsPropertySet *iface, REFGUID guidPropSet, DWORD dwPropID, LPVOID pInstanceData, DWORD cbInstanceData, LPVOID pPropData, DWORD cbPropData, DWORD *pcbReturned)
static HRESULT WINAPI AMVideoProcAmp_QueryInterface(IAMVideoProcAmp *iface, REFIID iid, void **out)
static ULONG WINAPI PPB_AddRef(IPersistPropertyBag *iface)
static ULONG WINAPI AMStreamConfig_Release(IAMStreamConfig *iface)
static void vfw_capture_destroy(struct strmbase_filter *iface)
static HRESULT WINAPI VfwPin_DecideBufferSize(struct strmbase_source *iface, IMemAllocator *allocator, ALLOCATOR_PROPERTIES *req_props)
static HRESULT WINAPI video_control_GetMaxAvailableFrameRate(IAMVideoControl *iface, IPin *pin, LONG index, SIZE dimensions, LONGLONG *frame_rate)
static HRESULT WINAPI video_control_GetCaps(IAMVideoControl *iface, IPin *pin, LONG *flags)
static ULONG WINAPI PPB_Release(IPersistPropertyBag *iface)
static BOOL WINAPI load_capture_funcs(INIT_ONCE *once, void *param, void **context)
static HRESULT WINAPI AMStreamConfig_GetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE **mt)
static HRESULT WINAPI misc_flags_QueryInterface(IAMFilterMiscFlags *iface, REFIID riid, void **ppv)
static HRESULT WINAPI AMVideoProcAmp_Set(IAMVideoProcAmp *iface, LONG property, LONG value, LONG flags)
static const struct strmbase_source_ops source_ops
static HRESULT vfw_capture_stop_stream(struct strmbase_filter *iface)
static ULONG WINAPI KSP_Release(IKsPropertySet *iface)
static HRESULT WINAPI PPB_Load(IPersistPropertyBag *iface, IPropertyBag *bag, IErrorLog *error_log)
static const IAMFilterMiscFlagsVtbl IAMFilterMiscFlags_VTable
static HRESULT WINAPI video_control_SetMode(IAMVideoControl *iface, IPin *pin, LONG mode)
static HRESULT vfw_capture_start_stream(struct strmbase_filter *iface, REFERENCE_TIME time)
static const struct strmbase_filter_ops filter_ops
static const IPersistPropertyBagVtbl IPersistPropertyBag_VTable
static ULONG WINAPI video_control_AddRef(IAMVideoControl *iface)
static HRESULT WINAPI PPB_Save(IPersistPropertyBag *iface, IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties)
static HRESULT WINAPI AMStreamConfig_GetStreamCaps(IAMStreamConfig *iface, int index, AM_MEDIA_TYPE **pmt, BYTE *vscc)
static HRESULT WINAPI AMStreamConfig_GetNumberOfCapabilities(IAMStreamConfig *iface, int *count, int *size)
static DWORD WINAPI stream_thread(void *arg)
static HRESULT WINAPI AMStreamConfig_QueryInterface(IAMStreamConfig *iface, REFIID iid, void **out)
static struct strmbase_pin * vfw_capture_get_pin(struct strmbase_filter *iface, unsigned int index)
#define V4L_CALL(func, params)
static struct vfw_capture * impl_from_IAMStreamConfig(IAMStreamConfig *iface)
static HRESULT WINAPI AMVideoProcAmp_Get(IAMVideoProcAmp *iface, LONG property, LONG *value, LONG *flags)
static ULONG WINAPI misc_flags_GetMiscFlags(IAMFilterMiscFlags *iface)
static HRESULT WINAPI video_control_GetMode(IAMVideoControl *iface, IPin *pin, LONG *mode)
static ULONG WINAPI video_control_Release(IAMVideoControl *iface)
static HRESULT WINAPI video_control_QueryInterface(IAMVideoControl *iface, REFIID riid, void **ppv)
static HRESULT source_query_interface(struct strmbase_pin *iface, REFIID iid, void **out)
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 ULONG WINAPI KSP_AddRef(IKsPropertySet *iface)
static HRESULT vfw_capture_cleanup_stream(struct strmbase_filter *iface)
static const IAMVideoControlVtbl IAMVideoControl_VTable
static HRESULT WINAPI KSP_QuerySupported(IKsPropertySet *iface, REFGUID guidPropSet, DWORD dwPropID, DWORD *pTypeSupport)
#define VFW_E_INVALIDMEDIATYPE
#define E_PROP_SET_UNSUPPORTED
#define VFW_E_NOT_COMMITTED
#define VFW_E_NOT_STOPPED
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
#define __wine_init_unix_call()
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define INIT_ONCE_STATIC_INIT
#define RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO