ReactOS 0.4.16-dev-336-gb667d82
transform.c
Go to the documentation of this file.
1/*
2 * Transform Filter (Base for decoders, etc...)
3 *
4 * Copyright 2005 Christian Costa
5 * Copyright 2010 Aric Stewart, CodeWeavers
6 *
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.
11 *
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.
16 *
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
20 */
21#include "config.h"
22#include <stdarg.h>
23
24#define COBJMACROS
25
26#include "windef.h"
27#include "winbase.h"
28#include "dshow.h"
29#include "amvideo.h"
30#include "strmif.h"
31#include "vfw.h"
32
33#include <assert.h>
34
35#include "wine/unicode.h"
36#include "wine/debug.h"
37#include "wine/strmbase.h"
38#include "strmbase_private.h"
39
41
42static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0};
43static const WCHAR wcsOutputPinName[] = {'o','u','t','p','u','t',' ','p','i','n',0};
44
45static const IPinVtbl TransformFilter_InputPin_Vtbl;
46static const IPinVtbl TransformFilter_OutputPin_Vtbl;
47static const IQualityControlVtbl TransformFilter_QualityControl_Vtbl;
48
50{
51 return CONTAINING_RECORD(iface, BaseInputPin, pin);
52}
53
54static inline BasePin *impl_BasePin_from_IPin( IPin *iface )
55{
56 return CONTAINING_RECORD(iface, BasePin, IPin_iface);
57}
58
60{
61 return CONTAINING_RECORD(iface, BaseInputPin, pin.IPin_iface);
62}
63
65{
66 return CONTAINING_RECORD(iface, BaseOutputPin, pin.IPin_iface);
67}
68
70{
71 return CONTAINING_RECORD(iface, TransformFilter, filter.IBaseFilter_iface);
72}
73
75{
77}
78
80{
82 TransformFilter * pTransform;
83
84 TRACE("%p\n", iface);
85 pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
86
87 if (pTransform->pFuncsTable->pfnCheckInputType)
88 return pTransform->pFuncsTable->pfnCheckInputType(pTransform, pmt);
89 /* Assume OK if there's no query method (the connection will fail if
90 needed) */
91 return S_OK;
92}
93
95{
96 HRESULT hr;
97 TransformFilter * pTransform;
98 TRACE("%p\n", This);
99 pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
100
101 EnterCriticalSection(&pTransform->csReceive);
102 if (pTransform->filter.state == State_Stopped)
103 {
104 LeaveCriticalSection(&pTransform->csReceive);
105 return VFW_E_WRONG_STATE;
106 }
107
108 if (This->end_of_stream || This->flushing)
109 {
110 LeaveCriticalSection(&pTransform->csReceive);
111 return S_FALSE;
112 }
113
114 LeaveCriticalSection(&pTransform->csReceive);
115 if (pTransform->pFuncsTable->pfnReceive)
116 hr = pTransform->pFuncsTable->pfnReceive(pTransform, pInSample);
117 else
118 hr = S_FALSE;
119
120 return hr;
121}
122
124{
126 TransformFilter *pTransformFilter = impl_from_IBaseFilter(This->pinInfo.pFilter);
127 AM_MEDIA_TYPE* outpmt = &pTransformFilter->pmt;
128 TRACE("%p\n", iface);
129
130 if (IsEqualIID(&pmt->majortype, &outpmt->majortype)
131 && (IsEqualIID(&pmt->subtype, &outpmt->subtype) || IsEqualIID(&outpmt->subtype, &GUID_NULL)))
132 return S_OK;
133 return S_FALSE;
134}
135
137{
138 TransformFilter *pTransformFilter = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
139 return pTransformFilter->pFuncsTable->pfnDecideBufferSize(pTransformFilter, pAlloc, ppropInputRequest);
140}
141
143{
144 TransformFilter *pTransform = impl_from_IBaseFilter(This->pinInfo.pFilter);
145
146 if (iPosition < 0)
147 return E_INVALIDARG;
148 if (iPosition > 0)
149 return VFW_S_NO_MORE_ITEMS;
150 CopyMediaType(pmt, &pTransform->pmt);
151 return S_OK;
152}
153
155{
157
158 if (pos >= This->npins || pos < 0)
159 return NULL;
160
161 IPin_AddRef(This->ppPins[pos]);
162 return This->ppPins[pos];
163}
164
166{
168
169 return (This->npins+1);
170}
171
175};
176
178 {
180 NULL,
183 },
185};
186
188 {
189 NULL,
193 },
197};
198
199static HRESULT TransformFilter_Init(const IBaseFilterVtbl *pVtbl, const CLSID* pClsid, const TransformFilterFuncTable* pFuncsTable, TransformFilter* pTransformFilter)
200{
201 HRESULT hr;
202 PIN_INFO piInput;
203 PIN_INFO piOutput;
204
205 BaseFilter_Init(&pTransformFilter->filter, pVtbl, pClsid, (DWORD_PTR)(__FILE__ ": TransformFilter.csFilter"), &tfBaseFuncTable);
206
207 InitializeCriticalSection(&pTransformFilter->csReceive);
208 pTransformFilter->csReceive.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__": TransformFilter.csReceive");
209
210 /* pTransformFilter is already allocated */
211 pTransformFilter->pFuncsTable = pFuncsTable;
212 ZeroMemory(&pTransformFilter->pmt, sizeof(pTransformFilter->pmt));
213 pTransformFilter->npins = 2;
214
215 pTransformFilter->ppPins = CoTaskMemAlloc(2 * sizeof(IPin *));
216
217 /* construct input pin */
218 piInput.dir = PINDIR_INPUT;
219 piInput.pFilter = &pTransformFilter->filter.IBaseFilter_iface;
220 lstrcpynW(piInput.achName, wcsInputPinName, sizeof(piInput.achName) / sizeof(piInput.achName[0]));
221 piOutput.dir = PINDIR_OUTPUT;
222 piOutput.pFilter = &pTransformFilter->filter.IBaseFilter_iface;
223 lstrcpynW(piOutput.achName, wcsOutputPinName, sizeof(piOutput.achName) / sizeof(piOutput.achName[0]));
224
226 &tf_input_BaseInputFuncTable, &pTransformFilter->filter.csFilter, NULL, &pTransformFilter->ppPins[0]);
227
228 if (SUCCEEDED(hr))
229 {
230 hr = BaseOutputPin_Construct(&TransformFilter_OutputPin_Vtbl, sizeof(BaseOutputPin), &piOutput, &tf_output_BaseOutputFuncTable, &pTransformFilter->filter.csFilter, &pTransformFilter->ppPins[1]);
231
232 if (FAILED(hr))
233 ERR("Cannot create output pin (%x)\n", hr);
234 else {
235 QualityControlImpl_Create( pTransformFilter->ppPins[0], &pTransformFilter->filter.IBaseFilter_iface, &pTransformFilter->qcimpl);
236 pTransformFilter->qcimpl->IQualityControl_iface.lpVtbl = &TransformFilter_QualityControl_Vtbl;
237 }
238 }
239
240 if (SUCCEEDED(hr))
241 {
242 ISeekingPassThru *passthru;
243 pTransformFilter->seekthru_unk = NULL;
244 hr = CoCreateInstance(&CLSID_SeekingPassThru, (IUnknown *)&pTransformFilter->filter.IBaseFilter_iface, CLSCTX_INPROC_SERVER,
245 &IID_IUnknown, (void **)&pTransformFilter->seekthru_unk);
246 if (SUCCEEDED(hr))
247 {
248 IUnknown_QueryInterface(pTransformFilter->seekthru_unk, &IID_ISeekingPassThru, (void**)&passthru);
249 ISeekingPassThru_Init(passthru, FALSE, pTransformFilter->ppPins[0]);
250 ISeekingPassThru_Release(passthru);
251 }
252 }
253
254 if (FAILED(hr))
255 {
256 CoTaskMemFree(pTransformFilter->ppPins);
258 }
259
260 return hr;
261}
262
263HRESULT TransformFilter_Construct(const IBaseFilterVtbl *pVtbl, LONG filter_size, const CLSID* pClsid, const TransformFilterFuncTable* pFuncsTable, IBaseFilter ** ppTransformFilter)
264{
265 TransformFilter* pTf;
266
267 *ppTransformFilter = NULL;
268
269 assert(filter_size >= sizeof(TransformFilter));
270
271 pTf = CoTaskMemAlloc(filter_size);
272
273 if (!pTf)
274 return E_OUTOFMEMORY;
275
276 ZeroMemory(pTf, filter_size);
277
278 if (SUCCEEDED(TransformFilter_Init(pVtbl, pClsid, pFuncsTable, pTf)))
279 {
280 *ppTransformFilter = &pTf->filter.IBaseFilter_iface;
281 return S_OK;
282 }
283
284 CoTaskMemFree(pTf);
285 return E_FAIL;
286}
287
289{
290 HRESULT hr;
292 TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppv);
293
294 if (IsEqualIID(riid, &IID_IQualityControl)) {
295 *ppv = (IQualityControl*)This->qcimpl;
296 IUnknown_AddRef((IUnknown*)*ppv);
297 return S_OK;
298 }
299 else if (IsEqualIID(riid, &IID_IMediaSeeking) ||
300 IsEqualIID(riid, &IID_IMediaPosition))
301 {
302 return IUnknown_QueryInterface(This->seekthru_unk, riid, ppv);
303 }
305
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));
309
310 return hr;
311}
312
314{
316 ULONG refCount = InterlockedDecrement(&This->filter.refCount);
317
318 TRACE("(%p/%p)->() Release from %d\n", This, iface, refCount + 1);
319
320 if (!refCount)
321 {
322 ULONG i;
323
324 for (i = 0; i < This->npins; i++)
325 {
326 IPin *pConnectedTo;
327
328 if (SUCCEEDED(IPin_ConnectedTo(This->ppPins[i], &pConnectedTo)))
329 {
330 IPin_Disconnect(pConnectedTo);
331 IPin_Release(pConnectedTo);
332 }
333 IPin_Disconnect(This->ppPins[i]);
334
335 IPin_Release(This->ppPins[i]);
336 }
337
338 CoTaskMemFree(This->ppPins);
339
340 TRACE("Destroying transform filter\n");
341 This->csReceive.DebugInfo->Spare[0] = 0;
342 DeleteCriticalSection(&This->csReceive);
343 FreeMediaType(&This->pmt);
345 IUnknown_Release(This->seekthru_unk);
346 BaseFilter_Destroy(&This->filter);
348 }
349 return refCount;
350}
351
355{
357 HRESULT hr = S_OK;
358
359 TRACE("(%p/%p)\n", This, iface);
360
361 EnterCriticalSection(&This->csReceive);
362 {
363 This->filter.state = State_Stopped;
364 if (This->pFuncsTable->pfnStopStreaming)
365 hr = This->pFuncsTable->pfnStopStreaming(This);
366 if (SUCCEEDED(hr))
368 }
369 LeaveCriticalSection(&This->csReceive);
370
371 return hr;
372}
373
375{
377 HRESULT hr;
378
379 TRACE("(%p/%p)->()\n", This, iface);
380
381 EnterCriticalSection(&This->csReceive);
382 {
383 if (This->filter.state == State_Stopped)
384 hr = IBaseFilter_Run(iface, -1);
385 else
386 hr = S_OK;
387
388 if (SUCCEEDED(hr))
389 This->filter.state = State_Paused;
390 }
391 LeaveCriticalSection(&This->csReceive);
392
393 return hr;
394}
395
397{
398 HRESULT hr = S_OK;
400
401 TRACE("(%p/%p)->(%s)\n", This, iface, wine_dbgstr_longlong(tStart));
402
403 EnterCriticalSection(&This->csReceive);
404 {
405 if (This->filter.state == State_Stopped)
406 {
408 if (This->pFuncsTable->pfnStartStreaming)
409 hr = This->pFuncsTable->pfnStartStreaming(This);
410 if (SUCCEEDED(hr))
412 }
413
414 if (SUCCEEDED(hr))
415 {
416 This->filter.rtStreamStart = tStart;
417 This->filter.state = State_Running;
418 }
419 }
420 LeaveCriticalSection(&This->csReceive);
421
422 return hr;
423}
424
426{
427 return QualityControlImpl_Notify((IQualityControl*)iface->qcimpl, sender, qm);
428}
429
433{
435
436 TRACE("(%p/%p)->(%s,%p)\n", This, iface, debugstr_w(Id), ppPin);
437
438 return E_NOTIMPL;
439}
440
442{
444 TransformFilter* pTransform;
445 IPin* ppin;
446 HRESULT hr;
447
448 TRACE("(%p)->()\n", iface);
449
450 /* Since we process samples synchronously, just forward notification downstream */
451 pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
452 if (!pTransform)
453 hr = E_FAIL;
454 else
455 hr = IPin_ConnectedTo(pTransform->ppPins[1], &ppin);
456 if (SUCCEEDED(hr))
457 {
458 hr = IPin_EndOfStream(ppin);
459 IPin_Release(ppin);
460 }
461
462 if (FAILED(hr))
463 ERR("%x\n", hr);
464 return hr;
465}
466
468{
470 TransformFilter* pTransform;
471 HRESULT hr = S_OK;
472
473 TRACE("(%p)->(%p, %p)\n", iface, pReceivePin, pmt);
474
475 pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
476
477 if (pTransform->pFuncsTable->pfnSetMediaType)
478 hr = pTransform->pFuncsTable->pfnSetMediaType(pTransform, PINDIR_INPUT, pmt);
479
480 if (SUCCEEDED(hr) && pTransform->pFuncsTable->pfnCompleteConnect)
481 hr = pTransform->pFuncsTable->pfnCompleteConnect(pTransform, PINDIR_INPUT, pReceivePin);
482
483 if (SUCCEEDED(hr))
484 {
485 hr = BaseInputPinImpl_ReceiveConnection(iface, pReceivePin, pmt);
486 if (FAILED(hr) && pTransform->pFuncsTable->pfnBreakConnect)
487 pTransform->pFuncsTable->pfnBreakConnect(pTransform, PINDIR_INPUT);
488 }
489
490 return hr;
491}
492
494{
496 TransformFilter* pTransform;
497
498 TRACE("(%p)->()\n", iface);
499
500 pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
501 if (pTransform->pFuncsTable->pfnBreakConnect)
502 pTransform->pFuncsTable->pfnBreakConnect(pTransform, PINDIR_INPUT);
503
504 return BasePinImpl_Disconnect(iface);
505}
506
508{
510 TransformFilter* pTransform;
511 HRESULT hr = S_OK;
512
513 TRACE("(%p)->()\n", iface);
514
515 pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
517 if (pTransform->pFuncsTable->pfnBeginFlush)
518 hr = pTransform->pFuncsTable->pfnBeginFlush(pTransform);
519 if (SUCCEEDED(hr))
522 return hr;
523}
524
526{
528 TransformFilter* pTransform;
529 HRESULT hr = S_OK;
530
531 TRACE("(%p)->()\n", iface);
532
533 pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
535 if (pTransform->pFuncsTable->pfnEndFlush)
536 hr = pTransform->pFuncsTable->pfnEndFlush(pTransform);
537 if (SUCCEEDED(hr))
540 return hr;
541}
542
544{
546 TransformFilter* pTransform;
547 HRESULT hr = S_OK;
548
549 TRACE("(%p)->(%s %s %e)\n", iface, wine_dbgstr_longlong(tStart), wine_dbgstr_longlong(tStop), dRate);
550
551 pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
553 if (pTransform->pFuncsTable->pfnNewSegment)
554 hr = pTransform->pFuncsTable->pfnNewSegment(pTransform, tStart, tStop, dRate);
555 if (SUCCEEDED(hr))
556 hr = BaseInputPinImpl_NewSegment(iface, tStart, tStop, dRate);
558 return hr;
559}
560
561static const IPinVtbl TransformFilter_InputPin_Vtbl =
562{
581};
582
583static const IPinVtbl TransformFilter_OutputPin_Vtbl =
584{
603};
604
608
609 if (This->pFuncsTable->pfnNotify)
610 return This->pFuncsTable->pfnNotify(This, sender, qm);
611 else
612 return TransformFilterImpl_Notify(This, sender, qm);
613}
614
615static const IQualityControlVtbl TransformFilter_QualityControl_Vtbl = {
621};
DWORD Id
#define InterlockedDecrement
Definition: armddk.h:52
@ PINDIR_OUTPUT
Definition: axcore.idl:42
@ PINDIR_INPUT
Definition: axcore.idl:41
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERR(fmt,...)
Definition: precomp.h:57
const GUID IID_IUnknown
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49
#define lstrcpynW
Definition: compat.h:738
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define assert(x)
Definition: debug.h:53
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
Definition: axcore.idl:92
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
#define GUID_NULL
Definition: ks.h:106
static void FreeMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: filtergraph.c:692
static HRESULT CopyMediaType(AM_MEDIA_TYPE *pDest, const AM_MEDIA_TYPE *pSrc)
Definition: filtergraph.c:706
long LONG
Definition: pedump.c:60
const GUID IID_IPin
Definition: pincontrol.cpp:15
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
ULONG WINAPI QualityControlImpl_AddRef(IQualityControl *iface)
HRESULT WINAPI QualityControlImpl_Notify(IQualityControl *iface, IBaseFilter *sender, Quality qm)
void QualityControlImpl_Destroy(QualityControlImpl *This)
HRESULT WINAPI QualityControlImpl_QueryInterface(IQualityControl *iface, REFIID riid, void **ppv)
ULONG WINAPI QualityControlImpl_Release(IQualityControl *iface)
HRESULT QualityControlImpl_Create(IPin *input, IBaseFilter *self, QualityControlImpl **ppv)
HRESULT WINAPI QualityControlImpl_SetSink(IQualityControl *iface, IQualityControl *tonotify)
static BaseOutputPin * impl_BaseOutputPin_from_IPin(IPin *iface)
Definition: transform.c:64
static TransformFilter * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: transform.c:69
static const IQualityControlVtbl TransformFilter_QualityControl_Vtbl
Definition: transform.c:47
HRESULT WINAPI TransformFilterImpl_Pause(IBaseFilter *iface)
Definition: transform.c:374
static const BaseInputPinFuncTable tf_input_BaseInputFuncTable
Definition: transform.c:177
static HRESULT WINAPI TransformFilter_InputPin_EndFlush(IPin *iface)
Definition: transform.c:525
HRESULT TransformFilter_Construct(const IBaseFilterVtbl *pVtbl, LONG filter_size, const CLSID *pClsid, const TransformFilterFuncTable *pFuncsTable, IBaseFilter **ppTransformFilter)
Definition: transform.c:263
HRESULT WINAPI TransformFilterImpl_Run(IBaseFilter *iface, REFERENCE_TIME tStart)
Definition: transform.c:396
static BasePin * impl_BasePin_from_IPin(IPin *iface)
Definition: transform.c:54
static const BaseOutputPinFuncTable tf_output_BaseOutputFuncTable
Definition: transform.c:187
static HRESULT WINAPI TransformFilter_InputPin_EndOfStream(IPin *iface)
Definition: transform.c:441
static TransformFilter * impl_from_BaseFilter(BaseFilter *iface)
Definition: transform.c:74
static BaseInputPin * impl_BaseInputPin_from_BasePin(BasePin *iface)
Definition: transform.c:49
static HRESULT WINAPI TransformFilter_InputPin_BeginFlush(IPin *iface)
Definition: transform.c:507
static HRESULT WINAPI TransformFilter_Input_CheckMediaType(BasePin *iface, const AM_MEDIA_TYPE *pmt)
Definition: transform.c:79
HRESULT WINAPI TransformFilterImpl_Stop(IBaseFilter *iface)
Definition: transform.c:354
static const BaseFilterFuncTable tfBaseFuncTable
Definition: transform.c:172
static HRESULT WINAPI TransformFilter_InputPin_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: transform.c:467
static HRESULT WINAPI TransformFilter_InputPin_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
Definition: transform.c:543
static const WCHAR wcsOutputPinName[]
Definition: transform.c:43
HRESULT WINAPI TransformFilterImpl_FindPin(IBaseFilter *iface, LPCWSTR Id, IPin **ppPin)
Definition: transform.c:432
HRESULT WINAPI TransformFilterImpl_Notify(TransformFilter *iface, IBaseFilter *sender, Quality qm)
Definition: transform.c:425
static HRESULT WINAPI TransformFilter_Input_Receive(BaseInputPin *This, IMediaSample *pInSample)
Definition: transform.c:94
ULONG WINAPI TransformFilterImpl_Release(IBaseFilter *iface)
Definition: transform.c:313
static const IPinVtbl TransformFilter_OutputPin_Vtbl
Definition: transform.c:46
static LONG WINAPI TransformFilter_GetPinCount(BaseFilter *iface)
Definition: transform.c:165
HRESULT WINAPI TransformFilterImpl_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv)
Definition: transform.c:288
static BaseInputPin * impl_BaseInputPin_from_IPin(IPin *iface)
Definition: transform.c:59
static HRESULT WINAPI TransformFilter_Output_DecideBufferSize(BaseOutputPin *This, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
Definition: transform.c:136
static HRESULT TransformFilter_Init(const IBaseFilterVtbl *pVtbl, const CLSID *pClsid, const TransformFilterFuncTable *pFuncsTable, TransformFilter *pTransformFilter)
Definition: transform.c:199
static HRESULT WINAPI TransformFilter_Output_GetMediaType(BasePin *This, int iPosition, AM_MEDIA_TYPE *pmt)
Definition: transform.c:142
static IPin *WINAPI TransformFilter_GetPin(BaseFilter *iface, int pos)
Definition: transform.c:154
static HRESULT WINAPI TransformFilter_QualityControlImpl_Notify(IQualityControl *iface, IBaseFilter *sender, Quality qm)
Definition: transform.c:605
static HRESULT WINAPI TransformFilter_InputPin_Disconnect(IPin *iface)
Definition: transform.c:493
static HRESULT WINAPI TransformFilter_Output_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt)
Definition: transform.c:123
static const IPinVtbl TransformFilter_InputPin_Vtbl
Definition: transform.c:45
static const WCHAR wcsInputPinName[]
Definition: transform.c:42
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *pmt)
Definition: pin.c:248
HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin *iface)
Definition: pin.c:988
ULONG WINAPI BaseInputPinImpl_Release(IPin *iface)
Definition: pin.c:868
HRESULT WINAPI BaseInputPinImpl_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:935
HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin *iface, IPin **apPin, ULONG *cPin)
Definition: pin.c:329
HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin *iface)
Definition: pin.c:545
HRESULT WINAPI BasePinImpl_ConnectedTo(IPin *iface, IPin **ppPin)
Definition: pin.c:222
HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
Definition: pin.c:1015
HRESULT WINAPI BasePinImpl_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
Definition: pin.c:338
ULONG WINAPI BaseFilterImpl_Release(IBaseFilter *iface)
Definition: filter.c:64
HRESULT WINAPI BasePinImpl_QueryId(IPin *iface, LPWSTR *Id)
Definition: pin.c:296
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin *This, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:712
HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size, const PIN_INFO *pPinInfo, const BaseInputPinFuncTable *pBaseInputFuncsTable, LPCRITICAL_SECTION pCritSec, IMemAllocator *, IPin **ppPin)
Definition: pin.c:1189
HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin *iface, PIN_INFO *pInfo)
Definition: pin.c:273
HRESULT WINAPI BaseOutputPinImpl_Inactive(BaseOutputPin *This)
Definition: pin.c:634
HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin *iface)
Definition: pin.c:527
HRESULT WINAPI BaseFilter_Destroy(BaseFilter *This)
Definition: filter.c:214
HRESULT WINAPI BaseOutputPinImpl_QueryInterface(IPin *iface, REFIID riid, LPVOID *ppv)
Definition: pin.c:363
HRESULT WINAPI BaseOutputPinImpl_BeginFlush(IPin *iface)
Definition: pin.c:536
HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc)
Definition: pin.c:683
HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv)
Definition: filter.c:37
HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO *pPinInfo, const BaseOutputPinFuncTable *pBaseOutputFuncsTable, LPCRITICAL_SECTION pCritSec, IPin **ppPin)
Definition: pin.c:791
HRESULT WINAPI BaseInputPinImpl_QueryInterface(IPin *iface, REFIID riid, LPVOID *ppv)
Definition: pin.c:838
ULONG WINAPI BaseOutputPinImpl_Release(IPin *iface)
Definition: pin.c:392
HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEnum)
Definition: pin.c:318
HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin *iface)
Definition: pin.c:968
LONG WINAPI BasePinImpl_GetMediaTypeVersion(BasePin *This)
Definition: pin.c:182
HRESULT WINAPI BaseOutputPinImpl_BreakConnect(BaseOutputPin *This)
Definition: pin.c:654
HRESULT WINAPI BasePinImpl_GetMediaType(BasePin *This, int iPosition, AM_MEDIA_TYPE *pmt)
Definition: pin.c:175
HRESULT WINAPI BaseOutputPinImpl_Connect(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:405
HRESULT WINAPI BasePinImpl_Disconnect(IPin *iface)
Definition: pin.c:197
HRESULT WINAPI BasePinImpl_QueryDirection(IPin *iface, PIN_DIRECTION *pPinDir)
Definition: pin.c:285
HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:490
HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:889
HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin *iface)
Definition: pin.c:497
HRESULT WINAPI BaseInputPinImpl_Connect(IPin *iface, IPin *pConnector, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:881
HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin *This)
Definition: pin.c:614
HRESULT WINAPI BaseFilter_Init(BaseFilter *This, const IBaseFilterVtbl *Vtbl, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseFilterFuncTable *pBaseFuncsTable)
Definition: filter.c:196
ULONG WINAPI BasePinImpl_AddRef(IPin *iface)
Definition: pin.c:187
IBaseFilter IBaseFilter_iface
Definition: strmbase.h:163
CRITICAL_SECTION csFilter
Definition: strmbase.h:165
FILTER_STATE state
Definition: strmbase.h:167
BOOL end_of_stream
Definition: strmbase.h:94
IBaseFilter * self
BaseFilter filter
Definition: strmbase.h:213
IPin ** ppPins
Definition: strmbase.h:215
const struct TransformFilterFuncTable * pFuncsTable
Definition: strmbase.h:220
struct QualityControlImpl * qcimpl
Definition: strmbase.h:221
CRITICAL_SECTION csReceive
Definition: strmbase.h:218
AM_MEDIA_TYPE pmt
Definition: strmbase.h:217
IUnknown * seekthru_unk
Definition: strmbase.h:223
DWORD_PTR Spare[8/sizeof(DWORD_PTR)]
Definition: winbase.h:912
PCRITICAL_SECTION_DEBUG DebugInfo
Definition: winbase.h:919
Definition: regsvr.c:104
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
#define DWORD_PTR
Definition: treelist.c:76
uint32_t DWORD_PTR
Definition: typedefs.h:65
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define VFW_E_WRONG_STATE
Definition: vfwmsgs.h:78
#define VFW_S_NO_MORE_ITEMS
Definition: vfwmsgs.h:19
#define ZeroMemory
Definition: winbase.h:1737
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185