82 *
ppv = &
This->filter.IBaseFilter_iface;
85 *
ppv = &
This->filter.IBaseFilter_iface;
88 *
ppv = &
This->filter.IBaseFilter_iface;
132 return IUnknown_QueryInterface(
This->outerUnknown,
riid,
ppv);
138 return IUnknown_AddRef(
This->outerUnknown);
144 return IUnknown_Release(
This->outerUnknown);
152 This->filter.state = State_Stopped;
170 if(
This->filter.state != State_Running) {
174 if (
This->input->pin.pConnectedTo)
175 This->filter.state = State_Running;
188 *ppPin = &
This->input->pin.IPin_iface;
191 }
else if (
lstrcmpW(
Id,
This->capture->pin.pinInfo.achName) == 0) {
192 *ppPin = &
This->capture->pin.IPin_iface;
195 }
else if (
lstrcmpW(
Id,
This->preview->pin.pinInfo.achName) == 0) {
196 *ppPin = &
This->preview->pin.IPin_iface;
230 ret = &
This->input->pin.IPin_iface;
233 ret = &
This->capture->pin.IPin_iface;
236 ret = &
This->preview->pin.IPin_iface;
259 return IBaseFilter_AddRef(&
This->filter.IBaseFilter_iface);
265 return IBaseFilter_Release(&
This->filter.IBaseFilter_iface);
293 TRACE(
"(%p, AM_MEDIA_TYPE(%p))\n",
This, pmt);
311 TRACE(
"(%p)->(%d, %p)\n",
This, iPosition, amt);
315 if (
This->input->pin.pConnectedTo) {
329 BYTE *ptrIn, *ptrOut;
333 hr = IMediaSample_GetTime(inputSample, &
startTime, &endTime);
339 haveStartTime = haveEndTime =
FALSE;
343 hr = IMemAllocator_GetBuffer(
allocator, &outputSample,
346 if (IMediaSample_GetSize(outputSample) < IMediaSample_GetActualDataLength(inputSample)) {
347 ERR(
"insufficient space in sample\n");
352 hr = IMediaSample_SetTime(outputSample, haveStartTime ? &
startTime :
NULL, haveEndTime ? &endTime :
NULL);
355 hr = IMediaSample_GetPointer(inputSample, &ptrIn);
357 hr = IMediaSample_GetPointer(outputSample, &ptrOut);
359 memcpy(ptrOut, ptrIn, IMediaSample_GetActualDataLength(inputSample));
360 IMediaSample_SetActualDataLength(outputSample, IMediaSample_GetActualDataLength(inputSample));
362 hr = IMediaSample_SetDiscontinuity(outputSample, IMediaSample_IsDiscontinuity(inputSample) ==
S_OK);
365 haveStartTime = haveEndTime =
TRUE;
366 hr = IMediaSample_GetMediaTime(inputSample, &
startTime, &endTime);
372 haveStartTime = haveEndTime =
FALSE;
375 hr = IMediaSample_SetMediaTime(outputSample, haveStartTime ? &
startTime :
NULL, haveEndTime ? &endTime :
NULL);
378 hr = IMediaSample_GetMediaType(inputSample, &mediaType);
381 hr = IMediaSample_SetMediaType(outputSample, mediaType);
385 hr = IMediaSample_SetPreroll(outputSample, IMediaSample_IsPreroll(inputSample) ==
S_OK);
388 hr = IMediaSample_SetSyncPoint(outputSample, IMediaSample_IsSyncPoint(inputSample) ==
S_OK);
395 IMediaSample_Release(outputSample);
398 *pOutputSample = outputSample;
409 TRACE(
"(%p)->(%p)\n",
This, inputSample);
418 if (
This->capture->pin.pConnectedTo)
419 hrCapture =
copy_sample(inputSample,
This->capture->pAllocator, &captureSample);
424 IMediaSample_Release(captureSample);
427 if (
This->preview->pin.pConnectedTo)
428 hrPreview =
copy_sample(inputSample,
This->preview->pAllocator, &previewSample);
432 hrPreview = IMediaSample_SetTime(previewSample,
NULL,
NULL);
436 IMediaSample_Release(previewSample);
458 return IBaseFilter_AddRef(&
This->filter.IBaseFilter_iface);
464 return IBaseFilter_Release(&
This->filter.IBaseFilter_iface);
473 if (
This->input->pin.pConnectedTo) {
512 TRACE(
"(%p, %d, %p)\n",
This, iPosition, amt);
513 if (iPosition == 0) {
523 TRACE(
"(%p, %p, %p)\n",
This, pPin, pAlloc);
524 *pAlloc =
This->input->pAllocator;
525 IMemAllocator_AddRef(
This->input->pAllocator);
526 return IMemInputPin_NotifyAllocator(pPin,
This->input->pAllocator,
TRUE);
551 return IBaseFilter_AddRef(&
This->filter.IBaseFilter_iface);
557 return IBaseFilter_Release(&
This->filter.IBaseFilter_iface);
566 if (
This->input->pin.pConnectedTo) {
605 TRACE(
"(%p, %d, %p)\n",
This, iPosition, amt);
606 if (iPosition == 0) {
616 TRACE(
"(%p, %p, %p)\n",
This, pPin, pAlloc);
617 *pAlloc =
This->input->pAllocator;
618 IMemAllocator_AddRef(
This->input->pAllocator);
619 return IMemInputPin_NotifyAllocator(pPin,
This->input->pAllocator,
TRUE);
648 TRACE(
"(%p, %p)\n", outer, phr);
658 This->outerUnknown = outer;
660 This->outerUnknown = &
This->IUnknown_iface;
665 inputPinInfo.pFilter = &
This->filter.IBaseFilter_iface;
671 &IID_IMemAllocator, (
void**)&
This->input->pAllocator);
675 capturePinInfo.pFilter = &
This->filter.IBaseFilter_iface;
681 previewPinInfo.pFilter = &
This->filter.IBaseFilter_iface;
689 return &
This->IUnknown_iface;
694 IBaseFilter_Release(&
This->filter.IBaseFilter_iface);
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
const GUID IID_IBaseFilter
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
static ULONGLONG startTime
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
#define memcpy(s1, s2, n)
static void DeleteMediaType(AM_MEDIA_TYPE *pMediaType)
static HRESULT CopyMediaType(AM_MEDIA_TYPE *pDest, const AM_MEDIA_TYPE *pSrc)
#define IsEqualIID(riid1, riid2)
static HRESULT WINAPI SmartTeeFilter_Pause(IBaseFilter *iface)
static SmartTeeFilter * impl_from_IBaseFilter(IBaseFilter *iface)
static IPin *WINAPI SmartTeeFilter_GetPin(BaseFilter *iface, int pos)
static HRESULT WINAPI SmartTeeFilterPreview_DecideAllocator(BaseOutputPin *base, IMemInputPin *pPin, IMemAllocator **pAlloc)
static HRESULT WINAPI SmartTeeFilter_Stop(IBaseFilter *iface)
static LONG WINAPI SmartTeeFilterPreview_GetMediaTypeVersion(BasePin *base)
static const BaseOutputPinFuncTable SmartTeeFilterPreviewFuncs
static SmartTeeFilter * impl_from_BasePin(BasePin *pin)
static const IPinVtbl SmartTeeFilterCaptureVtbl
static SmartTeeFilter * impl_from_IUnknown(IUnknown *iface)
static HRESULT WINAPI SmartTeeFilter_FindPin(IBaseFilter *iface, LPCWSTR Id, IPin **ppPin)
static ULONG WINAPI Unknown_AddRef(IUnknown *iface)
static LONG WINAPI SmartTeeFilterCapture_GetMediaTypeVersion(BasePin *base)
static ULONG WINAPI SmartTeeFilterCapture_AddRef(IPin *iface)
static const IPinVtbl SmartTeeFilterInputVtbl
static SmartTeeFilter * impl_from_BaseFilter(BaseFilter *filter)
static ULONG WINAPI SmartTeeFilterCapture_Release(IPin *iface)
static HRESULT WINAPI SmartTeeFilterInput_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
static const IUnknownVtbl UnknownVtbl
static HRESULT WINAPI SmartTeeFilterCapture_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
static SmartTeeFilter * impl_from_IPin(IPin *iface)
static HRESULT WINAPI SmartTeeFilter_QueryInterface(IBaseFilter *iface, REFIID riid, void **ppv)
static HRESULT WINAPI SmartTeeFilterCapture_DecideAllocator(BaseOutputPin *base, IMemInputPin *pPin, IMemAllocator **pAlloc)
static const BaseOutputPinFuncTable SmartTeeFilterCaptureFuncs
static const BaseInputPinFuncTable SmartTeeFilterInputFuncs
static ULONG WINAPI SmartTeeFilter_Release(IBaseFilter *iface)
static ULONG WINAPI SmartTeeFilterInput_AddRef(IPin *iface)
IUnknown *WINAPI QCAP_createSmartTeeFilter(IUnknown *outer, HRESULT *phr)
static ULONG WINAPI SmartTeeFilterPreview_Release(IPin *iface)
static HRESULT WINAPI SmartTeeFilterInput_Receive(BaseInputPin *base, IMediaSample *inputSample)
static HRESULT WINAPI SmartTeeFilterPreview_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
static HRESULT WINAPI SmartTeeFilterInput_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *pmt)
static HRESULT WINAPI SmartTeeFilterCapture_BreakConnect(BaseOutputPin *base)
static const BaseFilterFuncTable SmartTeeFilterFuncs
static const IBaseFilterVtbl SmartTeeFilterVtbl
static ULONG WINAPI SmartTeeFilter_AddRef(IBaseFilter *iface)
static HRESULT WINAPI Unknown_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
static LONG WINAPI SmartTeeFilterInput_GetMediaTypeVersion(BasePin *base)
static ULONG WINAPI SmartTeeFilterPreview_AddRef(IPin *iface)
static HRESULT copy_sample(IMediaSample *inputSample, IMemAllocator *allocator, IMediaSample **pOutputSample)
static ULONG WINAPI SmartTeeFilterInput_Release(IPin *iface)
static const IPinVtbl SmartTeeFilterPreviewVtbl
static LONG WINAPI SmartTeeFilter_GetPinCount(BaseFilter *iface)
static ULONG WINAPI Unknown_Release(IUnknown *iface)
static HRESULT WINAPI SmartTeeFilterPreview_BreakConnect(BaseOutputPin *base)
static HRESULT WINAPI SmartTeeFilterPreview_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEnum)
static HRESULT WINAPI SmartTeeFilterCapture_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEnum)
static HRESULT WINAPI SmartTeeFilter_Run(IBaseFilter *iface, REFERENCE_TIME tStart)
HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *pmt)
HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin *iface)
HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter *iface, IReferenceClock *pClock)
ULONG WINAPI BaseInputPinImpl_Release(IPin *iface)
HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin *iface, IPin **apPin, ULONG *cPin)
HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin *iface)
HRESULT WINAPI BasePinImpl_ConnectedTo(IPin *iface, IPin **ppPin)
HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
HRESULT WINAPI BasePinImpl_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter *iface, CLSID *pClsid)
ULONG WINAPI BaseFilterImpl_Release(IBaseFilter *iface)
HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter *iface, FILTER_INFO *pInfo)
HRESULT WINAPI BasePinImpl_QueryId(IPin *iface, LPWSTR *Id)
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin *This, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size, const PIN_INFO *pPinInfo, const BaseInputPinFuncTable *pBaseInputFuncsTable, LPCRITICAL_SECTION pCritSec, IMemAllocator *, IPin **ppPin)
HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin *iface, PIN_INFO *pInfo)
HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin *iface)
ULONG WINAPI BaseFilterImpl_AddRef(IBaseFilter *iface)
HRESULT WINAPI BaseOutputPinImpl_QueryInterface(IPin *iface, REFIID riid, LPVOID *ppv)
HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin *This, IMediaSample *pSample)
HRESULT WINAPI BaseOutputPinImpl_BeginFlush(IPin *iface)
HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter *iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO *pPinInfo, const BaseOutputPinFuncTable *pBaseOutputFuncsTable, LPCRITICAL_SECTION pCritSec, IPin **ppPin)
HRESULT WINAPI BaseInputPinImpl_QueryInterface(IPin *iface, REFIID riid, LPVOID *ppv)
ULONG WINAPI BaseOutputPinImpl_Release(IPin *iface)
HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEnum)
HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter *iface, IFilterGraph *pGraph, LPCWSTR pName)
HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin *iface)
HRESULT WINAPI BaseOutputPinImpl_Connect(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
HRESULT WINAPI BaseFilterImpl_QueryVendorInfo(IBaseFilter *iface, LPWSTR *pVendorInfo)
HRESULT WINAPI BaseFilterImpl_GetSyncSource(IBaseFilter *iface, IReferenceClock **ppClock)
HRESULT WINAPI BasePinImpl_Disconnect(IPin *iface)
HRESULT WINAPI BasePinImpl_QueryDirection(IPin *iface, PIN_DIRECTION *pPinDir)
HRESULT WINAPI BasePinImpl_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt)
HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin *iface)
HRESULT WINAPI BaseInputPinImpl_Connect(IPin *iface, IPin *pConnector, const AM_MEDIA_TYPE *pmt)
HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin *iface)
HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter *iface, IEnumPins **ppEnum)
HRESULT WINAPI BaseFilter_Init(BaseFilter *This, const IBaseFilterVtbl *Vtbl, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseFilterFuncTable *pBaseFuncsTable)
#define CONTAINING_RECORD(address, type, field)
#define VFW_E_SAMPLE_TIME_NOT_SET
#define VFW_E_MEDIA_TIME_NOT_SET
#define VFW_E_TYPE_NOT_ACCEPTED
#define VFW_S_NO_STOP_TIME
#define VFW_E_BUFFER_OVERFLOW
#define VFW_E_NOT_CONNECTED
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)