wbemprox: Implement Win32_CDROMDrive.MediaType.
[wine/wine-gecko.git] / dlls / strmbase / transform.c
blobeba7ad2ee0692a20b20d95fd9677b4bc06dd17d3
1 /*
2 * Transform Filter (Base for decoders, etc...)
4 * Copyright 2005 Christian Costa
5 * Copyright 2010 Aric Stewart, CodeWeavers
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "config.h"
22 #include <stdarg.h>
24 #define COBJMACROS
26 #include "windef.h"
27 #include "winbase.h"
28 #include "dshow.h"
29 #include "amvideo.h"
30 #include "strmif.h"
31 #include "vfw.h"
33 #include <assert.h>
35 #include "wine/unicode.h"
36 #include "wine/debug.h"
37 #include "wine/strmbase.h"
38 #include "strmbase_private.h"
40 WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
42 static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0};
43 static const WCHAR wcsOutputPinName[] = {'o','u','t','p','u','t',' ','p','i','n',0};
45 static const IBaseFilterVtbl TransformFilter_Vtbl;
46 static const IPinVtbl TransformFilter_InputPin_Vtbl;
47 static const IPinVtbl TransformFilter_OutputPin_Vtbl;
48 static const IQualityControlVtbl TransformFilter_QualityControl_Vtbl;
50 static inline BaseInputPin *impl_BaseInputPin_from_BasePin( BasePin *iface )
52 return CONTAINING_RECORD(iface, BaseInputPin, pin);
55 static inline BasePin *impl_BasePin_from_IPin( IPin *iface )
57 return CONTAINING_RECORD(iface, BasePin, IPin_iface);
60 static inline BaseInputPin *impl_BaseInputPin_from_IPin( IPin *iface )
62 return CONTAINING_RECORD(iface, BaseInputPin, pin.IPin_iface);
65 static inline BaseOutputPin *impl_BaseOutputPin_from_IPin( IPin *iface )
67 return CONTAINING_RECORD(iface, BaseOutputPin, pin.IPin_iface);
70 static inline TransformFilter *impl_from_IBaseFilter( IBaseFilter *iface )
72 return CONTAINING_RECORD(iface, TransformFilter, filter.IBaseFilter_iface);
75 static inline TransformFilter *impl_from_BaseFilter( BaseFilter *iface )
77 return CONTAINING_RECORD(iface, TransformFilter, filter);
80 static HRESULT WINAPI TransformFilter_Input_CheckMediaType(BasePin *iface, const AM_MEDIA_TYPE * pmt)
82 BaseInputPin* This = impl_BaseInputPin_from_BasePin(iface);
83 TransformFilter * pTransform;
85 TRACE("%p\n", iface);
86 pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
88 if (pTransform->pFuncsTable->pfnCheckInputType)
89 return pTransform->pFuncsTable->pfnCheckInputType(pTransform, pmt);
90 /* Assume OK if there's no query method (the connection will fail if
91 needed) */
92 return S_OK;
95 static HRESULT WINAPI TransformFilter_Input_Receive(BaseInputPin *This, IMediaSample *pInSample)
97 HRESULT hr = S_FALSE;
98 TransformFilter * pTransform;
99 TRACE("%p\n", This);
100 pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
102 EnterCriticalSection(&pTransform->csReceive);
103 if (pTransform->filter.state == State_Stopped)
105 LeaveCriticalSection(&pTransform->csReceive);
106 return VFW_E_WRONG_STATE;
109 if (This->end_of_stream || This->flushing)
111 LeaveCriticalSection(&pTransform->csReceive);
112 return S_FALSE;
115 LeaveCriticalSection(&pTransform->csReceive);
116 if (pTransform->pFuncsTable->pfnReceive)
117 hr = pTransform->pFuncsTable->pfnReceive(pTransform, pInSample);
118 else
119 hr = S_FALSE;
121 return hr;
124 static HRESULT WINAPI TransformFilter_Output_QueryAccept(IPin *iface, const AM_MEDIA_TYPE * pmt)
126 BasePin *This = impl_BasePin_from_IPin(iface);
127 TransformFilter *pTransformFilter = impl_from_IBaseFilter(This->pinInfo.pFilter);
128 AM_MEDIA_TYPE* outpmt = &pTransformFilter->pmt;
129 TRACE("%p\n", iface);
131 if (IsEqualIID(&pmt->majortype, &outpmt->majortype)
132 && (IsEqualIID(&pmt->subtype, &outpmt->subtype) || IsEqualIID(&outpmt->subtype, &GUID_NULL)))
133 return S_OK;
134 return S_FALSE;
137 static HRESULT WINAPI TransformFilter_Output_DecideBufferSize(BaseOutputPin *This, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
139 TransformFilter *pTransformFilter = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
140 return pTransformFilter->pFuncsTable->pfnDecideBufferSize(pTransformFilter, pAlloc, ppropInputRequest);
143 static HRESULT WINAPI TransformFilter_Output_GetMediaType(BasePin *This, int iPosition, AM_MEDIA_TYPE *pmt)
145 TransformFilter *pTransform = impl_from_IBaseFilter(This->pinInfo.pFilter);
147 if (iPosition < 0)
148 return E_INVALIDARG;
149 if (iPosition > 0)
150 return VFW_S_NO_MORE_ITEMS;
151 CopyMediaType(pmt, &pTransform->pmt);
152 return S_OK;
155 static IPin* WINAPI TransformFilter_GetPin(BaseFilter *iface, int pos)
157 TransformFilter *This = impl_from_BaseFilter(iface);
159 if (pos >= This->npins || pos < 0)
160 return NULL;
162 IPin_AddRef(This->ppPins[pos]);
163 return This->ppPins[pos];
166 static LONG WINAPI TransformFilter_GetPinCount(BaseFilter *iface)
168 TransformFilter *This = impl_from_BaseFilter(iface);
170 return (This->npins+1);
173 static const BaseFilterFuncTable tfBaseFuncTable = {
174 TransformFilter_GetPin,
175 TransformFilter_GetPinCount
178 static const BaseInputPinFuncTable tf_input_BaseInputFuncTable = {
180 TransformFilter_Input_CheckMediaType,
181 NULL,
182 BasePinImpl_GetMediaTypeVersion,
183 BasePinImpl_GetMediaType
185 TransformFilter_Input_Receive
188 static const BaseOutputPinFuncTable tf_output_BaseOutputFuncTable = {
190 NULL,
191 BaseOutputPinImpl_AttemptConnection,
192 BasePinImpl_GetMediaTypeVersion,
193 TransformFilter_Output_GetMediaType
195 TransformFilter_Output_DecideBufferSize,
196 BaseOutputPinImpl_DecideAllocator,
197 BaseOutputPinImpl_BreakConnect
200 static HRESULT TransformFilter_Init(const IBaseFilterVtbl *pVtbl, const CLSID* pClsid, const TransformFilterFuncTable* pFuncsTable, TransformFilter* pTransformFilter)
202 HRESULT hr;
203 PIN_INFO piInput;
204 PIN_INFO piOutput;
206 BaseFilter_Init(&pTransformFilter->filter, pVtbl, pClsid, (DWORD_PTR)(__FILE__ ": TransformFilter.csFilter"), &tfBaseFuncTable);
208 InitializeCriticalSection(&pTransformFilter->csReceive);
209 pTransformFilter->csReceive.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__": TransformFilter.csReceive");
211 /* pTransformFilter is already allocated */
212 pTransformFilter->pFuncsTable = pFuncsTable;
213 ZeroMemory(&pTransformFilter->pmt, sizeof(pTransformFilter->pmt));
214 pTransformFilter->npins = 2;
216 pTransformFilter->ppPins = CoTaskMemAlloc(2 * sizeof(IPin *));
218 /* construct input pin */
219 piInput.dir = PINDIR_INPUT;
220 piInput.pFilter = &pTransformFilter->filter.IBaseFilter_iface;
221 lstrcpynW(piInput.achName, wcsInputPinName, sizeof(piInput.achName) / sizeof(piInput.achName[0]));
222 piOutput.dir = PINDIR_OUTPUT;
223 piOutput.pFilter = &pTransformFilter->filter.IBaseFilter_iface;
224 lstrcpynW(piOutput.achName, wcsOutputPinName, sizeof(piOutput.achName) / sizeof(piOutput.achName[0]));
226 hr = BaseInputPin_Construct(&TransformFilter_InputPin_Vtbl, sizeof(BaseInputPin), &piInput,
227 &tf_input_BaseInputFuncTable, &pTransformFilter->filter.csFilter, NULL, &pTransformFilter->ppPins[0]);
229 if (SUCCEEDED(hr))
231 hr = BaseOutputPin_Construct(&TransformFilter_OutputPin_Vtbl, sizeof(BaseOutputPin), &piOutput, &tf_output_BaseOutputFuncTable, &pTransformFilter->filter.csFilter, &pTransformFilter->ppPins[1]);
233 if (FAILED(hr))
234 ERR("Cannot create output pin (%x)\n", hr);
235 else {
236 QualityControlImpl_Create( pTransformFilter->ppPins[0], &pTransformFilter->filter.IBaseFilter_iface, &pTransformFilter->qcimpl);
237 pTransformFilter->qcimpl->IQualityControl_iface.lpVtbl = &TransformFilter_QualityControl_Vtbl;
241 if (SUCCEEDED(hr))
243 ISeekingPassThru *passthru;
244 pTransformFilter->seekthru_unk = NULL;
245 hr = CoCreateInstance(&CLSID_SeekingPassThru, (IUnknown*)pTransformFilter, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&pTransformFilter->seekthru_unk);
246 if (SUCCEEDED(hr))
248 IUnknown_QueryInterface(pTransformFilter->seekthru_unk, &IID_ISeekingPassThru, (void**)&passthru);
249 ISeekingPassThru_Init(passthru, FALSE, pTransformFilter->ppPins[0]);
250 ISeekingPassThru_Release(passthru);
254 if (FAILED(hr))
256 CoTaskMemFree(pTransformFilter->ppPins);
257 BaseFilterImpl_Release(&pTransformFilter->filter.IBaseFilter_iface);
260 return hr;
263 HRESULT TransformFilter_Construct(const IBaseFilterVtbl *pVtbl, LONG filter_size, const CLSID* pClsid, const TransformFilterFuncTable* pFuncsTable, IBaseFilter ** ppTransformFilter)
265 TransformFilter* pTf;
267 *ppTransformFilter = NULL;
269 assert(filter_size >= sizeof(TransformFilter));
271 pTf = CoTaskMemAlloc(filter_size);
273 if (!pTf)
274 return E_OUTOFMEMORY;
276 ZeroMemory(pTf, filter_size);
278 if (SUCCEEDED(TransformFilter_Init(pVtbl, pClsid, pFuncsTable, pTf)))
280 *ppTransformFilter = &pTf->filter.IBaseFilter_iface;
281 return S_OK;
284 CoTaskMemFree(pTf);
285 return E_FAIL;
288 HRESULT WINAPI TransformFilterImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv)
290 HRESULT hr;
291 TransformFilter *This = impl_from_IBaseFilter(iface);
292 TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppv);
294 if (IsEqualIID(riid, &IID_IQualityControl)) {
295 *ppv = (IQualityControl*)This->qcimpl;
296 IUnknown_AddRef((IUnknown*)*ppv);
297 return S_OK;
299 else if (IsEqualIID(riid, &IID_IMediaSeeking) ||
300 IsEqualIID(riid, &IID_IMediaPosition))
302 return IUnknown_QueryInterface(This->seekthru_unk, riid, ppv);
304 hr = BaseFilterImpl_QueryInterface(iface, riid, ppv);
306 if (FAILED(hr) && !IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid, &IID_IVideoWindow) &&
307 !IsEqualIID(riid, &IID_IAMFilterMiscFlags))
308 FIXME("No interface for %s!\n", debugstr_guid(riid));
310 return hr;
313 ULONG WINAPI TransformFilterImpl_Release(IBaseFilter * iface)
315 TransformFilter *This = impl_from_IBaseFilter(iface);
316 ULONG refCount = BaseFilterImpl_Release(iface);
318 TRACE("(%p/%p)->() Release from %d\n", This, iface, refCount + 1);
320 if (!refCount)
322 ULONG i;
324 for (i = 0; i < This->npins; i++)
326 IPin *pConnectedTo;
328 if (SUCCEEDED(IPin_ConnectedTo(This->ppPins[i], &pConnectedTo)))
330 IPin_Disconnect(pConnectedTo);
331 IPin_Release(pConnectedTo);
333 IPin_Disconnect(This->ppPins[i]);
335 IPin_Release(This->ppPins[i]);
338 CoTaskMemFree(This->ppPins);
340 TRACE("Destroying transform filter\n");
341 This->csReceive.DebugInfo->Spare[0] = 0;
342 DeleteCriticalSection(&This->csReceive);
343 FreeMediaType(&This->pmt);
344 QualityControlImpl_Destroy(This->qcimpl);
345 IUnknown_Release(This->seekthru_unk);
346 CoTaskMemFree(This);
348 return 0;
350 else
351 return refCount;
354 /** IMediaFilter methods **/
356 HRESULT WINAPI TransformFilterImpl_Stop(IBaseFilter * iface)
358 TransformFilter *This = impl_from_IBaseFilter(iface);
359 HRESULT hr = S_OK;
361 TRACE("(%p/%p)\n", This, iface);
363 EnterCriticalSection(&This->csReceive);
365 This->filter.state = State_Stopped;
366 if (This->pFuncsTable->pfnStopStreaming)
367 hr = This->pFuncsTable->pfnStopStreaming(This);
369 LeaveCriticalSection(&This->csReceive);
371 return hr;
374 HRESULT WINAPI TransformFilterImpl_Pause(IBaseFilter * iface)
376 TransformFilter *This = impl_from_IBaseFilter(iface);
377 HRESULT hr;
379 TRACE("(%p/%p)->()\n", This, iface);
381 EnterCriticalSection(&This->csReceive);
383 if (This->filter.state == State_Stopped)
384 hr = IBaseFilter_Run(iface, -1);
385 else
386 hr = S_OK;
388 if (SUCCEEDED(hr))
389 This->filter.state = State_Paused;
391 LeaveCriticalSection(&This->csReceive);
393 return hr;
396 HRESULT WINAPI TransformFilterImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStart)
398 HRESULT hr = S_OK;
399 TransformFilter *This = impl_from_IBaseFilter(iface);
401 TRACE("(%p/%p)->(%s)\n", This, iface, wine_dbgstr_longlong(tStart));
403 EnterCriticalSection(&This->csReceive);
405 if (This->filter.state == State_Stopped)
407 impl_BaseInputPin_from_IPin(This->ppPins[0])->end_of_stream = FALSE;
408 if (This->pFuncsTable->pfnStartStreaming)
409 hr = This->pFuncsTable->pfnStartStreaming(This);
410 if (SUCCEEDED(hr))
411 hr = BaseOutputPinImpl_Active(impl_BaseOutputPin_from_IPin(This->ppPins[1]));
414 if (SUCCEEDED(hr))
416 This->filter.rtStreamStart = tStart;
417 This->filter.state = State_Running;
420 LeaveCriticalSection(&This->csReceive);
422 return hr;
425 HRESULT WINAPI TransformFilterImpl_Notify(TransformFilter *iface, IBaseFilter *sender, Quality qm)
427 return QualityControlImpl_Notify((IQualityControl*)iface->qcimpl, sender, qm);
430 /** IBaseFilter implementation **/
432 HRESULT WINAPI TransformFilterImpl_FindPin(IBaseFilter * iface, LPCWSTR Id, IPin **ppPin)
434 TransformFilter *This = impl_from_IBaseFilter(iface);
436 TRACE("(%p/%p)->(%s,%p)\n", This, iface, debugstr_w(Id), ppPin);
438 return E_NOTIMPL;
441 static const IBaseFilterVtbl TransformFilter_Vtbl =
443 TransformFilterImpl_QueryInterface,
444 BaseFilterImpl_AddRef,
445 TransformFilterImpl_Release,
446 BaseFilterImpl_GetClassID,
447 TransformFilterImpl_Stop,
448 TransformFilterImpl_Pause,
449 TransformFilterImpl_Run,
450 BaseFilterImpl_GetState,
451 BaseFilterImpl_SetSyncSource,
452 BaseFilterImpl_GetSyncSource,
453 BaseFilterImpl_EnumPins,
454 TransformFilterImpl_FindPin,
455 BaseFilterImpl_QueryFilterInfo,
456 BaseFilterImpl_JoinFilterGraph,
457 BaseFilterImpl_QueryVendorInfo
460 static HRESULT WINAPI TransformFilter_InputPin_EndOfStream(IPin * iface)
462 BaseInputPin* This = impl_BaseInputPin_from_IPin(iface);
463 TransformFilter* pTransform;
464 IPin* ppin;
465 HRESULT hr;
467 TRACE("(%p)->()\n", iface);
469 /* Since we process samples synchronously, just forward notification downstream */
470 pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
471 if (!pTransform)
472 hr = E_FAIL;
473 else
474 hr = IPin_ConnectedTo(pTransform->ppPins[1], &ppin);
475 if (SUCCEEDED(hr))
477 hr = IPin_EndOfStream(ppin);
478 IPin_Release(ppin);
481 if (FAILED(hr))
482 ERR("%x\n", hr);
483 return hr;
486 static HRESULT WINAPI TransformFilter_InputPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt)
488 BaseInputPin* This = impl_BaseInputPin_from_IPin(iface);
489 TransformFilter* pTransform;
490 HRESULT hr = S_OK;
492 TRACE("(%p)->(%p, %p)\n", iface, pReceivePin, pmt);
494 pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
496 if (pTransform->pFuncsTable->pfnSetMediaType)
497 hr = pTransform->pFuncsTable->pfnSetMediaType(pTransform, PINDIR_INPUT, pmt);
499 if (SUCCEEDED(hr) && pTransform->pFuncsTable->pfnCompleteConnect)
500 hr = pTransform->pFuncsTable->pfnCompleteConnect(pTransform, PINDIR_INPUT, pReceivePin);
502 if (SUCCEEDED(hr))
504 hr = BaseInputPinImpl_ReceiveConnection(iface, pReceivePin, pmt);
505 if (FAILED(hr) && pTransform->pFuncsTable->pfnBreakConnect)
506 pTransform->pFuncsTable->pfnBreakConnect(pTransform, PINDIR_INPUT);
509 return hr;
512 static HRESULT WINAPI TransformFilter_InputPin_Disconnect(IPin * iface)
514 BaseInputPin* This = impl_BaseInputPin_from_IPin(iface);
515 TransformFilter* pTransform;
517 TRACE("(%p)->()\n", iface);
519 pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
520 if (pTransform->pFuncsTable->pfnBreakConnect)
521 pTransform->pFuncsTable->pfnBreakConnect(pTransform, PINDIR_INPUT);
523 return BasePinImpl_Disconnect(iface);
526 static HRESULT WINAPI TransformFilter_InputPin_BeginFlush(IPin * iface)
528 BaseInputPin* This = impl_BaseInputPin_from_IPin(iface);
529 TransformFilter* pTransform;
530 HRESULT hr = S_OK;
532 TRACE("(%p)->()\n", iface);
534 pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
535 EnterCriticalSection(&pTransform->filter.csFilter);
536 if (pTransform->pFuncsTable->pfnBeginFlush)
537 hr = pTransform->pFuncsTable->pfnBeginFlush(pTransform);
538 if (SUCCEEDED(hr))
539 hr = BaseInputPinImpl_BeginFlush(iface);
540 LeaveCriticalSection(&pTransform->filter.csFilter);
541 return hr;
544 static HRESULT WINAPI TransformFilter_InputPin_EndFlush(IPin * iface)
546 BaseInputPin* This = impl_BaseInputPin_from_IPin(iface);
547 TransformFilter* pTransform;
548 HRESULT hr = S_OK;
550 TRACE("(%p)->()\n", iface);
552 pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
553 EnterCriticalSection(&pTransform->filter.csFilter);
554 if (pTransform->pFuncsTable->pfnEndFlush)
555 hr = pTransform->pFuncsTable->pfnEndFlush(pTransform);
556 if (SUCCEEDED(hr))
557 hr = BaseInputPinImpl_EndFlush(iface);
558 LeaveCriticalSection(&pTransform->filter.csFilter);
559 return hr;
562 static HRESULT WINAPI TransformFilter_InputPin_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
564 BaseInputPin* This = impl_BaseInputPin_from_IPin(iface);
565 TransformFilter* pTransform;
566 HRESULT hr = S_OK;
568 TRACE("(%p)->()\n", iface);
570 pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
571 EnterCriticalSection(&pTransform->filter.csFilter);
572 if (pTransform->pFuncsTable->pfnNewSegment)
573 hr = pTransform->pFuncsTable->pfnNewSegment(pTransform, tStart, tStop, dRate);
574 if (SUCCEEDED(hr))
575 hr = BaseInputPinImpl_NewSegment(iface, tStart, tStop, dRate);
576 LeaveCriticalSection(&pTransform->filter.csFilter);
577 return hr;
580 static const IPinVtbl TransformFilter_InputPin_Vtbl =
582 BaseInputPinImpl_QueryInterface,
583 BasePinImpl_AddRef,
584 BaseInputPinImpl_Release,
585 BaseInputPinImpl_Connect,
586 TransformFilter_InputPin_ReceiveConnection,
587 TransformFilter_InputPin_Disconnect,
588 BasePinImpl_ConnectedTo,
589 BasePinImpl_ConnectionMediaType,
590 BasePinImpl_QueryPinInfo,
591 BasePinImpl_QueryDirection,
592 BasePinImpl_QueryId,
593 BaseInputPinImpl_QueryAccept,
594 BasePinImpl_EnumMediaTypes,
595 BasePinImpl_QueryInternalConnections,
596 TransformFilter_InputPin_EndOfStream,
597 TransformFilter_InputPin_BeginFlush,
598 TransformFilter_InputPin_EndFlush,
599 TransformFilter_InputPin_NewSegment
602 static const IPinVtbl TransformFilter_OutputPin_Vtbl =
604 BaseOutputPinImpl_QueryInterface,
605 BasePinImpl_AddRef,
606 BaseOutputPinImpl_Release,
607 BaseOutputPinImpl_Connect,
608 BaseOutputPinImpl_ReceiveConnection,
609 BaseOutputPinImpl_Disconnect,
610 BasePinImpl_ConnectedTo,
611 BasePinImpl_ConnectionMediaType,
612 BasePinImpl_QueryPinInfo,
613 BasePinImpl_QueryDirection,
614 BasePinImpl_QueryId,
615 TransformFilter_Output_QueryAccept,
616 BasePinImpl_EnumMediaTypes,
617 BasePinImpl_QueryInternalConnections,
618 BaseOutputPinImpl_EndOfStream,
619 BaseOutputPinImpl_BeginFlush,
620 BaseOutputPinImpl_EndFlush,
621 BasePinImpl_NewSegment
624 static HRESULT WINAPI TransformFilter_QualityControlImpl_Notify(IQualityControl *iface, IBaseFilter *sender, Quality qm) {
625 QualityControlImpl *qc = (QualityControlImpl*)iface;
626 TransformFilter *This = impl_from_IBaseFilter(qc->self);
628 if (This->pFuncsTable->pfnNotify)
629 return This->pFuncsTable->pfnNotify(This, sender, qm);
630 else
631 return TransformFilterImpl_Notify(This, sender, qm);
634 static const IQualityControlVtbl TransformFilter_QualityControl_Vtbl = {
635 QualityControlImpl_QueryInterface,
636 QualityControlImpl_AddRef,
637 QualityControlImpl_Release,
638 TransformFilter_QualityControlImpl_Notify,
639 QualityControlImpl_SetSink