ReactOS 0.4.15-dev-8241-g63935f8
samplegrabber.c File Reference
#include <assert.h>
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "qedit_private.h"
#include "wine/debug.h"
#include "wine/strmbase.h"
Include dependency graph for samplegrabber.c:

Go to the source code of this file.

Classes

struct  _ME_Impl
 
struct  _SG_Pin
 
struct  _SG_Impl
 

Macros

#define COBJMACROS
 

Typedefs

typedef struct _ME_Impl ME_Impl
 
typedef struct _SG_Pin SG_Pin
 
typedef struct _SG_Impl SG_Impl
 

Enumerations

enum  { OneShot_None , OneShot_Wait , OneShot_Past }
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (qedit)
 
static IEnumMediaTypesmediaenum_create (const AM_MEDIA_TYPE *mtype, BOOL past)
 
static ME_Implimpl_from_IEnumMediaTypes (IEnumMediaTypes *iface)
 
static HRESULT WINAPI Single_IEnumMediaTypes_QueryInterface (IEnumMediaTypes *iface, REFIID riid, void **ret_iface)
 
static ULONG WINAPI Single_IEnumMediaTypes_AddRef (IEnumMediaTypes *iface)
 
static ULONG WINAPI Single_IEnumMediaTypes_Release (IEnumMediaTypes *iface)
 
static HRESULT WINAPI Single_IEnumMediaTypes_Next (IEnumMediaTypes *iface, ULONG nTypes, AM_MEDIA_TYPE **types, ULONG *fetched)
 
static HRESULT WINAPI Single_IEnumMediaTypes_Skip (IEnumMediaTypes *iface, ULONG nTypes)
 
static HRESULT WINAPI Single_IEnumMediaTypes_Reset (IEnumMediaTypes *iface)
 
static HRESULT WINAPI Single_IEnumMediaTypes_Clone (IEnumMediaTypes *iface, IEnumMediaTypes **me)
 
static SG_Pinimpl_from_IPin (IPin *iface)
 
static SG_Implimpl_from_IUnknown (IUnknown *iface)
 
static SG_Implimpl_from_BaseFilter (BaseFilter *iface)
 
static SG_Implimpl_from_IBaseFilter (IBaseFilter *iface)
 
static SG_Implimpl_from_ISampleGrabber (ISampleGrabber *iface)
 
static SG_Implimpl_from_IMemInputPin (IMemInputPin *iface)
 
static void SampleGrabber_cleanup (SG_Impl *This)
 
static HRESULT WINAPI SampleGrabber_QueryInterface (IUnknown *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI SampleGrabber_AddRef (IUnknown *iface)
 
static ULONG WINAPI SampleGrabber_Release (IUnknown *iface)
 
static IPin *WINAPI SampleGrabber_GetPin (BaseFilter *iface, int pos)
 
static LONG WINAPI SampleGrabber_GetPinCount (BaseFilter *iface)
 
static void SampleGrabber_callback (SG_Impl *This, IMediaSample *sample)
 
static HRESULT WINAPI SampleGrabber_IBaseFilter_QueryInterface (IBaseFilter *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI SampleGrabber_IBaseFilter_AddRef (IBaseFilter *iface)
 
static ULONG WINAPI SampleGrabber_IBaseFilter_Release (IBaseFilter *iface)
 
static HRESULT WINAPI SampleGrabber_IBaseFilter_Stop (IBaseFilter *iface)
 
static HRESULT WINAPI SampleGrabber_IBaseFilter_Pause (IBaseFilter *iface)
 
static HRESULT WINAPI SampleGrabber_IBaseFilter_Run (IBaseFilter *iface, REFERENCE_TIME tStart)
 
static HRESULT WINAPI SampleGrabber_IBaseFilter_FindPin (IBaseFilter *iface, LPCWSTR id, IPin **pin)
 
static HRESULT WINAPI SampleGrabber_IBaseFilter_JoinFilterGraph (IBaseFilter *iface, IFilterGraph *graph, LPCWSTR name)
 
static HRESULT WINAPI SampleGrabber_IBaseFilter_QueryVendorInfo (IBaseFilter *iface, LPWSTR *vendor)
 
static HRESULT WINAPI SampleGrabber_ISampleGrabber_QueryInterface (ISampleGrabber *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI SampleGrabber_ISampleGrabber_AddRef (ISampleGrabber *iface)
 
static ULONG WINAPI SampleGrabber_ISampleGrabber_Release (ISampleGrabber *iface)
 
static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetOneShot (ISampleGrabber *iface, BOOL oneShot)
 
static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetMediaType (ISampleGrabber *iface, const AM_MEDIA_TYPE *type)
 
static HRESULT WINAPI SampleGrabber_ISampleGrabber_GetConnectedMediaType (ISampleGrabber *iface, AM_MEDIA_TYPE *type)
 
static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetBufferSamples (ISampleGrabber *iface, BOOL bufferEm)
 
static HRESULT WINAPI SampleGrabber_ISampleGrabber_GetCurrentBuffer (ISampleGrabber *iface, LONG *bufSize, LONG *buffer)
 
static HRESULT WINAPI SampleGrabber_ISampleGrabber_GetCurrentSample (ISampleGrabber *iface, IMediaSample **sample)
 
static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetCallback (ISampleGrabber *iface, ISampleGrabberCB *cb, LONG whichMethod)
 
static HRESULT WINAPI SampleGrabber_IMemInputPin_QueryInterface (IMemInputPin *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI SampleGrabber_IMemInputPin_AddRef (IMemInputPin *iface)
 
static ULONG WINAPI SampleGrabber_IMemInputPin_Release (IMemInputPin *iface)
 
static HRESULT WINAPI SampleGrabber_IMemInputPin_GetAllocator (IMemInputPin *iface, IMemAllocator **allocator)
 
static HRESULT WINAPI SampleGrabber_IMemInputPin_NotifyAllocator (IMemInputPin *iface, IMemAllocator *allocator, BOOL readOnly)
 
static HRESULT WINAPI SampleGrabber_IMemInputPin_GetAllocatorRequirements (IMemInputPin *iface, ALLOCATOR_PROPERTIES *props)
 
static HRESULT WINAPI SampleGrabber_IMemInputPin_Receive (IMemInputPin *iface, IMediaSample *sample)
 
static HRESULT WINAPI SampleGrabber_IMemInputPin_ReceiveMultiple (IMemInputPin *iface, IMediaSample **samples, LONG nSamples, LONG *nProcessed)
 
static HRESULT WINAPI SampleGrabber_IMemInputPin_ReceiveCanBlock (IMemInputPin *iface)
 
static ULONG WINAPI SampleGrabber_IPin_AddRef (IPin *iface)
 
static ULONG WINAPI SampleGrabber_IPin_Release (IPin *iface)
 
static HRESULT WINAPI SampleGrabber_IPin_QueryInterface (IPin *iface, REFIID riid, void **ppv)
 
static HRESULT WINAPI SampleGrabber_In_IPin_Connect (IPin *iface, IPin *receiver, const AM_MEDIA_TYPE *mtype)
 
static HRESULT WINAPI SampleGrabber_Out_IPin_Connect (IPin *iface, IPin *receiver, const AM_MEDIA_TYPE *type)
 
static HRESULT WINAPI SampleGrabber_In_IPin_ReceiveConnection (IPin *iface, IPin *connector, const AM_MEDIA_TYPE *type)
 
static HRESULT WINAPI SampleGrabber_Out_IPin_ReceiveConnection (IPin *iface, IPin *connector, const AM_MEDIA_TYPE *mtype)
 
static HRESULT WINAPI SampleGrabber_In_IPin_Disconnect (IPin *iface)
 
static HRESULT WINAPI SampleGrabber_Out_IPin_Disconnect (IPin *iface)
 
static HRESULT WINAPI SampleGrabber_IPin_ConnectedTo (IPin *iface, IPin **pin)
 
static HRESULT WINAPI SampleGrabber_IPin_ConnectionMediaType (IPin *iface, AM_MEDIA_TYPE *mtype)
 
static HRESULT WINAPI SampleGrabber_IPin_QueryPinInfo (IPin *iface, PIN_INFO *info)
 
static HRESULT WINAPI SampleGrabber_IPin_QueryDirection (IPin *iface, PIN_DIRECTION *dir)
 
static HRESULT WINAPI SampleGrabber_IPin_QueryId (IPin *iface, LPWSTR *id)
 
static HRESULT WINAPI SampleGrabber_IPin_QueryAccept (IPin *iface, const AM_MEDIA_TYPE *mtype)
 
static HRESULT WINAPI SampleGrabber_IPin_EnumMediaTypes (IPin *iface, IEnumMediaTypes **mtypes)
 
static HRESULT WINAPI SampleGrabber_In_IPin_QueryInternalConnections (IPin *iface, IPin **pins, ULONG *nPins)
 
static HRESULT WINAPI SampleGrabber_Out_IPin_QueryInternalConnections (IPin *iface, IPin **pins, ULONG *nPins)
 
static HRESULT WINAPI SampleGrabber_IPin_EndOfStream (IPin *iface)
 
static HRESULT WINAPI SampleGrabber_IPin_BeginFlush (IPin *iface)
 
static HRESULT WINAPI SampleGrabber_IPin_EndFlush (IPin *iface)
 
static HRESULT WINAPI SampleGrabber_IPin_NewSegment (IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double rate)
 
HRESULT SampleGrabber_create (IUnknown *pUnkOuter, LPVOID *ppv)
 

Variables

static const WCHAR vendor_name [] = { 'W', 'i', 'n', 'e', 0 }
 
static const WCHAR pin_in_name [] = { 'I', 'n', 0 }
 
static const WCHAR pin_out_name [] = { 'O', 'u', 't', 0 }
 
static const IEnumMediaTypesVtbl IEnumMediaTypes_VTable
 
static const IUnknownVtbl samplegrabber_vtbl
 
static const BaseFilterFuncTable basefunc_vtbl
 
static const IBaseFilterVtbl IBaseFilter_VTable
 
static const ISampleGrabberVtbl ISampleGrabber_VTable
 
static const IMemInputPinVtbl IMemInputPin_VTable
 
static const IPinVtbl IPin_In_VTable
 
static const IPinVtbl IPin_Out_VTable
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 23 of file samplegrabber.c.

Typedef Documentation

◆ ME_Impl

◆ SG_Impl

◆ SG_Pin

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
OneShot_None 
OneShot_Wait 
OneShot_Past 

Definition at line 234 of file samplegrabber.c.

234 {
238};
@ OneShot_Wait
@ OneShot_None
@ OneShot_Past

Function Documentation

◆ impl_from_BaseFilter()

static SG_Impl * impl_from_BaseFilter ( BaseFilter iface)
inlinestatic

Definition at line 245 of file samplegrabber.c.

246{
247 return CONTAINING_RECORD(iface, SG_Impl, filter);
248}
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by SampleGrabber_GetPin().

◆ impl_from_IBaseFilter()

◆ impl_from_IEnumMediaTypes()

◆ impl_from_IMemInputPin()

◆ impl_from_IPin()

◆ impl_from_ISampleGrabber()

◆ impl_from_IUnknown()

static SG_Impl * impl_from_IUnknown ( IUnknown iface)
inlinestatic

Definition at line 240 of file samplegrabber.c.

241{
242 return CONTAINING_RECORD(iface, SG_Impl, IUnknown_inner);
243}

Referenced by SampleGrabber_AddRef(), SampleGrabber_QueryInterface(), and SampleGrabber_Release().

◆ mediaenum_create()

static IEnumMediaTypes * mediaenum_create ( const AM_MEDIA_TYPE mtype,
BOOL  past 
)
static

Definition at line 172 of file samplegrabber.c.

173{
174 ME_Impl *obj = CoTaskMemAlloc(sizeof(ME_Impl));
175
176 if (!obj)
177 return NULL;
178 ZeroMemory(obj, sizeof(*obj));
179 obj->IEnumMediaTypes_iface.lpVtbl = &IEnumMediaTypes_VTable;
180 obj->refCount = 1;
181 obj->past = past;
182 if (mtype) {
183 obj->mtype = *mtype;
184 obj->mtype.pUnk = NULL;
185 if (mtype->cbFormat) {
186 obj->mtype.pbFormat = CoTaskMemAlloc(mtype->cbFormat);
187 CopyMemory(obj->mtype.pbFormat, mtype->pbFormat, mtype->cbFormat);
188 }
189 else
190 obj->mtype.pbFormat = NULL;
191 }
192 else
193 obj->mtype.majortype = GUID_NULL;
194
195 return &obj->IEnumMediaTypes_iface;
196}
#define NULL
Definition: types.h:112
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
#define GUID_NULL
Definition: ks.h:106
static const IEnumMediaTypesVtbl IEnumMediaTypes_VTable
#define ZeroMemory
Definition: winbase.h:1712
#define CopyMemory
Definition: winbase.h:1710

Referenced by SampleGrabber_IPin_EnumMediaTypes(), and Single_IEnumMediaTypes_Clone().

◆ SampleGrabber_AddRef()

static ULONG WINAPI SampleGrabber_AddRef ( IUnknown iface)
static

Definition at line 313 of file samplegrabber.c.

314{
316 ULONG ref = BaseFilterImpl_AddRef(&This->filter.IBaseFilter_iface);
317
318 TRACE("(%p) ref=%d\n", This, ref);
319
320 return ref;
321}
static SG_Impl * impl_from_IUnknown(IUnknown *iface)
#define TRACE(s)
Definition: solgame.cpp:4
ULONG WINAPI BaseFilterImpl_AddRef(IBaseFilter *iface)
Definition: filter.c:54
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

◆ SampleGrabber_callback()

static void SampleGrabber_callback ( SG_Impl This,
IMediaSample sample 
)
static

Definition at line 372 of file samplegrabber.c.

373{
374 double time = 0.0;
375 REFERENCE_TIME tStart, tEnd;
376 if (This->bufferLen >= 0) {
377 BYTE *data = 0;
378 LONG size = IMediaSample_GetActualDataLength(sample);
379 if (size >= 0 && SUCCEEDED(IMediaSample_GetPointer(sample, &data))) {
380 if (!data)
381 size = 0;
382 EnterCriticalSection(&This->filter.csFilter);
383 if (This->bufferLen != size) {
384 CoTaskMemFree(This->bufferData);
385 This->bufferData = size ? CoTaskMemAlloc(size) : NULL;
386 This->bufferLen = size;
387 }
388 if (size)
389 CopyMemory(This->bufferData, data, size);
390 LeaveCriticalSection(&This->filter.csFilter);
391 }
392 }
393 if (!This->grabberIface)
394 return;
395 if (SUCCEEDED(IMediaSample_GetTime(sample, &tStart, &tEnd)))
396 time = 1e-7 * tStart;
397 switch (This->grabberMethod) {
398 case 0:
399 {
400 ULONG ref = IMediaSample_AddRef(sample);
401 ISampleGrabberCB_SampleCB(This->grabberIface, time, sample);
402 ref = IMediaSample_Release(sample) + 1 - ref;
403 if (ref)
404 {
405 ERR("(%p) Callback referenced sample %p by %u\n", This, sample, ref);
406 /* ugly as hell but some apps are sooo buggy */
407 while (ref--)
408 IMediaSample_Release(sample);
409 }
410 }
411 break;
412 case 1:
413 {
414 BYTE *data = 0;
415 LONG size = IMediaSample_GetActualDataLength(sample);
416 if (size && SUCCEEDED(IMediaSample_GetPointer(sample, &data)) && data)
417 ISampleGrabberCB_BufferCB(This->grabberIface, time, data, size);
418 }
419 break;
420 case -1:
421 break;
422 default:
423 FIXME("unsupported method %d\n", This->grabberMethod);
424 /* do not bother us again */
425 This->grabberMethod = -1;
426 }
427}
#define FIXME(fmt,...)
Definition: debug.h:114
#define ERR(fmt,...)
Definition: debug.h:113
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define e
Definition: ke_i.h:82
__u16 time
Definition: mkdosfs.c:8
long LONG
Definition: pedump.c:60
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
unsigned char BYTE
Definition: xxhash.c:193

Referenced by SampleGrabber_IMemInputPin_Receive(), and SampleGrabber_IMemInputPin_ReceiveMultiple().

◆ SampleGrabber_cleanup()

static void SampleGrabber_cleanup ( SG_Impl This)
static

Definition at line 267 of file samplegrabber.c.

268{
269 TRACE("(%p)\n", This);
270 if (This->filter.filterInfo.pGraph)
271 WARN("(%p) still joined to filter graph %p\n", This, This->filter.filterInfo.pGraph);
272 if (This->allocator)
273 IMemAllocator_Release(This->allocator);
274 if (This->memOutput)
275 IMemInputPin_Release(This->memOutput);
276 if (This->grabberIface)
277 ISampleGrabberCB_Release(This->grabberIface);
278 CoTaskMemFree(This->mtype.pbFormat);
279 CoTaskMemFree(This->bufferData);
280 if(This->seekthru_unk)
281 IUnknown_Release(This->seekthru_unk);
282}
#define WARN(fmt,...)
Definition: debug.h:115

Referenced by SampleGrabber_Release().

◆ SampleGrabber_create()

HRESULT SampleGrabber_create ( IUnknown pUnkOuter,
LPVOID ppv 
)

Definition at line 1251 of file samplegrabber.c.

1252{
1253 SG_Impl* obj = NULL;
1254 ISeekingPassThru *passthru;
1255 HRESULT hr;
1256
1257 TRACE("(%p,%p)\n", pUnkOuter, ppv);
1258
1259 obj = CoTaskMemAlloc(sizeof(SG_Impl));
1260 if (NULL == obj) {
1261 *ppv = NULL;
1262 return E_OUTOFMEMORY;
1263 }
1264 ZeroMemory(obj, sizeof(SG_Impl));
1265
1266 BaseFilter_Init(&obj->filter, &IBaseFilter_VTable, &CLSID_SampleGrabber,
1267 (DWORD_PTR)(__FILE__ ": SG_Impl.csFilter"), &basefunc_vtbl);
1268 obj->IUnknown_inner.lpVtbl = &samplegrabber_vtbl;
1269 obj->ISampleGrabber_iface.lpVtbl = &ISampleGrabber_VTable;
1270 obj->IMemInputPin_iface.lpVtbl = &IMemInputPin_VTable;
1271 obj->pin_in.IPin_iface.lpVtbl = &IPin_In_VTable;
1272 obj->pin_in.dir = PINDIR_INPUT;
1273 obj->pin_in.name = pin_in_name;
1274 obj->pin_in.sg = obj;
1275 obj->pin_in.pair = NULL;
1276 obj->pin_out.IPin_iface.lpVtbl = &IPin_Out_VTable;
1277 obj->pin_out.dir = PINDIR_OUTPUT;
1278 obj->pin_out.name = pin_out_name;
1279 obj->pin_out.sg = obj;
1280 obj->pin_out.pair = NULL;
1281 obj->mtype.majortype = GUID_NULL;
1282 obj->mtype.subtype = MEDIASUBTYPE_None;
1283 obj->mtype.formattype = FORMAT_None;
1284 obj->allocator = NULL;
1285 obj->memOutput = NULL;
1286 obj->grabberIface = NULL;
1287 obj->grabberMethod = -1;
1288 obj->oneShot = OneShot_None;
1289 obj->bufferLen = -1;
1290 obj->bufferData = NULL;
1291
1292 if (pUnkOuter)
1293 obj->outer_unk = pUnkOuter;
1294 else
1295 obj->outer_unk = &obj->IUnknown_inner;
1296
1297 hr = CoCreateInstance(&CLSID_SeekingPassThru, &obj->IUnknown_inner, CLSCTX_INPROC_SERVER,
1298 &IID_IUnknown, (void**)&obj->seekthru_unk);
1299 if(hr)
1300 return hr;
1301 IUnknown_QueryInterface(obj->seekthru_unk, &IID_ISeekingPassThru, (void**)&passthru);
1302 ISeekingPassThru_Init(passthru, FALSE, &obj->pin_in.IPin_iface);
1303 ISeekingPassThru_Release(passthru);
1304
1305 *ppv = &obj->IUnknown_inner;
1306 return S_OK;
1307}
@ PINDIR_OUTPUT
Definition: axcore.idl:42
@ PINDIR_INPUT
Definition: axcore.idl:41
const GUID IID_IUnknown
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define FALSE
Definition: types.h:117
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
static const BaseFilterFuncTable basefunc_vtbl
static const IMemInputPinVtbl IMemInputPin_VTable
static const IPinVtbl IPin_In_VTable
static const WCHAR pin_in_name[]
Definition: samplegrabber.c:37
static const ISampleGrabberVtbl ISampleGrabber_VTable
static const IBaseFilterVtbl IBaseFilter_VTable
static const WCHAR pin_out_name[]
Definition: samplegrabber.c:38
static const IUnknownVtbl samplegrabber_vtbl
static const IPinVtbl IPin_Out_VTable
HRESULT hr
Definition: shlfolder.c:183
HRESULT WINAPI BaseFilter_Init(BaseFilter *This, const IBaseFilterVtbl *Vtbl, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseFilterFuncTable *pBaseFuncsTable)
Definition: filter.c:196
uint32_t DWORD_PTR
Definition: typedefs.h:65

◆ SampleGrabber_GetPin()

static IPin *WINAPI SampleGrabber_GetPin ( BaseFilter iface,
int  pos 
)
static

Definition at line 345 of file samplegrabber.c.

346{
348 IPin *pin;
349
350 if (pos == 0)
351 pin = &This->pin_in.IPin_iface;
352 else if (pos == 1)
353 pin = &This->pin_out.IPin_iface;
354 else
355 return NULL;
356
357 IPin_AddRef(pin);
358 return pin;
359}
Definition: axcore.idl:92
static SG_Impl * impl_from_BaseFilter(BaseFilter *iface)
Definition: regsvr.c:104

◆ SampleGrabber_GetPinCount()

static LONG WINAPI SampleGrabber_GetPinCount ( BaseFilter iface)
static

Definition at line 361 of file samplegrabber.c.

362{
363 return 2;
364}

◆ SampleGrabber_IBaseFilter_AddRef()

static ULONG WINAPI SampleGrabber_IBaseFilter_AddRef ( IBaseFilter iface)
static

Definition at line 442 of file samplegrabber.c.

443{
445 return IUnknown_AddRef(This->outer_unk);
446}
static SG_Impl * impl_from_IBaseFilter(IBaseFilter *iface)

◆ SampleGrabber_IBaseFilter_FindPin()

static HRESULT WINAPI SampleGrabber_IBaseFilter_FindPin ( IBaseFilter iface,
LPCWSTR  id,
IPin **  pin 
)
static

Definition at line 488 of file samplegrabber.c.

489{
491 TRACE("(%p)->(%s, %p)\n", This, debugstr_w(id), pin);
492 if (!id || !pin)
493 return E_POINTER;
494 if (!lstrcmpiW(id,pin_in_name))
495 {
496 *pin = &This->pin_in.IPin_iface;
497 IPin_AddRef(*pin);
498 return S_OK;
499 }
500 else if (!lstrcmpiW(id,pin_out_name))
501 {
502 *pin = &This->pin_out.IPin_iface;
503 IPin_AddRef(*pin);
504 return S_OK;
505 }
506 *pin = NULL;
507 return VFW_E_NOT_FOUND;
508}
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4261
#define debugstr_w
Definition: kernel32.h:32
#define VFW_E_NOT_FOUND
Definition: vfwmsgs.h:61
#define E_POINTER
Definition: winerror.h:2365

◆ SampleGrabber_IBaseFilter_JoinFilterGraph()

static HRESULT WINAPI SampleGrabber_IBaseFilter_JoinFilterGraph ( IBaseFilter iface,
IFilterGraph graph,
LPCWSTR  name 
)
static

Definition at line 512 of file samplegrabber.c.

513{
515
516 TRACE("(%p)->(%p, %s)\n", This, graph, debugstr_w(name));
517
519 This->oneShot = OneShot_None;
520
521 return S_OK;
522}
HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter *iface, IFilterGraph *pGraph, LPCWSTR pName)
Definition: filter.c:159
Definition: name.c:39

◆ SampleGrabber_IBaseFilter_Pause()

static HRESULT WINAPI SampleGrabber_IBaseFilter_Pause ( IBaseFilter iface)
static

Definition at line 468 of file samplegrabber.c.

469{
471 TRACE("(%p)\n", This);
472 This->filter.state = State_Paused;
473 return S_OK;
474}

◆ SampleGrabber_IBaseFilter_QueryInterface()

static HRESULT WINAPI SampleGrabber_IBaseFilter_QueryInterface ( IBaseFilter iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 434 of file samplegrabber.c.

435{
437 return IUnknown_QueryInterface(This->outer_unk, riid, ppv);
438}
REFIID riid
Definition: atlbase.h:39

◆ SampleGrabber_IBaseFilter_QueryVendorInfo()

static HRESULT WINAPI SampleGrabber_IBaseFilter_QueryVendorInfo ( IBaseFilter iface,
LPWSTR vendor 
)
static

Definition at line 526 of file samplegrabber.c.

527{
528 TRACE("(%p)\n", vendor);
529 if (!vendor)
530 return E_POINTER;
533 return S_OK;
534}
const WCHAR * vendor
Definition: db.cpp:872
static const WCHAR vendor_name[]
Definition: samplegrabber.c:36

◆ SampleGrabber_IBaseFilter_Release()

static ULONG WINAPI SampleGrabber_IBaseFilter_Release ( IBaseFilter iface)
static

Definition at line 450 of file samplegrabber.c.

451{
453 return IUnknown_Release(This->outer_unk);
454}

◆ SampleGrabber_IBaseFilter_Run()

static HRESULT WINAPI SampleGrabber_IBaseFilter_Run ( IBaseFilter iface,
REFERENCE_TIME  tStart 
)
static

Definition at line 478 of file samplegrabber.c.

479{
481 TRACE("(%p)\n", This);
482 This->filter.state = State_Running;
483 return S_OK;
484}

◆ SampleGrabber_IBaseFilter_Stop()

static HRESULT WINAPI SampleGrabber_IBaseFilter_Stop ( IBaseFilter iface)
static

Definition at line 458 of file samplegrabber.c.

459{
461 TRACE("(%p)\n", This);
462 This->filter.state = State_Stopped;
463 return S_OK;
464}

◆ SampleGrabber_IMemInputPin_AddRef()

static ULONG WINAPI SampleGrabber_IMemInputPin_AddRef ( IMemInputPin iface)
static

Definition at line 698 of file samplegrabber.c.

699{
701 return IUnknown_AddRef(This->outer_unk);
702}
static SG_Impl * impl_from_IMemInputPin(IMemInputPin *iface)

◆ SampleGrabber_IMemInputPin_GetAllocator()

static HRESULT WINAPI SampleGrabber_IMemInputPin_GetAllocator ( IMemInputPin iface,
IMemAllocator **  allocator 
)
static

Definition at line 714 of file samplegrabber.c.

715{
717 TRACE("(%p)->(%p) allocator = %p\n", This, allocator, This->allocator);
718 if (!allocator)
719 return E_POINTER;
720 *allocator = This->allocator;
721 if (!*allocator)
722 return VFW_E_NO_ALLOCATOR;
723 IMemAllocator_AddRef(*allocator);
724 return S_OK;
725}
#define VFW_E_NO_ALLOCATOR
Definition: vfwmsgs.h:49

◆ SampleGrabber_IMemInputPin_GetAllocatorRequirements()

static HRESULT WINAPI SampleGrabber_IMemInputPin_GetAllocatorRequirements ( IMemInputPin iface,
ALLOCATOR_PROPERTIES props 
)
static

Definition at line 745 of file samplegrabber.c.

746{
748 FIXME("(%p)->(%p): semi-stub\n", This, props);
749 if (!props)
750 return E_POINTER;
751 return This->memOutput ? IMemInputPin_GetAllocatorRequirements(This->memOutput, props) : E_NOTIMPL;
752}
#define E_NOTIMPL
Definition: ddrawi.h:99
static const WCHAR props[]
Definition: wbemdisp.c:288

◆ SampleGrabber_IMemInputPin_NotifyAllocator()

static HRESULT WINAPI SampleGrabber_IMemInputPin_NotifyAllocator ( IMemInputPin iface,
IMemAllocator allocator,
BOOL  readOnly 
)
static

Definition at line 729 of file samplegrabber.c.

730{
732 TRACE("(%p)->(%p, %u) allocator = %p\n", This, allocator, readOnly, This->allocator);
733 if (This->allocator == allocator)
734 return S_OK;
735 if (This->allocator)
736 IMemAllocator_Release(This->allocator);
737 This->allocator = allocator;
738 if (allocator)
739 IMemAllocator_AddRef(allocator);
740 return S_OK;
741}

◆ SampleGrabber_IMemInputPin_QueryInterface()

static HRESULT WINAPI SampleGrabber_IMemInputPin_QueryInterface ( IMemInputPin iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 690 of file samplegrabber.c.

691{
693 return IUnknown_QueryInterface(This->outer_unk, riid, ppv);
694}

◆ SampleGrabber_IMemInputPin_Receive()

static HRESULT WINAPI SampleGrabber_IMemInputPin_Receive ( IMemInputPin iface,
IMediaSample sample 
)
static

Definition at line 756 of file samplegrabber.c.

757{
759 HRESULT hr;
760 TRACE("(%p)->(%p) output = %p, grabber = %p\n", This, sample, This->memOutput, This->grabberIface);
761 if (!sample)
762 return E_POINTER;
763 if (This->oneShot == OneShot_Past)
764 return S_FALSE;
766 hr = This->memOutput ? IMemInputPin_Receive(This->memOutput, sample) : S_OK;
767 if (This->oneShot == OneShot_Wait) {
768 This->oneShot = OneShot_Past;
769 hr = S_FALSE;
770 if (This->pin_out.pair)
771 IPin_EndOfStream(This->pin_out.pair);
772 }
773 return hr;
774}
static void SampleGrabber_callback(SG_Impl *This, IMediaSample *sample)
#define S_FALSE
Definition: winerror.h:2357

◆ SampleGrabber_IMemInputPin_ReceiveCanBlock()

static HRESULT WINAPI SampleGrabber_IMemInputPin_ReceiveCanBlock ( IMemInputPin iface)
static

Definition at line 794 of file samplegrabber.c.

795{
797 TRACE("(%p)\n", This);
798 return This->memOutput ? IMemInputPin_ReceiveCanBlock(This->memOutput) : S_OK;
799}

◆ SampleGrabber_IMemInputPin_ReceiveMultiple()

static HRESULT WINAPI SampleGrabber_IMemInputPin_ReceiveMultiple ( IMemInputPin iface,
IMediaSample **  samples,
LONG  nSamples,
LONG nProcessed 
)
static

Definition at line 778 of file samplegrabber.c.

779{
781 LONG idx;
782 TRACE("(%p)->(%p, %u, %p) output = %p, grabber = %p\n", This, samples, nSamples, nProcessed, This->memOutput, This->grabberIface);
783 if (!samples || !nProcessed)
784 return E_POINTER;
785 if ((This->filter.state != State_Running) || (This->oneShot == OneShot_Past))
786 return S_FALSE;
787 for (idx = 0; idx < nSamples; idx++)
789 return This->memOutput ? IMemInputPin_ReceiveMultiple(This->memOutput, samples, nSamples, nProcessed) : S_OK;
790}
unsigned int idx
Definition: utils.c:41
GLsizei samples
Definition: glext.h:7006

◆ SampleGrabber_IMemInputPin_Release()

static ULONG WINAPI SampleGrabber_IMemInputPin_Release ( IMemInputPin iface)
static

Definition at line 706 of file samplegrabber.c.

707{
709 return IUnknown_Release(This->outer_unk);
710}

◆ SampleGrabber_In_IPin_Connect()

static HRESULT WINAPI SampleGrabber_In_IPin_Connect ( IPin iface,
IPin receiver,
const AM_MEDIA_TYPE mtype 
)
static

Definition at line 847 of file samplegrabber.c.

848{
849 WARN("(%p, %p): unexpected\n", receiver, mtype);
850 return E_UNEXPECTED;
851}
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ SampleGrabber_In_IPin_Disconnect()

static HRESULT WINAPI SampleGrabber_In_IPin_Disconnect ( IPin iface)
static

Definition at line 959 of file samplegrabber.c.

960{
961 SG_Pin *This = impl_from_IPin(iface);
962
963 TRACE("(%p)->() pair = %p\n", This, This->pair);
964 if (This->sg->filter.state != State_Stopped)
965 return VFW_E_NOT_STOPPED;
966 if (This->pair) {
967 This->pair = NULL;
968 return S_OK;
969 }
970 return S_FALSE;
971}
static SG_Pin * impl_from_IPin(IPin *iface)
#define VFW_E_NOT_STOPPED
Definition: vfwmsgs.h:75

◆ SampleGrabber_In_IPin_QueryInternalConnections()

static HRESULT WINAPI SampleGrabber_In_IPin_QueryInternalConnections ( IPin iface,
IPin **  pins,
ULONG nPins 
)
static

Definition at line 1097 of file samplegrabber.c.

1098{
1099 SG_Pin *This = impl_from_IPin(iface);
1100
1101 TRACE("(%p)->(%p, %p) size = %u\n", This, pins, nPins, (nPins ? *nPins : 0));
1102 if (!nPins)
1103 return E_POINTER;
1104 if (*nPins) {
1105 if (!pins)
1106 return E_POINTER;
1107 IPin_AddRef(&This->sg->pin_out.IPin_iface);
1108 *pins = &This->sg->pin_out.IPin_iface;
1109 *nPins = 1;
1110 return S_OK;
1111 }
1112 *nPins = 1;
1113 return S_FALSE;
1114}

◆ SampleGrabber_In_IPin_ReceiveConnection()

static HRESULT WINAPI SampleGrabber_In_IPin_ReceiveConnection ( IPin iface,
IPin connector,
const AM_MEDIA_TYPE type 
)
static

Definition at line 904 of file samplegrabber.c.

905{
906 SG_Pin *This = impl_from_IPin(iface);
907
908 TRACE("(%p)->(%p, %p)\n", This, connector, type);
909 if (!connector)
910 return E_POINTER;
911 if (This->pair)
913 if (This->sg->filter.state != State_Stopped)
914 return VFW_E_NOT_STOPPED;
915 if (type) {
916 TRACE("Media type: %s/%s ssize: %u format: %s (%u bytes)\n",
917 debugstr_guid(&type->majortype), debugstr_guid(&type->subtype),
918 type->lSampleSize,
919 debugstr_guid(&type->formattype), type->cbFormat);
920 if (!IsEqualGUID(&type->formattype, &FORMAT_None) &&
921 !IsEqualGUID(&type->formattype, &GUID_NULL) &&
922 !type->pbFormat)
924 if (!IsEqualGUID(&This->sg->mtype.majortype,&GUID_NULL) &&
925 !IsEqualGUID(&This->sg->mtype.majortype,&type->majortype))
927 if (!IsEqualGUID(&This->sg->mtype.subtype,&MEDIASUBTYPE_None) &&
928 !IsEqualGUID(&This->sg->mtype.subtype,&type->subtype))
930 if (!IsEqualGUID(&This->sg->mtype.formattype,&GUID_NULL) &&
931 !IsEqualGUID(&This->sg->mtype.formattype,&FORMAT_None) &&
932 !IsEqualGUID(&This->sg->mtype.formattype,&type->formattype))
934 CoTaskMemFree(This->sg->mtype.pbFormat);
935 This->sg->mtype = *type;
936 This->sg->mtype.pUnk = NULL;
937 if (type->cbFormat) {
938 This->sg->mtype.pbFormat = CoTaskMemAlloc(type->cbFormat);
939 CopyMemory(This->sg->mtype.pbFormat, type->pbFormat, type->cbFormat);
940 }
941 else
942 This->sg->mtype.pbFormat = NULL;
943 }
944 This->pair = connector;
945 TRACE("(%p) Accepted IPin %p\n", This, connector);
946 return S_OK;
947}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define VFW_E_ALREADY_CONNECTED
Definition: vfwmsgs.h:43
#define VFW_E_INVALIDMEDIATYPE
Definition: vfwmsgs.h:39
#define VFW_E_TYPE_NOT_ACCEPTED
Definition: vfwmsgs.h:81

◆ SampleGrabber_IPin_AddRef()

static ULONG WINAPI SampleGrabber_IPin_AddRef ( IPin iface)
static

Definition at line 806 of file samplegrabber.c.

807{
808 SG_Pin *This = impl_from_IPin(iface);
809 return ISampleGrabber_AddRef(&This->sg->ISampleGrabber_iface);
810}

◆ SampleGrabber_IPin_BeginFlush()

static HRESULT WINAPI SampleGrabber_IPin_BeginFlush ( IPin iface)
static

Definition at line 1136 of file samplegrabber.c.

1137{
1138 FIXME(": stub\n");
1139 return S_OK;
1140}

◆ SampleGrabber_IPin_ConnectedTo()

static HRESULT WINAPI SampleGrabber_IPin_ConnectedTo ( IPin iface,
IPin **  pin 
)
static

Definition at line 995 of file samplegrabber.c.

996{
997 SG_Pin *This = impl_from_IPin(iface);
998
999 TRACE("(%p)->(%p) pair = %p\n", This, pin, This->pair);
1000 if (!pin)
1001 return E_POINTER;
1002 *pin = This->pair;
1003 if (*pin) {
1004 IPin_AddRef(*pin);
1005 return S_OK;
1006 }
1007 return VFW_E_NOT_CONNECTED;
1008}
#define VFW_E_NOT_CONNECTED
Definition: vfwmsgs.h:48

◆ SampleGrabber_IPin_ConnectionMediaType()

static HRESULT WINAPI SampleGrabber_IPin_ConnectionMediaType ( IPin iface,
AM_MEDIA_TYPE mtype 
)
static

Definition at line 1012 of file samplegrabber.c.

1013{
1014 SG_Pin *This = impl_from_IPin(iface);
1015
1016 TRACE("(%p)->(%p)\n", This, mtype);
1017 if (!mtype)
1018 return E_POINTER;
1019 if (!This->pair)
1020 return VFW_E_NOT_CONNECTED;
1021 *mtype = This->sg->mtype;
1022 if (mtype->cbFormat) {
1023 mtype->pbFormat = CoTaskMemAlloc(mtype->cbFormat);
1024 CopyMemory(mtype->pbFormat, This->sg->mtype.pbFormat, mtype->cbFormat);
1025 }
1026 return S_OK;
1027}

◆ SampleGrabber_IPin_EndFlush()

static HRESULT WINAPI SampleGrabber_IPin_EndFlush ( IPin iface)
static

Definition at line 1144 of file samplegrabber.c.

1145{
1146 FIXME(": stub\n");
1147 return S_OK;
1148}

◆ SampleGrabber_IPin_EndOfStream()

static HRESULT WINAPI SampleGrabber_IPin_EndOfStream ( IPin iface)
static

Definition at line 1128 of file samplegrabber.c.

1129{
1130 FIXME(": stub\n");
1131 return S_OK;
1132}

◆ SampleGrabber_IPin_EnumMediaTypes()

static HRESULT WINAPI SampleGrabber_IPin_EnumMediaTypes ( IPin iface,
IEnumMediaTypes **  mtypes 
)
static

Definition at line 1084 of file samplegrabber.c.

1085{
1086 SG_Pin *This = impl_from_IPin(iface);
1087
1088 TRACE("(%p)->(%p)\n", This, mtypes);
1089 if (!mtypes)
1090 return E_POINTER;
1091 *mtypes = mediaenum_create(This->sg->pin_in.pair ? &This->sg->mtype : NULL, FALSE);
1092 return *mtypes ? S_OK : E_OUTOFMEMORY;
1093}
static IEnumMediaTypes * mediaenum_create(const AM_MEDIA_TYPE *mtype, BOOL past)

◆ SampleGrabber_IPin_NewSegment()

static HRESULT WINAPI SampleGrabber_IPin_NewSegment ( IPin iface,
REFERENCE_TIME  tStart,
REFERENCE_TIME  tStop,
double  rate 
)
static

Definition at line 1152 of file samplegrabber.c.

1153{
1154 FIXME(": stub\n");
1155 return S_OK;
1156}

◆ SampleGrabber_IPin_QueryAccept()

static HRESULT WINAPI SampleGrabber_IPin_QueryAccept ( IPin iface,
const AM_MEDIA_TYPE mtype 
)
static

Definition at line 1076 of file samplegrabber.c.

1077{
1078 TRACE("(%p)\n", mtype);
1079 return S_OK;
1080}

◆ SampleGrabber_IPin_QueryDirection()

static HRESULT WINAPI SampleGrabber_IPin_QueryDirection ( IPin iface,
PIN_DIRECTION dir 
)
static

Definition at line 1047 of file samplegrabber.c.

1048{
1049 SG_Pin *This = impl_from_IPin(iface);
1050
1051 TRACE("(%p)->(%p)\n", This, dir);
1052 if (!dir)
1053 return E_POINTER;
1054 *dir = This->dir;
1055 return S_OK;
1056}
unsigned int dir
Definition: maze.c:112

◆ SampleGrabber_IPin_QueryId()

static HRESULT WINAPI SampleGrabber_IPin_QueryId ( IPin iface,
LPWSTR id 
)
static

Definition at line 1060 of file samplegrabber.c.

1061{
1062 SG_Pin *This = impl_from_IPin(iface);
1063
1064 int len;
1065 TRACE("(%p)->(%p)\n", This, id);
1066 if (!id)
1067 return E_POINTER;
1068 len = sizeof(WCHAR)*(1+lstrlenW(This->name));
1069 *id = CoTaskMemAlloc(len);
1070 CopyMemory(*id, This->name, len);
1071 return S_OK;
1072}
#define lstrlenW
Definition: compat.h:750
GLenum GLsizei len
Definition: glext.h:6722
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ SampleGrabber_IPin_QueryInterface()

static HRESULT WINAPI SampleGrabber_IPin_QueryInterface ( IPin iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 822 of file samplegrabber.c.

823{
824 SG_Pin *This = impl_from_IPin(iface);
825 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
826
827 *ppv = NULL;
829 *ppv = iface;
830 else if (IsEqualIID(riid, &IID_IMemInputPin))
831 *ppv = &This->sg->IMemInputPin_iface;
832 else if (IsEqualIID(riid, &IID_IMediaSeeking))
833 return IUnknown_QueryInterface(&This->sg->IUnknown_inner, riid, ppv);
834 else if (IsEqualIID(riid, &IID_IMediaPosition))
835 return IUnknown_QueryInterface(&This->sg->IUnknown_inner, riid, ppv);
836 else {
837 WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ppv);
838 return E_NOINTERFACE;
839 }
840
841 IUnknown_AddRef((IUnknown*)*ppv);
842 return S_OK;
843}
const GUID IID_IPin
Definition: pincontrol.cpp:15
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ SampleGrabber_IPin_QueryPinInfo()

static HRESULT WINAPI SampleGrabber_IPin_QueryPinInfo ( IPin iface,
PIN_INFO info 
)
static

Definition at line 1031 of file samplegrabber.c.

1032{
1033 SG_Pin *This = impl_from_IPin(iface);
1034
1035 TRACE("(%p)->(%p)\n", This, info);
1036 if (!info)
1037 return E_POINTER;
1038 info->pFilter = &This->sg->filter.IBaseFilter_iface;
1039 IBaseFilter_AddRef(info->pFilter);
1040 info->dir = This->dir;
1041 lstrcpynW(info->achName,This->name,MAX_PIN_NAME);
1042 return S_OK;
1043}
#define MAX_PIN_NAME
Definition: axcore.idl:47
#define lstrcpynW
Definition: compat.h:738

◆ SampleGrabber_IPin_Release()

static ULONG WINAPI SampleGrabber_IPin_Release ( IPin iface)
static

Definition at line 814 of file samplegrabber.c.

815{
816 SG_Pin *This = impl_from_IPin(iface);
817 return ISampleGrabber_Release(&This->sg->ISampleGrabber_iface);
818}

◆ SampleGrabber_ISampleGrabber_AddRef()

static ULONG WINAPI SampleGrabber_ISampleGrabber_AddRef ( ISampleGrabber iface)
static

Definition at line 549 of file samplegrabber.c.

550{
552 return IUnknown_AddRef(This->outer_unk);
553}
static SG_Impl * impl_from_ISampleGrabber(ISampleGrabber *iface)

◆ SampleGrabber_ISampleGrabber_GetConnectedMediaType()

static HRESULT WINAPI SampleGrabber_ISampleGrabber_GetConnectedMediaType ( ISampleGrabber iface,
AM_MEDIA_TYPE type 
)
static

Definition at line 599 of file samplegrabber.c.

600{
602 TRACE("(%p)->(%p)\n", This, type);
603 if (!type)
604 return E_POINTER;
605 if (!This->pin_in.pair)
606 return VFW_E_NOT_CONNECTED;
607 *type = This->mtype;
608 if (type->cbFormat) {
609 type->pbFormat = CoTaskMemAlloc(type->cbFormat);
610 CopyMemory(type->pbFormat, This->mtype.pbFormat, type->cbFormat);
611 }
612 return S_OK;
613}

◆ SampleGrabber_ISampleGrabber_GetCurrentBuffer()

static HRESULT WINAPI SampleGrabber_ISampleGrabber_GetCurrentBuffer ( ISampleGrabber iface,
LONG bufSize,
LONG buffer 
)
static

Definition at line 634 of file samplegrabber.c.

635{
637 HRESULT ret = S_OK;
638 TRACE("(%p)->(%p, %p)\n", This, bufSize, buffer);
639 if (!bufSize)
640 return E_POINTER;
641 EnterCriticalSection(&This->filter.csFilter);
642 if (!This->pin_in.pair)
644 else if (This->bufferLen < 0)
646 else if (This->bufferLen == 0)
648 else {
649 if (buffer) {
650 if (*bufSize >= This->bufferLen)
651 CopyMemory(buffer, This->bufferData, This->bufferLen);
652 else
654 }
655 *bufSize = This->bufferLen;
656 }
657 LeaveCriticalSection(&This->filter.csFilter);
658 return ret;
659}
#define E_INVALIDARG
Definition: ddrawi.h:101
GLuint buffer
Definition: glext.h:5915
GLuint GLsizei bufSize
Definition: glext.h:6040
#define VFW_E_WRONG_STATE
Definition: vfwmsgs.h:78
int ret

◆ SampleGrabber_ISampleGrabber_GetCurrentSample()

static HRESULT WINAPI SampleGrabber_ISampleGrabber_GetCurrentSample ( ISampleGrabber iface,
IMediaSample **  sample 
)
static

Definition at line 663 of file samplegrabber.c.

664{
665 /* MS doesn't implement it either, no one should call it */
666 WARN("(%p): not implemented\n", sample);
667 return E_NOTIMPL;
668}

◆ SampleGrabber_ISampleGrabber_QueryInterface()

static HRESULT WINAPI SampleGrabber_ISampleGrabber_QueryInterface ( ISampleGrabber iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 541 of file samplegrabber.c.

542{
544 return IUnknown_QueryInterface(This->outer_unk, riid, ppv);
545}

◆ SampleGrabber_ISampleGrabber_Release()

static ULONG WINAPI SampleGrabber_ISampleGrabber_Release ( ISampleGrabber iface)
static

Definition at line 557 of file samplegrabber.c.

558{
560 return IUnknown_Release(This->outer_unk);
561}

◆ SampleGrabber_ISampleGrabber_SetBufferSamples()

static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetBufferSamples ( ISampleGrabber iface,
BOOL  bufferEm 
)
static

Definition at line 617 of file samplegrabber.c.

618{
620 TRACE("(%p)->(%u)\n", This, bufferEm);
621 EnterCriticalSection(&This->filter.csFilter);
622 if (bufferEm) {
623 if (This->bufferLen < 0)
624 This->bufferLen = 0;
625 }
626 else
627 This->bufferLen = -1;
628 LeaveCriticalSection(&This->filter.csFilter);
629 return S_OK;
630}

◆ SampleGrabber_ISampleGrabber_SetCallback()

static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetCallback ( ISampleGrabber iface,
ISampleGrabberCB cb,
LONG  whichMethod 
)
static

Definition at line 672 of file samplegrabber.c.

673{
675 TRACE("(%p)->(%p, %u)\n", This, cb, whichMethod);
676 if (This->grabberIface)
677 ISampleGrabberCB_Release(This->grabberIface);
678 This->grabberIface = cb;
679 This->grabberMethod = whichMethod;
680 if (cb)
681 ISampleGrabberCB_AddRef(cb);
682 return S_OK;
683}
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33

◆ SampleGrabber_ISampleGrabber_SetMediaType()

static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetMediaType ( ISampleGrabber iface,
const AM_MEDIA_TYPE type 
)
static

Definition at line 575 of file samplegrabber.c.

576{
578 TRACE("(%p)->(%p)\n", This, type);
579 if (!type)
580 return E_POINTER;
581 TRACE("Media type: %s/%s ssize: %u format: %s (%u bytes)\n",
582 debugstr_guid(&type->majortype), debugstr_guid(&type->subtype),
583 type->lSampleSize,
584 debugstr_guid(&type->formattype), type->cbFormat);
585 CoTaskMemFree(This->mtype.pbFormat);
586 This->mtype = *type;
587 This->mtype.pUnk = NULL;
588 if (type->cbFormat) {
589 This->mtype.pbFormat = CoTaskMemAlloc(type->cbFormat);
590 CopyMemory(This->mtype.pbFormat, type->pbFormat, type->cbFormat);
591 }
592 else
593 This->mtype.pbFormat = NULL;
594 return S_OK;
595}

◆ SampleGrabber_ISampleGrabber_SetOneShot()

static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetOneShot ( ISampleGrabber iface,
BOOL  oneShot 
)
static

Definition at line 565 of file samplegrabber.c.

566{
568 TRACE("(%p)->(%u)\n", This, oneShot);
569 This->oneShot = oneShot ? OneShot_Wait : OneShot_None;
570 return S_OK;
571}

◆ SampleGrabber_Out_IPin_Connect()

static HRESULT WINAPI SampleGrabber_Out_IPin_Connect ( IPin iface,
IPin receiver,
const AM_MEDIA_TYPE type 
)
static

Definition at line 855 of file samplegrabber.c.

856{
857 SG_Pin *This = impl_from_IPin(iface);
858 HRESULT hr;
859
860 TRACE("(%p)->(%p, %p)\n", This, receiver, type);
861 if (!receiver)
862 return E_POINTER;
863 if (This->pair)
865 if (This->sg->filter.state != State_Stopped)
866 return VFW_E_NOT_STOPPED;
867 if (type) {
868 TRACE("Media type: %s/%s ssize: %u format: %s (%u bytes)\n",
869 debugstr_guid(&type->majortype), debugstr_guid(&type->subtype),
870 type->lSampleSize,
871 debugstr_guid(&type->formattype), type->cbFormat);
872 if (!IsEqualGUID(&This->sg->mtype.majortype,&GUID_NULL) &&
873 !IsEqualGUID(&This->sg->mtype.majortype,&type->majortype))
875 if (!IsEqualGUID(&This->sg->mtype.subtype,&MEDIASUBTYPE_None) &&
876 !IsEqualGUID(&This->sg->mtype.subtype,&type->subtype))
878 if (!IsEqualGUID(&This->sg->mtype.formattype,&GUID_NULL) &&
879 !IsEqualGUID(&This->sg->mtype.formattype,&FORMAT_None) &&
880 !IsEqualGUID(&This->sg->mtype.formattype,&type->formattype))
882 }
883 else
884 type = &This->sg->mtype;
885 if (!IsEqualGUID(&type->formattype, &FORMAT_None) &&
886 !IsEqualGUID(&type->formattype, &GUID_NULL) &&
887 !type->pbFormat)
889 hr = IPin_ReceiveConnection(receiver, &This->IPin_iface, type);
890 if (FAILED(hr))
891 return hr;
892 This->pair = receiver;
893 if (This->sg->memOutput) {
894 IMemInputPin_Release(This->sg->memOutput);
895 This->sg->memOutput = NULL;
896 }
897 IPin_QueryInterface(receiver,&IID_IMemInputPin,(void **)&(This->sg->memOutput));
898 TRACE("(%p) Accepted IPin %p, IMemInputPin %p\n", This, receiver, This->sg->memOutput);
899 return S_OK;
900}
#define FAILED(hr)
Definition: intsafe.h:51

◆ SampleGrabber_Out_IPin_Disconnect()

static HRESULT WINAPI SampleGrabber_Out_IPin_Disconnect ( IPin iface)
static

Definition at line 975 of file samplegrabber.c.

976{
977 SG_Pin *This = impl_from_IPin(iface);
978
979 TRACE("(%p)->() pair = %p\n", This, This->pair);
980 if (This->sg->filter.state != State_Stopped)
981 return VFW_E_NOT_STOPPED;
982 if (This->pair) {
983 This->pair = NULL;
984 if (This->sg->memOutput) {
985 IMemInputPin_Release(This->sg->memOutput);
986 This->sg->memOutput = NULL;
987 }
988 return S_OK;
989 }
990 return S_FALSE;
991}

◆ SampleGrabber_Out_IPin_QueryInternalConnections()

static HRESULT WINAPI SampleGrabber_Out_IPin_QueryInternalConnections ( IPin iface,
IPin **  pins,
ULONG nPins 
)
static

Definition at line 1118 of file samplegrabber.c.

1119{
1120 WARN("(%p, %p): unexpected\n", pins, nPins);
1121 if (nPins)
1122 *nPins = 0;
1123 return E_NOTIMPL;
1124}

◆ SampleGrabber_Out_IPin_ReceiveConnection()

static HRESULT WINAPI SampleGrabber_Out_IPin_ReceiveConnection ( IPin iface,
IPin connector,
const AM_MEDIA_TYPE mtype 
)
static

Definition at line 951 of file samplegrabber.c.

952{
953 WARN("(%p, %p): unexpected\n", connector, mtype);
954 return E_UNEXPECTED;
955}

◆ SampleGrabber_QueryInterface()

static HRESULT WINAPI SampleGrabber_QueryInterface ( IUnknown iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 285 of file samplegrabber.c.

286{
288
289 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
290
291 *ppv = NULL;
293 *ppv = &This->IUnknown_inner;
294 else if (IsEqualIID(riid, &IID_IPersist) || IsEqualIID(riid, &IID_IMediaFilter) ||
296 *ppv = &This->filter.IBaseFilter_iface;
297 else if (IsEqualIID(riid, &IID_ISampleGrabber))
298 *ppv = &This->ISampleGrabber_iface;
299 else if (IsEqualIID(riid, &IID_IMediaPosition))
300 return IUnknown_QueryInterface(This->seekthru_unk, riid, ppv);
301 else if (IsEqualIID(riid, &IID_IMediaSeeking))
302 return IUnknown_QueryInterface(This->seekthru_unk, riid, ppv);
303 else
304 WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ppv);
305
306 if (!*ppv)
307 return E_NOINTERFACE;
308
309 IUnknown_AddRef((IUnknown*)*ppv);
310 return S_OK;
311}
const GUID IID_IBaseFilter
const GUID IID_IPersist
Definition: proxy.cpp:14

◆ SampleGrabber_Release()

static ULONG WINAPI SampleGrabber_Release ( IUnknown iface)
static

Definition at line 323 of file samplegrabber.c.

324{
326 ULONG ref = BaseFilterImpl_Release(&This->filter.IBaseFilter_iface);
327
328 TRACE("(%p) ref=%d\n", This, ref);
329
330 if (ref == 0)
331 {
334 }
335 return ref;
336}
static void SampleGrabber_cleanup(SG_Impl *This)
ULONG WINAPI BaseFilterImpl_Release(IBaseFilter *iface)
Definition: filter.c:64

◆ Single_IEnumMediaTypes_AddRef()

static ULONG WINAPI Single_IEnumMediaTypes_AddRef ( IEnumMediaTypes iface)
static

Definition at line 75 of file samplegrabber.c.

76{
78 ULONG refCount = InterlockedIncrement(&This->refCount);
79
80 TRACE("(%p) new ref = %u\n", This, refCount);
81 return refCount;
82}
#define InterlockedIncrement
Definition: armddk.h:53
static ME_Impl * impl_from_IEnumMediaTypes(IEnumMediaTypes *iface)
Definition: samplegrabber.c:53

◆ Single_IEnumMediaTypes_Clone()

static HRESULT WINAPI Single_IEnumMediaTypes_Clone ( IEnumMediaTypes iface,
IEnumMediaTypes **  me 
)
static

Definition at line 145 of file samplegrabber.c.

146{
148
149 TRACE("(%p)->(%p)\n", This, me);
150 if (!me)
151 return E_POINTER;
152 *me = mediaenum_create(&This->mtype, This->past);
153 if (!*me)
154 return E_OUTOFMEMORY;
155 return S_OK;
156}

◆ Single_IEnumMediaTypes_Next()

static HRESULT WINAPI Single_IEnumMediaTypes_Next ( IEnumMediaTypes iface,
ULONG  nTypes,
AM_MEDIA_TYPE **  types,
ULONG fetched 
)
static

Definition at line 99 of file samplegrabber.c.

101{
103 ULONG count = 0;
104
105 TRACE("(%p)->(%u, %p, %p)\n", This, nTypes, types, fetched);
106 if (!nTypes)
107 return E_INVALIDARG;
108 if (!types || ((nTypes != 1) && !fetched))
109 return E_POINTER;
110 if (!This->past && !IsEqualGUID(&This->mtype.majortype,&GUID_NULL)) {
112 *mtype = This->mtype;
113 if (mtype->cbFormat) {
114 mtype->pbFormat = CoTaskMemAlloc(mtype->cbFormat);
115 CopyMemory(mtype->pbFormat, This->mtype.pbFormat, mtype->cbFormat);
116 }
117 *types = mtype;
118 This->past = TRUE;
119 count = 1;
120 }
121 if (fetched)
122 *fetched = count;
123 return (count == nTypes) ? S_OK : S_FALSE;
124}
#define TRUE
Definition: types.h:120
GLuint GLuint GLsizei count
Definition: gl.h:1545
Definition: cmds.c:130

◆ Single_IEnumMediaTypes_QueryInterface()

static HRESULT WINAPI Single_IEnumMediaTypes_QueryInterface ( IEnumMediaTypes iface,
REFIID  riid,
void **  ret_iface 
)
static

Definition at line 58 of file samplegrabber.c.

60{
62
63 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ret_iface);
64
65 if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IEnumMediaTypes)) {
66 *ret_iface = iface;
67 IEnumMediaTypes_AddRef(iface);
68 return S_OK;
69 }
70 *ret_iface = NULL;
71 WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ret_iface);
72 return E_NOINTERFACE;
73}

◆ Single_IEnumMediaTypes_Release()

static ULONG WINAPI Single_IEnumMediaTypes_Release ( IEnumMediaTypes iface)
static

Definition at line 84 of file samplegrabber.c.

85{
87 ULONG refCount = InterlockedDecrement(&This->refCount);
88
89 TRACE("(%p) new ref = %u\n", This, refCount);
90 if (refCount == 0)
91 {
92 CoTaskMemFree(This->mtype.pbFormat);
94 }
95 return refCount;
96}
#define InterlockedDecrement
Definition: armddk.h:52

◆ Single_IEnumMediaTypes_Reset()

static HRESULT WINAPI Single_IEnumMediaTypes_Reset ( IEnumMediaTypes iface)
static

Definition at line 136 of file samplegrabber.c.

137{
139
140 TRACE("(%p)->()\n", This);
141 This->past = FALSE;
142 return S_OK;
143}

◆ Single_IEnumMediaTypes_Skip()

static HRESULT WINAPI Single_IEnumMediaTypes_Skip ( IEnumMediaTypes iface,
ULONG  nTypes 
)
static

Definition at line 126 of file samplegrabber.c.

127{
129
130 TRACE("(%p)->(%u)\n", This, nTypes);
131 if (nTypes)
132 This->past = TRUE;
133 return This->past ? S_FALSE : S_OK;
134}

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( qedit  )

Variable Documentation

◆ basefunc_vtbl

const BaseFilterFuncTable basefunc_vtbl
static
Initial value:
= {
}
static LONG WINAPI SampleGrabber_GetPinCount(BaseFilter *iface)
static IPin *WINAPI SampleGrabber_GetPin(BaseFilter *iface, int pos)

Definition at line 366 of file samplegrabber.c.

Referenced by SampleGrabber_create().

◆ IBaseFilter_VTable

const IBaseFilterVtbl IBaseFilter_VTable
static
Initial value:
=
{
}
static HRESULT WINAPI SampleGrabber_IBaseFilter_Run(IBaseFilter *iface, REFERENCE_TIME tStart)
static ULONG WINAPI SampleGrabber_IBaseFilter_AddRef(IBaseFilter *iface)
static HRESULT WINAPI SampleGrabber_IBaseFilter_Pause(IBaseFilter *iface)
static HRESULT WINAPI SampleGrabber_IBaseFilter_Stop(IBaseFilter *iface)
static HRESULT WINAPI SampleGrabber_IBaseFilter_FindPin(IBaseFilter *iface, LPCWSTR id, IPin **pin)
static HRESULT WINAPI SampleGrabber_IBaseFilter_QueryVendorInfo(IBaseFilter *iface, LPWSTR *vendor)
static HRESULT WINAPI SampleGrabber_IBaseFilter_JoinFilterGraph(IBaseFilter *iface, IFilterGraph *graph, LPCWSTR name)
static HRESULT WINAPI SampleGrabber_IBaseFilter_QueryInterface(IBaseFilter *iface, REFIID riid, void **ppv)
static ULONG WINAPI SampleGrabber_IBaseFilter_Release(IBaseFilter *iface)
HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter *iface, IReferenceClock *pClock)
Definition: filter.c:101
HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter *iface, CLSID *pClsid)
Definition: filter.c:77
HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter *iface, FILTER_INFO *pInfo)
Definition: filter.c:145
HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter *iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
Definition: filter.c:87
HRESULT WINAPI BaseFilterImpl_GetSyncSource(IBaseFilter *iface, IReferenceClock **ppClock)
Definition: filter.c:119
HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter *iface, IEnumPins **ppEnum)
Definition: filter.c:135

Definition at line 1161 of file samplegrabber.c.

Referenced by SampleGrabber_create().

◆ IEnumMediaTypes_VTable

const IEnumMediaTypesVtbl IEnumMediaTypes_VTable
static
Initial value:
=
{
}
static HRESULT WINAPI Single_IEnumMediaTypes_Clone(IEnumMediaTypes *iface, IEnumMediaTypes **me)
static HRESULT WINAPI Single_IEnumMediaTypes_Skip(IEnumMediaTypes *iface, ULONG nTypes)
static HRESULT WINAPI Single_IEnumMediaTypes_Next(IEnumMediaTypes *iface, ULONG nTypes, AM_MEDIA_TYPE **types, ULONG *fetched)
Definition: samplegrabber.c:99
static HRESULT WINAPI Single_IEnumMediaTypes_QueryInterface(IEnumMediaTypes *iface, REFIID riid, void **ret_iface)
Definition: samplegrabber.c:58
static ULONG WINAPI Single_IEnumMediaTypes_Release(IEnumMediaTypes *iface)
Definition: samplegrabber.c:84
static HRESULT WINAPI Single_IEnumMediaTypes_Reset(IEnumMediaTypes *iface)
static ULONG WINAPI Single_IEnumMediaTypes_AddRef(IEnumMediaTypes *iface)
Definition: samplegrabber.c:75

Definition at line 161 of file samplegrabber.c.

Referenced by mediaenum_create().

◆ IMemInputPin_VTable

const IMemInputPinVtbl IMemInputPin_VTable
static
Initial value:
=
{
}
static HRESULT WINAPI SampleGrabber_IMemInputPin_ReceiveMultiple(IMemInputPin *iface, IMediaSample **samples, LONG nSamples, LONG *nProcessed)
static ULONG WINAPI SampleGrabber_IMemInputPin_Release(IMemInputPin *iface)
static ULONG WINAPI SampleGrabber_IMemInputPin_AddRef(IMemInputPin *iface)
static HRESULT WINAPI SampleGrabber_IMemInputPin_NotifyAllocator(IMemInputPin *iface, IMemAllocator *allocator, BOOL readOnly)
static HRESULT WINAPI SampleGrabber_IMemInputPin_Receive(IMemInputPin *iface, IMediaSample *sample)
static HRESULT WINAPI SampleGrabber_IMemInputPin_ReceiveCanBlock(IMemInputPin *iface)
static HRESULT WINAPI SampleGrabber_IMemInputPin_QueryInterface(IMemInputPin *iface, REFIID riid, void **ppv)
static HRESULT WINAPI SampleGrabber_IMemInputPin_GetAllocatorRequirements(IMemInputPin *iface, ALLOCATOR_PROPERTIES *props)
static HRESULT WINAPI SampleGrabber_IMemInputPin_GetAllocator(IMemInputPin *iface, IMemAllocator **allocator)

Definition at line 1194 of file samplegrabber.c.

Referenced by SampleGrabber_create().

◆ IPin_In_VTable

const IPinVtbl IPin_In_VTable
static
Initial value:
=
{
}
static HRESULT WINAPI SampleGrabber_IPin_QueryInterface(IPin *iface, REFIID riid, void **ppv)
static ULONG WINAPI SampleGrabber_IPin_AddRef(IPin *iface)
static HRESULT WINAPI SampleGrabber_IPin_EndFlush(IPin *iface)
static HRESULT WINAPI SampleGrabber_IPin_ConnectedTo(IPin *iface, IPin **pin)
static HRESULT WINAPI SampleGrabber_IPin_QueryId(IPin *iface, LPWSTR *id)
static HRESULT WINAPI SampleGrabber_IPin_QueryPinInfo(IPin *iface, PIN_INFO *info)
static HRESULT WINAPI SampleGrabber_IPin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **mtypes)
static HRESULT WINAPI SampleGrabber_IPin_BeginFlush(IPin *iface)
static HRESULT WINAPI SampleGrabber_In_IPin_Disconnect(IPin *iface)
static ULONG WINAPI SampleGrabber_IPin_Release(IPin *iface)
static HRESULT WINAPI SampleGrabber_In_IPin_ReceiveConnection(IPin *iface, IPin *connector, const AM_MEDIA_TYPE *type)
static HRESULT WINAPI SampleGrabber_IPin_QueryDirection(IPin *iface, PIN_DIRECTION *dir)
static HRESULT WINAPI SampleGrabber_IPin_EndOfStream(IPin *iface)
static HRESULT WINAPI SampleGrabber_IPin_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double rate)
static HRESULT WINAPI SampleGrabber_In_IPin_Connect(IPin *iface, IPin *receiver, const AM_MEDIA_TYPE *mtype)
static HRESULT WINAPI SampleGrabber_IPin_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *mtype)
static HRESULT WINAPI SampleGrabber_In_IPin_QueryInternalConnections(IPin *iface, IPin **pins, ULONG *nPins)
static HRESULT WINAPI SampleGrabber_IPin_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *mtype)

Definition at line 1207 of file samplegrabber.c.

Referenced by SampleGrabber_create().

◆ IPin_Out_VTable

const IPinVtbl IPin_Out_VTable
static
Initial value:

Definition at line 1229 of file samplegrabber.c.

Referenced by SampleGrabber_create().

◆ ISampleGrabber_VTable

const ISampleGrabberVtbl ISampleGrabber_VTable
static
Initial value:
=
{
}
static HRESULT WINAPI SampleGrabber_ISampleGrabber_GetCurrentSample(ISampleGrabber *iface, IMediaSample **sample)
static HRESULT WINAPI SampleGrabber_ISampleGrabber_QueryInterface(ISampleGrabber *iface, REFIID riid, void **ppv)
static HRESULT WINAPI SampleGrabber_ISampleGrabber_GetCurrentBuffer(ISampleGrabber *iface, LONG *bufSize, LONG *buffer)
static ULONG WINAPI SampleGrabber_ISampleGrabber_AddRef(ISampleGrabber *iface)
static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetMediaType(ISampleGrabber *iface, const AM_MEDIA_TYPE *type)
static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetOneShot(ISampleGrabber *iface, BOOL oneShot)
static HRESULT WINAPI SampleGrabber_ISampleGrabber_GetConnectedMediaType(ISampleGrabber *iface, AM_MEDIA_TYPE *type)
static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetBufferSamples(ISampleGrabber *iface, BOOL bufferEm)
static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetCallback(ISampleGrabber *iface, ISampleGrabberCB *cb, LONG whichMethod)
static ULONG WINAPI SampleGrabber_ISampleGrabber_Release(ISampleGrabber *iface)

Definition at line 1180 of file samplegrabber.c.

Referenced by SampleGrabber_create().

◆ pin_in_name

const WCHAR pin_in_name[] = { 'I', 'n', 0 }
static

Definition at line 37 of file samplegrabber.c.

Referenced by SampleGrabber_create(), and SampleGrabber_IBaseFilter_FindPin().

◆ pin_out_name

const WCHAR pin_out_name[] = { 'O', 'u', 't', 0 }
static

Definition at line 38 of file samplegrabber.c.

Referenced by SampleGrabber_create(), and SampleGrabber_IBaseFilter_FindPin().

◆ samplegrabber_vtbl

const IUnknownVtbl samplegrabber_vtbl
static
Initial value:
=
{
}
static ULONG WINAPI SampleGrabber_Release(IUnknown *iface)
static ULONG WINAPI SampleGrabber_AddRef(IUnknown *iface)
static HRESULT WINAPI SampleGrabber_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)

Definition at line 338 of file samplegrabber.c.

Referenced by SampleGrabber_create().

◆ vendor_name

const WCHAR vendor_name[] = { 'W', 'i', 'n', 'e', 0 }
static

Definition at line 36 of file samplegrabber.c.

Referenced by SampleGrabber_IBaseFilter_QueryVendorInfo().