ReactOS 0.4.17-dev-934-g091855f
samplegrabber.c
Go to the documentation of this file.
1/* DirectShow Sample Grabber object (QEDIT.DLL)
2 *
3 * Copyright 2009 Paul Chitescu
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20#include <assert.h>
21#include <stdarg.h>
22
23#define COBJMACROS
24
25#include "windef.h"
26#include "winbase.h"
27#include "winuser.h"
28#include "ole2.h"
29
30#include "qedit_private.h"
31#include "wine/debug.h"
32
34
36{
39
42
47
53};
54
55enum {
59};
60
62{
63 return CONTAINING_RECORD(iface, struct sample_grabber, filter);
64}
65
67{
69}
70
72{
74}
75
76
77/* Cleanup at end of life */
79{
80 TRACE("(%p)\n", This);
81 if (This->allocator)
82 IMemAllocator_Release(This->allocator);
83 if (This->grabberIface)
84 ISampleGrabberCB_Release(This->grabberIface);
85 FreeMediaType(&This->filter_mt);
86 CoTaskMemFree(This->bufferData);
87}
88
89static struct strmbase_pin *sample_grabber_get_pin(struct strmbase_filter *iface, unsigned int index)
90{
92
93 if (index == 0)
94 return &filter->sink.pin;
95 else if (index == 1)
96 return &filter->source.pin;
97 return NULL;
98}
99
100static void sample_grabber_destroy(struct strmbase_filter *iface)
101{
103
109 free(filter);
110}
111
113{
115
116 if (IsEqualGUID(iid, &IID_ISampleGrabber))
117 *out = &filter->ISampleGrabber_iface;
118 else
119 return E_NOINTERFACE;
120
121 IUnknown_AddRef((IUnknown *)*out);
122 return S_OK;
123}
124
125static const struct strmbase_filter_ops filter_ops =
126{
127 .filter_get_pin = sample_grabber_get_pin,
128 .filter_destroy = sample_grabber_destroy,
129 .filter_query_interface = sample_grabber_query_interface,
130};
131
132/* Helper that buffers data and/or calls installed sample callbacks */
134{
135 double time = 0.0;
136 REFERENCE_TIME tStart, tEnd;
137 if (This->bufferLen >= 0) {
138 BYTE *data = 0;
139 LONG size = IMediaSample_GetActualDataLength(sample);
140 if (size >= 0 && SUCCEEDED(IMediaSample_GetPointer(sample, &data))) {
141 if (!data)
142 size = 0;
143 EnterCriticalSection(&This->filter.filter_cs);
144 if (This->bufferLen != size) {
145 CoTaskMemFree(This->bufferData);
146 This->bufferData = size ? CoTaskMemAlloc(size) : NULL;
147 This->bufferLen = size;
148 }
149 if (size)
150 CopyMemory(This->bufferData, data, size);
151 LeaveCriticalSection(&This->filter.filter_cs);
152 }
153 }
154 if (!This->grabberIface)
155 return;
156 if (SUCCEEDED(IMediaSample_GetTime(sample, &tStart, &tEnd)))
157 time = 1e-7 * tStart;
158 switch (This->grabberMethod) {
159 case 0:
160 {
161 ULONG ref = IMediaSample_AddRef(sample);
162 ISampleGrabberCB_SampleCB(This->grabberIface, time, sample);
163 ref = IMediaSample_Release(sample) + 1 - ref;
164 if (ref)
165 {
166 ERR("(%p) Callback referenced sample %p by %lu\n", This, sample, ref);
167 }
168 }
169 break;
170 case 1:
171 {
172 BYTE *data = 0;
173 LONG size = IMediaSample_GetActualDataLength(sample);
174 if (size && SUCCEEDED(IMediaSample_GetPointer(sample, &data)) && data)
175 ISampleGrabberCB_BufferCB(This->grabberIface, time, data, size);
176 }
177 break;
178 case -1:
179 break;
180 default:
181 FIXME("Unknown method %ld.\n", This->grabberMethod);
182 /* do not bother us again */
183 This->grabberMethod = -1;
184 }
185}
186
187/* IUnknown */
188static HRESULT WINAPI
190{
192 return IUnknown_QueryInterface(filter->filter.outer_unk, riid, ppv);
193}
194
195/* IUnknown */
196static ULONG WINAPI
198{
200 return IUnknown_AddRef(filter->filter.outer_unk);
201}
202
203/* IUnknown */
204static ULONG WINAPI
206{
208 return IUnknown_Release(filter->filter.outer_unk);
209}
210
211/* ISampleGrabber */
212static HRESULT WINAPI
214{
216 TRACE("(%p)->(%u)\n", This, oneShot);
217 This->oneShot = oneShot ? OneShot_Wait : OneShot_None;
218 return S_OK;
219}
220
221/* ISampleGrabber */
223{
225
226 TRACE("filter %p, mt %p.\n", filter, mt);
228
229 if (!mt)
230 return E_POINTER;
231
232 FreeMediaType(&filter->filter_mt);
233 CopyMediaType(&filter->filter_mt, mt);
234 return S_OK;
235}
236
237/* ISampleGrabber */
238static HRESULT WINAPI
240{
242
243 TRACE("filter %p, mt %p.\n", filter, mt);
244
245 if (!mt)
246 return E_POINTER;
247
248 if (!filter->sink.pin.peer)
249 return VFW_E_NOT_CONNECTED;
250
251 CopyMediaType(mt, &filter->sink.pin.mt);
252 return S_OK;
253}
254
255/* ISampleGrabber */
256static HRESULT WINAPI
258{
260 TRACE("(%p)->(%u)\n", This, bufferEm);
261 EnterCriticalSection(&This->filter.filter_cs);
262 if (bufferEm) {
263 if (This->bufferLen < 0)
264 This->bufferLen = 0;
265 }
266 else
267 This->bufferLen = -1;
268 LeaveCriticalSection(&This->filter.filter_cs);
269 return S_OK;
270}
271
272/* ISampleGrabber */
273static HRESULT WINAPI
275{
277 HRESULT ret = S_OK;
278 TRACE("(%p)->(%p, %p)\n", This, bufSize, buffer);
279 if (!bufSize)
280 return E_POINTER;
281 EnterCriticalSection(&This->filter.filter_cs);
282 if (!This->sink.pin.peer)
284 else if (This->bufferLen < 0)
286 else if (This->bufferLen == 0)
288 else {
289 if (buffer) {
290 if (*bufSize >= This->bufferLen)
291 CopyMemory(buffer, This->bufferData, This->bufferLen);
292 else
294 }
295 *bufSize = This->bufferLen;
296 }
297 LeaveCriticalSection(&This->filter.filter_cs);
298 return ret;
299}
300
301/* ISampleGrabber */
302static HRESULT WINAPI
304{
305 /* MS doesn't implement it either, no one should call it */
306 WARN("(%p): not implemented\n", sample);
307 return E_NOTIMPL;
308}
309
310/* ISampleGrabber */
311static HRESULT WINAPI
313{
315
316 TRACE("filter %p, callback %p, method %ld.\n", This, cb, whichMethod);
317
318 if (This->grabberIface)
319 ISampleGrabberCB_Release(This->grabberIface);
320 This->grabberIface = cb;
321 This->grabberMethod = whichMethod;
322 if (cb)
323 ISampleGrabberCB_AddRef(cb);
324 return S_OK;
325}
326
328{
330 return IPin_QueryInterface(&filter->sink.pin.IPin_iface, iid, out);
331}
332
334{
336 return IPin_AddRef(&filter->sink.pin.IPin_iface);
337}
338
340{
342 return IPin_Release(&filter->sink.pin.IPin_iface);
343}
344
345/* IMemInputPin */
346static HRESULT WINAPI
348{
350 TRACE("(%p)->(%p) allocator = %p\n", This, allocator, This->allocator);
351 if (!allocator)
352 return E_POINTER;
353 *allocator = This->allocator;
354 if (!*allocator)
355 return VFW_E_NO_ALLOCATOR;
356 IMemAllocator_AddRef(*allocator);
357 return S_OK;
358}
359
360/* IMemInputPin */
361static HRESULT WINAPI
363{
365 TRACE("(%p)->(%p, %u) allocator = %p\n", This, allocator, readOnly, This->allocator);
366 if (This->allocator == allocator)
367 return S_OK;
368 if (This->allocator)
369 IMemAllocator_Release(This->allocator);
370 This->allocator = allocator;
371 if (allocator)
372 IMemAllocator_AddRef(allocator);
373 return S_OK;
374}
375
376/* IMemInputPin */
377static HRESULT WINAPI
379{
381 FIXME("(%p)->(%p): semi-stub\n", This, props);
382 if (!props)
383 return E_POINTER;
384 return This->source.pMemInputPin ? IMemInputPin_GetAllocatorRequirements(This->source.pMemInputPin, props) : E_NOTIMPL;
385}
386
387/* IMemInputPin */
388static HRESULT WINAPI
390{
392 HRESULT hr;
393 TRACE("(%p)->(%p) output = %p, grabber = %p\n", This, sample, This->source.pMemInputPin, This->grabberIface);
394 if (!sample)
395 return E_POINTER;
396 if (This->oneShot == OneShot_Past)
397 return S_FALSE;
399 hr = This->source.pMemInputPin ? IMemInputPin_Receive(This->source.pMemInputPin, sample) : S_OK;
400 if (This->oneShot == OneShot_Wait) {
401 This->oneShot = OneShot_Past;
402 hr = S_FALSE;
403 if (This->source.pin.peer)
404 IPin_EndOfStream(This->source.pin.peer);
405 }
406 return hr;
407}
408
409/* IMemInputPin */
410static HRESULT WINAPI
412{
414 LONG idx;
415
416 TRACE("filter %p, samples %p, count %lu, ret_count %p.\n", This, samples, nSamples, nProcessed);
417
418 if (!samples || !nProcessed)
419 return E_POINTER;
420 if ((This->filter.state != State_Running) || (This->oneShot == OneShot_Past))
421 return S_FALSE;
422 for (idx = 0; idx < nSamples; idx++)
424 return This->source.pMemInputPin ? IMemInputPin_ReceiveMultiple(This->source.pMemInputPin, samples, nSamples, nProcessed) : S_OK;
425}
426
427/* IMemInputPin */
428static HRESULT WINAPI
430{
432 TRACE("(%p)\n", This);
433 return This->source.pMemInputPin ? IMemInputPin_ReceiveCanBlock(This->source.pMemInputPin) : S_OK;
434}
435
436static const ISampleGrabberVtbl ISampleGrabber_VTable =
437{
448};
449
450static const IMemInputPinVtbl IMemInputPin_VTable =
451{
461};
462
463static struct sample_grabber *impl_from_sink_pin(struct strmbase_pin *iface)
464{
465 return CONTAINING_RECORD(iface, struct sample_grabber, sink.pin);
466}
467
469{
471
472 if (IsEqualGUID(iid, &IID_IMemInputPin))
473 *out = &filter->IMemInputPin_iface;
474 else
475 return E_NOINTERFACE;
476
477 IUnknown_AddRef((IUnknown *)*out);
478 return S_OK;
479}
480
482{
483 if (IsEqualGUID(&filter->filter_mt.majortype, &GUID_NULL))
484 return TRUE;
485 if (!IsEqualGUID(&filter->filter_mt.majortype, &mt->majortype))
486 return FALSE;
487
488 if (IsEqualGUID(&filter->filter_mt.subtype, &GUID_NULL))
489 return TRUE;
490 if (!IsEqualGUID(&filter->filter_mt.subtype, &mt->subtype))
491 return FALSE;
492
493 if (IsEqualGUID(&filter->filter_mt.formattype, &GUID_NULL))
494 return TRUE;
495 if (!IsEqualGUID(&filter->filter_mt.formattype, &mt->formattype))
496 return FALSE;
497
498 return TRUE;
499}
500
502{
504
505 return check_filter_mt(filter, mt) ? S_OK : S_FALSE;
506}
507
509 unsigned int index, AM_MEDIA_TYPE *mt)
510{
512 IEnumMediaTypes *enummt;
513 AM_MEDIA_TYPE *pmt;
514 HRESULT hr;
515
516 if (!filter->source.pin.peer)
517 return VFW_E_NOT_CONNECTED;
518
519 if (FAILED(hr = IPin_EnumMediaTypes(filter->source.pin.peer, &enummt)))
520 return hr;
521
522 if ((!index || IEnumMediaTypes_Skip(enummt, index) == S_OK)
523 && IEnumMediaTypes_Next(enummt, 1, &pmt, NULL) == S_OK)
524 {
525 CopyMediaType(mt, pmt);
526 DeleteMediaType(pmt);
527 IEnumMediaTypes_Release(enummt);
528 return S_OK;
529 }
530
531 IEnumMediaTypes_Release(enummt);
532 return VFW_S_NO_MORE_ITEMS;
533}
534
535static const struct strmbase_sink_ops sink_ops =
536{
537 .base.pin_query_interface = sample_grabber_sink_query_interface,
538 .base.pin_query_accept = sample_grabber_sink_query_accept,
539 .base.pin_get_media_type = sample_grabber_sink_get_media_type,
540};
541
543{
544 return CONTAINING_RECORD(iface, struct sample_grabber, source.pin);
545}
546
548{
550
551 if (IsEqualGUID(iid, &IID_IMediaPosition))
552 *out = &filter->passthrough.IMediaPosition_iface;
553 else if (IsEqualGUID(iid, &IID_IMediaSeeking))
554 *out = &filter->passthrough.IMediaSeeking_iface;
555 else
556 return E_NOINTERFACE;
557
558 IUnknown_AddRef((IUnknown *)*out);
559 return S_OK;
560}
561
563{
565
566 if (filter->sink.pin.peer && IPin_QueryAccept(filter->sink.pin.peer, mt) != S_OK)
567 return S_FALSE;
568
569 return check_filter_mt(filter, mt) ? S_OK : S_FALSE;
570}
571
573 unsigned int index, AM_MEDIA_TYPE *mt)
574{
576 IEnumMediaTypes *enummt;
577 AM_MEDIA_TYPE *pmt;
578 HRESULT hr;
579
580 if (!filter->sink.pin.peer)
581 return VFW_E_NOT_CONNECTED;
582
583 if (FAILED(hr = IPin_EnumMediaTypes(filter->sink.pin.peer, &enummt)))
584 return hr;
585
586 if ((!index || IEnumMediaTypes_Skip(enummt, index) == S_OK)
587 && IEnumMediaTypes_Next(enummt, 1, &pmt, NULL) == S_OK)
588 {
589 CopyMediaType(mt, pmt);
590 DeleteMediaType(pmt);
591 IEnumMediaTypes_Release(enummt);
592 return S_OK;
593 }
594
595 IEnumMediaTypes_Release(enummt);
596 return VFW_S_NO_MORE_ITEMS;
597}
598
600{
601 return !memcmp(a, b, offsetof(AM_MEDIA_TYPE, pbFormat))
602 && !memcmp(a->pbFormat, b->pbFormat, a->cbFormat);
603}
604
607{
609 const AM_MEDIA_TYPE *mt = &iface->pin.mt;
610
611 if (!compare_media_types(mt, &filter->sink.pin.mt))
612 {
614 HRESULT hr;
615
616 if (FAILED(hr = IFilterGraph_QueryInterface(filter->filter.graph,
617 &IID_IFilterGraph2, (void **)&graph)))
618 {
619 ERR("Failed to get IFilterGraph2 interface, hr %#lx.\n", hr);
620 return hr;
621 }
622
623 hr = IFilterGraph2_ReconnectEx(graph, &filter->sink.pin.IPin_iface, mt);
624 IFilterGraph2_Release(graph);
625 return hr;
626 }
627
628 return S_OK;
629}
630
631static const struct strmbase_source_ops source_ops =
632{
633 .base.pin_query_interface = sample_grabber_source_query_interface,
634 .base.pin_query_accept = sample_grabber_source_query_accept,
635 .base.pin_get_media_type = sample_grabber_source_get_media_type,
636 .pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection,
637 .pfnDecideAllocator = sample_grabber_source_DecideAllocator,
638};
639
641{
642 struct sample_grabber *object;
643
644 if (!(object = calloc(1, sizeof(*object))))
645 return E_OUTOFMEMORY;
646
647 strmbase_filter_init(&object->filter, outer, &CLSID_SampleGrabber, &filter_ops);
648 object->ISampleGrabber_iface.lpVtbl = &ISampleGrabber_VTable;
649 object->IMemInputPin_iface.lpVtbl = &IMemInputPin_VTable;
650
651 strmbase_sink_init(&object->sink, &object->filter, L"In", &sink_ops, NULL);
652 wcscpy(object->sink.pin.name, L"Input");
653
654 strmbase_source_init(&object->source, &object->filter, L"Out", &source_ops);
655 wcscpy(object->source.pin.name, L"Output");
656
657 strmbase_passthrough_init(&object->passthrough, (IUnknown *)&object->source.pin.IPin_iface);
658 ISeekingPassThru_Init(&object->passthrough.ISeekingPassThru_iface, FALSE,
659 &object->sink.pin.IPin_iface);
660
661 object->grabberMethod = -1;
662 object->oneShot = OneShot_None;
663 object->bufferLen = -1;
664
665 TRACE("Created sample grabber %p.\n", object);
666 *out = &object->filter.IUnknown_inner;
667 return S_OK;
668}
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define free
Definition: debug_ros.c:5
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static HRESULT sample_grabber_sink_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt)
static struct strmbase_pin * sample_grabber_get_pin(struct strmbase_filter *iface, unsigned int index)
Definition: samplegrabber.c:89
static BOOL compare_media_types(const AM_MEDIA_TYPE *a, const AM_MEDIA_TYPE *b)
static void SampleGrabber_callback(struct sample_grabber *This, IMediaSample *sample)
static const IMemInputPinVtbl IMemInputPin_VTable
static HRESULT WINAPI SampleGrabber_IMemInputPin_ReceiveMultiple(IMemInputPin *iface, IMediaSample **samples, LONG nSamples, LONG *nProcessed)
static HRESULT sample_grabber_source_query_interface(struct strmbase_pin *iface, REFIID iid, void **out)
static HRESULT WINAPI SampleGrabber_ISampleGrabber_GetCurrentSample(ISampleGrabber *iface, IMediaSample **sample)
@ OneShot_Wait
Definition: samplegrabber.c:57
@ OneShot_None
Definition: samplegrabber.c:56
@ OneShot_Past
Definition: samplegrabber.c:58
static ULONG WINAPI SampleGrabber_IMemInputPin_Release(IMemInputPin *iface)
static struct sample_grabber * impl_from_sink_pin(struct strmbase_pin *iface)
HRESULT sample_grabber_create(IUnknown *outer, IUnknown **out)
static ULONG WINAPI SampleGrabber_IMemInputPin_AddRef(IMemInputPin *iface)
static HRESULT WINAPI sample_grabber_source_DecideAllocator(struct strmbase_source *iface, IMemInputPin *peer, IMemAllocator **allocator)
static HRESULT WINAPI SampleGrabber_IMemInputPin_QueryInterface(IMemInputPin *iface, REFIID iid, void **out)
static HRESULT sample_grabber_source_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt)
static HRESULT sample_grabber_sink_query_interface(struct strmbase_pin *iface, REFIID iid, void **out)
static HRESULT WINAPI SampleGrabber_ISampleGrabber_QueryInterface(ISampleGrabber *iface, REFIID riid, void **ppv)
static const ISampleGrabberVtbl ISampleGrabber_VTable
static HRESULT WINAPI SampleGrabber_ISampleGrabber_GetCurrentBuffer(ISampleGrabber *iface, LONG *bufSize, LONG *buffer)
static const struct strmbase_source_ops source_ops
static HRESULT sample_grabber_source_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt)
static ULONG WINAPI SampleGrabber_ISampleGrabber_AddRef(ISampleGrabber *iface)
static const struct strmbase_sink_ops sink_ops
static HRESULT WINAPI SampleGrabber_IMemInputPin_NotifyAllocator(IMemInputPin *iface, IMemAllocator *allocator, BOOL readOnly)
static const struct strmbase_filter_ops filter_ops
static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetOneShot(ISampleGrabber *iface, BOOL oneShot)
static HRESULT sample_grabber_query_interface(struct strmbase_filter *iface, REFIID iid, void **out)
static HRESULT WINAPI SampleGrabber_IMemInputPin_Receive(IMemInputPin *iface, IMediaSample *sample)
static HRESULT WINAPI SampleGrabber_ISampleGrabber_GetConnectedMediaType(ISampleGrabber *iface, AM_MEDIA_TYPE *mt)
static struct sample_grabber * impl_from_ISampleGrabber(ISampleGrabber *iface)
Definition: samplegrabber.c:66
static HRESULT WINAPI SampleGrabber_IMemInputPin_ReceiveCanBlock(IMemInputPin *iface)
static void sample_grabber_destroy(struct strmbase_filter *iface)
static struct sample_grabber * impl_from_source_pin(struct strmbase_pin *iface)
static struct sample_grabber * impl_from_IMemInputPin(IMemInputPin *iface)
Definition: samplegrabber.c:71
static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetBufferSamples(ISampleGrabber *iface, BOOL bufferEm)
static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetCallback(ISampleGrabber *iface, ISampleGrabberCB *cb, LONG whichMethod)
static HRESULT WINAPI SampleGrabber_IMemInputPin_GetAllocatorRequirements(IMemInputPin *iface, ALLOCATOR_PROPERTIES *props)
static ULONG WINAPI SampleGrabber_ISampleGrabber_Release(ISampleGrabber *iface)
static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetMediaType(ISampleGrabber *iface, const AM_MEDIA_TYPE *mt)
static void SampleGrabber_cleanup(struct sample_grabber *This)
Definition: samplegrabber.c:78
static HRESULT sample_grabber_sink_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt)
static HRESULT WINAPI SampleGrabber_IMemInputPin_GetAllocator(IMemInputPin *iface, IMemAllocator **allocator)
static struct sample_grabber * impl_from_strmbase_filter(struct strmbase_filter *iface)
Definition: samplegrabber.c:61
static BOOL check_filter_mt(struct sample_grabber *filter, const AM_MEDIA_TYPE *mt)
unsigned int idx
Definition: utils.c:40
void *WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: malloc.c:381
void WINAPI CoTaskMemFree(void *ptr)
Definition: malloc.c:389
static MonoProfilerRuntimeShutdownBeginCallback cb
Definition: metahost.c:118
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
return ret
Definition: mutex.c:147
#define L(x)
Definition: resources.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizei samples
Definition: glext.h:7006
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
GLuint index
Definition: glext.h:6031
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
GLuint GLsizei bufSize
Definition: glext.h:6040
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define e
Definition: ke_i.h:82
#define GUID_NULL
Definition: ks.h:106
#define CopyMemory
Definition: minwinbase.h:29
__u16 time
Definition: mkdosfs.c:8
static IUnknown * outer
Definition: compobj.c:82
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define calloc
Definition: rosglue.h:14
#define offsetof(TYPE, MEMBER)
wcscpy
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI CopyMediaType(AM_MEDIA_TYPE *pDest, const AM_MEDIA_TYPE *pSrc)
Definition: mediatype.c:150
void WINAPI FreeMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: mediatype.c:165
void strmbase_passthrough_cleanup(struct strmbase_passthrough *passthrough)
Definition: pospass.c:738
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_dump_media_type(const AM_MEDIA_TYPE *mt)
Definition: mediatype.c:58
void strmbase_sink_cleanup(struct strmbase_sink *pin)
Definition: pin.c:1185
void strmbase_sink_init(struct strmbase_sink *pin, struct strmbase_filter *filter, const WCHAR *name, const struct strmbase_sink_ops *ops, IMemAllocator *allocator)
Definition: pin.c:1168
void strmbase_filter_cleanup(struct strmbase_filter *filter)
Definition: filter.c:540
void strmbase_passthrough_init(struct strmbase_passthrough *passthrough, IUnknown *outer)
Definition: pospass.c:725
void strmbase_source_cleanup(struct strmbase_source *pin)
Definition: pin.c:778
void strmbase_filter_init(struct strmbase_filter *filter, IUnknown *outer, const CLSID *clsid, const struct strmbase_filter_ops *func_table)
Definition: filter.c:517
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *pin, IPin *peer, const AM_MEDIA_TYPE *mt)
Definition: pin.c:710
void WINAPI DeleteMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: mediatype.c:193
Definition: filter.c:165
IBaseFilter * filter
Definition: filtergraph.c:75
IMediaSeeking IMediaSeeking_iface
Definition: filter.c:167
Definition: graph.c:32
Definition: send.c:48
IMemAllocator * allocator
Definition: samplegrabber.c:46
ISampleGrabberCB * grabberIface
Definition: samplegrabber.c:48
struct strmbase_passthrough passthrough
Definition: samplegrabber.c:41
IMemInputPin IMemInputPin_iface
Definition: samplegrabber.c:45
AM_MEDIA_TYPE filter_mt
Definition: samplegrabber.c:44
ISampleGrabber ISampleGrabber_iface
Definition: samplegrabber.c:38
Definition: wave.c:25
struct strmbase_pin pin
Definition: strmbase.h:79
#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_E_NO_ALLOCATOR
Definition: vfwmsgs.h:49
#define VFW_S_NO_MORE_ITEMS
Definition: vfwmsgs.h:19
#define VFW_E_NOT_CONNECTED
Definition: vfwmsgs.h:48
static const WCHAR props[]
Definition: wbemdisp.c:288
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:3451
#define E_NOINTERFACE
Definition: winerror.h:3479
#define E_POINTER
Definition: winerror.h:3480
unsigned char BYTE
Definition: xxhash.c:193