ReactOS 0.4.17-dev-934-g091855f
main.c File Reference
#include "wine/debug.h"
#include "quartz_private.h"
#include "uuids.h"
Include dependency graph for main.c:

Go to the source code of this file.

Classes

struct  IClassFactoryImpl
 
struct  object_creation_info
 

Macros

#define OUR_GUID_ENTRY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)    { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } , #name },
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (quartz)
 
HRESULT WINAPI QUARTZ_DllGetClassObject (REFCLSID, REFIID, LPVOID *)
 
BOOL WINAPI QUARTZ_DllMain (HINSTANCE, DWORD, LPVOID)
 
HRESULT WINAPI QUARTZ_DllRegisterServer (void)
 
HRESULT WINAPI QUARTZ_DllUnregisterServer (void)
 
bool array_reserve (void **elements, size_t *capacity, size_t count, size_t size)
 
BOOL WINAPI DllMain (HINSTANCE instance, DWORD reason, void *reserved)
 
static IClassFactoryImpl * impl_from_IClassFactory (IClassFactory *iface)
 
static HRESULT WINAPI DSCF_QueryInterface (IClassFactory *iface, REFIID riid, void **ppobj)
 
static ULONG WINAPI DSCF_AddRef (IClassFactory *iface)
 
static ULONG WINAPI DSCF_Release (IClassFactory *iface)
 
static HRESULT WINAPI DSCF_CreateInstance (IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppobj)
 
static HRESULT WINAPI DSCF_LockServer (IClassFactory *iface, BOOL lock)
 
HRESULT WINAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv)
 
HRESULT WINAPI DllRegisterServer (void)
 
HRESULT WINAPI DllUnregisterServer (void)
 
HRESULT CALLBACK ICaptureGraphBuilder_FindInterface_Proxy (ICaptureGraphBuilder *This, const GUID *pCategory, IBaseFilter *pf, REFIID riid, void **ppint)
 
HRESULT __RPC_STUB ICaptureGraphBuilder_FindInterface_Stub (ICaptureGraphBuilder *This, const GUID *pCategory, IBaseFilter *pf, REFIID riid, IUnknown **ppint)
 
HRESULT CALLBACK ICaptureGraphBuilder2_FindInterface_Proxy (ICaptureGraphBuilder2 *This, const GUID *pCategory, const GUID *pType, IBaseFilter *pf, REFIID riid, void **ppint)
 
HRESULT __RPC_STUB ICaptureGraphBuilder2_FindInterface_Stub (ICaptureGraphBuilder2 *This, const GUID *pCategory, const GUID *pType, IBaseFilter *pf, REFIID riid, IUnknown **ppint)
 
const char * qzdebugstr_guid (const GUID *id)
 
int WINAPI AmpFactorToDB (int ampfactor)
 
int WINAPI DBToAmpFactor (int db)
 
DWORD WINAPI AMGetErrorTextA (HRESULT hr, LPSTR buffer, DWORD maxlen)
 
DWORD WINAPI AMGetErrorTextW (HRESULT hr, LPWSTR buffer, DWORD maxlen)
 

Variables

static const struct object_creation_info object_creation []
 
static const IClassFactoryVtbl DSCF_Vtbl
 
struct {
   const GUID   riid
 
   const char *   name
 
} InterfaceDesc []
 

Macro Definition Documentation

◆ OUR_GUID_ENTRY

#define OUR_GUID_ENTRY (   name,
  l,
  w1,
  w2,
  b1,
  b2,
  b3,
  b4,
  b5,
  b6,
  b7,
  b8 
)     { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } , #name },

Definition at line 611 of file main.c.

Function Documentation

◆ AMGetErrorTextA()

DWORD WINAPI AMGetErrorTextA ( HRESULT  hr,
LPSTR  buffer,
DWORD  maxlen 
)

Definition at line 699 of file main.c.

700{
701 DWORD res;
703
704 TRACE("hr %#lx, buffer %p, maxlen %lu.\n", hr, buffer, maxlen);
705
706 if (!buffer)
707 return 0;
708
710 if (!res)
711 return 0;
712
713 res = WideCharToMultiByte(CP_ACP, 0, errorW, -1, NULL, 0, 0, 0);
714 if (res > maxlen || !res)
715 return 0;
716 return WideCharToMultiByte(CP_ACP, 0, errorW, -1, buffer, maxlen, 0, 0) - 1;
717}
#define ARRAY_SIZE(A)
Definition: main.h:20
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
DWORD WINAPI AMGetErrorTextW(HRESULT hr, LPWSTR buffer, DWORD maxlen)
Definition: main.c:722
#define CP_ACP
Definition: compat.h:109
#define WideCharToMultiByte
Definition: compat.h:111
#define MAX_ERROR_TEXT_LEN
Definition: errors.h:29
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint res
Definition: glext.h:9613
GLuint buffer
Definition: glext.h:5915
static const WCHAR errorW[]
Definition: htmlevent.c:61
short WCHAR
Definition: pedump.c:58
#define TRACE(s)
Definition: solgame.cpp:4

◆ AMGetErrorTextW()

DWORD WINAPI AMGetErrorTextW ( HRESULT  hr,
LPWSTR  buffer,
DWORD  maxlen 
)

Definition at line 722 of file main.c.

723{
724 unsigned int len;
726
727 TRACE("hr %#lx, buffer %p, maxlen %lu.\n", hr, buffer, maxlen);
728
729 if (!buffer) return 0;
730 swprintf(error, ARRAY_SIZE(error), L"Error: 0x%lx", hr);
731 if ((len = wcslen(error)) >= maxlen)
732 return 0;
734 return len;
735}
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2988
#define swprintf
Definition: precomp.h:40
#define L(x)
Definition: resources.c:13
GLenum GLsizei len
Definition: glext.h:6722
#define error(str)
Definition: mkdosfs.c:1605
wcscpy

Referenced by AMGetErrorTextA().

◆ AmpFactorToDB()

int WINAPI AmpFactorToDB ( int  ampfactor)

Definition at line 681 of file main.c.

682{
683 FIXME("(%d) Stub!\n", ampfactor);
684 return 0;
685}
#define FIXME(fmt,...)
Definition: precomp.h:53

◆ array_reserve()

bool array_reserve ( void **  elements,
size_t *  capacity,
size_t  count,
size_t  size 
)

Definition at line 31 of file main.c.

32{
33 unsigned int new_capacity, max_capacity;
34 void *new_elements;
35
36 if (count <= *capacity)
37 return true;
38
39 max_capacity = ~(size_t)0 / size;
40 if (count > max_capacity)
41 return false;
42
43 new_capacity = max(4, *capacity);
44 while (new_capacity < count && new_capacity <= max_capacity / 2)
45 new_capacity *= 2;
46 if (new_capacity < count)
47 new_capacity = max_capacity;
48
49 if (!(new_elements = realloc(*elements, new_capacity * size)))
50 return false;
51
52 *elements = new_elements;
53 *capacity = new_capacity;
54
55 return true;
56}
#define realloc
Definition: debug_ros.c:6
unsigned int size_t
Definition: corecrt.h:203
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
#define max(a, b)
Definition: svc.c:63

◆ DBToAmpFactor()

int WINAPI DBToAmpFactor ( int  db)

Definition at line 687 of file main.c.

688{
689 FIXME("(%d) Stub!\n", db);
690 /* Avoid divide by zero (probably during range computation) in Windows Media Player 6.4 */
691 if (db < -1000)
692 return 0;
693 return 100;
694}

◆ DllGetClassObject()

HRESULT WINAPI DllGetClassObject ( REFCLSID  rclsid,
REFIID  riid,
LPVOID *  ppv 
)

Definition at line 200 of file main.c.

201{
202 unsigned int i;
203
204 TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
205
207 {
208 for (i = 0; i < ARRAY_SIZE(object_creation); i++)
209 {
210 if (IsEqualGUID(object_creation[i].clsid, rclsid))
211 {
213 if (factory == NULL) return E_OUTOFMEMORY;
214
216 factory->ref = 1;
217
218 factory->create_instance = object_creation[i].create_instance;
219
221 return S_OK;
222 }
223 }
224 }
225 return QUARTZ_DllGetClassObject( rclsid, riid, ppv );
226}
const GUID IID_IUnknown
const GUID IID_IClassFactory
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const struct object_creation_info object_creation[]
Definition: main.c:60
static const IClassFactoryVtbl DSCF_Vtbl
Definition: main.c:127
HRESULT WINAPI QUARTZ_DllGetClassObject(REFCLSID, REFIID, LPVOID *)
void *WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: malloc.c:381
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
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define debugstr_guid
Definition: kernel32.h:35
const CLSID * clsid
Definition: msctf.cpp:50
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
Definition: main.c:439
IClassFactory IClassFactory_iface
Definition: main.c:440

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  instance,
DWORD  reason,
void *  reserved 
)

Definition at line 58 of file main.c.

59{
61 {
64 }
66}
static HINSTANCE instance
Definition: main.c:35
BOOL WINAPI QUARTZ_DllMain(HINSTANCE, DWORD, LPVOID)
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1971
#define DLL_PROCESS_DETACH
Definition: compat.h:130
r reserved
Definition: btrfs.c:3006
void video_window_unregister_class(void)
Definition: window.c:1269
void strmbase_release_typelibs(void)
Definition: dispatch.c:72

◆ DllRegisterServer()

HRESULT WINAPI DllRegisterServer ( void  )

Definition at line 231 of file main.c.

232{
233 static const REGPINTYPES video_renderer_inputs[] =
234 {
235 {&MEDIATYPE_Video, &GUID_NULL},
236 };
237 static const REGFILTERPINS2 video_renderer_pins[] =
238 {
239 {
240 .nMediaTypes = ARRAY_SIZE(video_renderer_inputs),
241 .lpMediaType = video_renderer_inputs,
242 .dwFlags = REG_PINFLAG_B_RENDERER,
243 },
244 };
245 static const REGFILTER2 video_renderer_default_reg =
246 {
247 .dwVersion = 2,
248 .dwMerit = MERIT_PREFERRED + 1,
249 .cPins2 = ARRAY_SIZE(video_renderer_pins),
250 .rgPins2 = video_renderer_pins,
251 };
252 static const REGFILTER2 video_renderer_reg =
253 {
254 .dwVersion = 2,
255 .dwMerit = MERIT_PREFERRED,
256 .cPins2 = ARRAY_SIZE(video_renderer_pins),
257 .rgPins2 = video_renderer_pins,
258 };
259
260 static const REGPINTYPES vmr9_filter_inputs[] =
261 {
262 {&MEDIATYPE_Video, &GUID_NULL},
263 };
264 static const REGFILTERPINS2 vmr9_filter_pins[] =
265 {
266 {
267 .nMediaTypes = ARRAY_SIZE(vmr9_filter_inputs),
268 .lpMediaType = vmr9_filter_inputs,
269 .dwFlags = REG_PINFLAG_B_RENDERER,
270 },
271 };
272 static const REGFILTER2 vmr9_filter_reg =
273 {
274 .dwVersion = 2,
275 .dwMerit = MERIT_DO_NOT_USE,
276 .cPins2 = ARRAY_SIZE(vmr9_filter_pins),
277 .rgPins2 = vmr9_filter_pins,
278 };
279
280 static const REGPINTYPES avi_decompressor_inputs[] =
281 {
282 {&MEDIATYPE_Video, &GUID_NULL},
283 };
284 static const REGPINTYPES avi_decompressor_outputs[] =
285 {
286 {&MEDIATYPE_Video, &GUID_NULL},
287 };
288 static const REGFILTERPINS2 avi_decompressor_pins[] =
289 {
290 {
291 .nMediaTypes = ARRAY_SIZE(avi_decompressor_inputs),
292 .lpMediaType = avi_decompressor_inputs,
293 },
294 {
295 .nMediaTypes = ARRAY_SIZE(avi_decompressor_outputs),
296 .lpMediaType = avi_decompressor_outputs,
297 .dwFlags = REG_PINFLAG_B_OUTPUT,
298 },
299 };
300 static const REGFILTER2 avi_decompressor_reg =
301 {
302 .dwVersion = 2,
303 .dwMerit = MERIT_NORMAL - 16,
304 .cPins2 = ARRAY_SIZE(avi_decompressor_pins),
305 .rgPins2 = avi_decompressor_pins,
306 };
307
308 static const REGPINTYPES async_reader_outputs[] =
309 {
310 {&MEDIATYPE_Stream, &GUID_NULL},
311 };
312 static const REGFILTERPINS2 async_reader_pins[] =
313 {
314 {
315 .nMediaTypes = ARRAY_SIZE(async_reader_outputs),
316 .lpMediaType = async_reader_outputs,
317 .dwFlags = REG_PINFLAG_B_OUTPUT,
318 },
319 };
320 static const REGFILTER2 async_reader_reg =
321 {
322 .dwVersion = 2,
323 .dwMerit = MERIT_UNLIKELY,
324 .cPins2 = ARRAY_SIZE(async_reader_pins),
325 .rgPins2 = async_reader_pins,
326 };
327
328 static const REGPINTYPES acm_wrapper_inputs[] =
329 {
330 {&MEDIATYPE_Audio, &GUID_NULL},
331 };
332 static const REGPINTYPES acm_wrapper_outputs[] =
333 {
334 {&MEDIATYPE_Audio, &GUID_NULL},
335 };
336 static const REGFILTERPINS2 acm_wrapper_pins[] =
337 {
338 {
339 .nMediaTypes = ARRAY_SIZE(acm_wrapper_inputs),
340 .lpMediaType = acm_wrapper_inputs,
341 },
342 {
343 .nMediaTypes = ARRAY_SIZE(acm_wrapper_outputs),
344 .lpMediaType = acm_wrapper_outputs,
345 .dwFlags = REG_PINFLAG_B_OUTPUT,
346 },
347 };
348 static const REGFILTER2 acm_wrapper_reg =
349 {
350 .dwVersion = 2,
351 .dwMerit = MERIT_NORMAL - 16,
352 .cPins2 = ARRAY_SIZE(acm_wrapper_pins),
353 .rgPins2 = acm_wrapper_pins,
354 };
355
356 static const REGPINTYPES mpeg_splitter_inputs[] =
357 {
358 {&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1Audio},
359 {&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1Video},
360 {&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1System},
361 {&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1VideoCD},
362 };
363 static const REGPINTYPES mpeg_splitter_audio_outputs[] =
364 {
365 {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Packet},
366 {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1AudioPayload},
367 };
368 static const REGPINTYPES mpeg_splitter_video_outputs[] =
369 {
370 {&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Packet},
371 {&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Payload},
372 };
373 static const REGFILTERPINS2 mpeg_splitter_pins[] =
374 {
375 {
376 .nMediaTypes = ARRAY_SIZE(mpeg_splitter_inputs),
377 .lpMediaType = mpeg_splitter_inputs,
378 },
379 {
381 .nMediaTypes = ARRAY_SIZE(mpeg_splitter_audio_outputs),
382 .lpMediaType = mpeg_splitter_audio_outputs,
383 },
384 {
386 .nMediaTypes = ARRAY_SIZE(mpeg_splitter_video_outputs),
387 .lpMediaType = mpeg_splitter_video_outputs,
388 },
389 };
390 static const REGFILTER2 mpeg_splitter_reg =
391 {
392 .dwVersion = 2,
393 .dwMerit = MERIT_NORMAL,
394 .cPins2 = ARRAY_SIZE(mpeg_splitter_pins),
395 .rgPins2 = mpeg_splitter_pins,
396 };
397
398 static const REGPINTYPES avi_splitter_inputs[] =
399 {
400 {&MEDIATYPE_Stream, &MEDIASUBTYPE_Avi},
401 };
402 static const REGPINTYPES avi_splitter_outputs[] =
403 {
404 {&MEDIATYPE_Video, &GUID_NULL},
405 };
406 static const REGFILTERPINS2 avi_splitter_pins[] =
407 {
408 {
409 .nMediaTypes = ARRAY_SIZE(avi_splitter_inputs),
410 .lpMediaType = avi_splitter_inputs,
411 },
412 {
413 .dwFlags = REG_PINFLAG_B_OUTPUT,
414 .nMediaTypes = ARRAY_SIZE(avi_splitter_outputs),
415 .lpMediaType = avi_splitter_outputs,
416 },
417 };
418 static const REGFILTER2 avi_splitter_reg =
419 {
420 .dwVersion = 2,
421 .dwMerit = MERIT_NORMAL,
422 .cPins2 = ARRAY_SIZE(avi_splitter_pins),
423 .rgPins2 = avi_splitter_pins,
424 };
425
426 static const REGPINTYPES wave_parser_inputs[] =
427 {
428 {&MEDIATYPE_Stream, &MEDIASUBTYPE_WAVE},
429 {&MEDIATYPE_Stream, &MEDIASUBTYPE_AU},
430 {&MEDIATYPE_Stream, &MEDIASUBTYPE_AIFF},
431 };
432 static const REGPINTYPES wave_parser_outputs[] =
433 {
434 {&MEDIATYPE_Audio, &GUID_NULL},
435 };
436 static const REGFILTERPINS2 wave_parser_pins[] =
437 {
438 {
439 .nMediaTypes = ARRAY_SIZE(wave_parser_inputs),
440 .lpMediaType = wave_parser_inputs,
441 },
442 {
443 .dwFlags = REG_PINFLAG_B_OUTPUT,
444 .nMediaTypes = ARRAY_SIZE(wave_parser_outputs),
445 .lpMediaType = wave_parser_outputs,
446 },
447 };
448 static const REGFILTER2 wave_parser_reg =
449 {
450 .dwVersion = 2,
451 .dwMerit = MERIT_UNLIKELY,
452 .cPins2 = ARRAY_SIZE(wave_parser_pins),
453 .rgPins2 = wave_parser_pins,
454 };
455
456 static const REGPINTYPES mpeg_audio_codec_inputs[] =
457 {
458 {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Packet},
459 {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Payload},
460 {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1AudioPayload},
461 };
462 static const REGPINTYPES mpeg_audio_codec_outputs[] =
463 {
464 {&MEDIATYPE_Audio, &MEDIASUBTYPE_PCM},
465 };
466 static const REGFILTERPINS2 mpeg_audio_codec_pins[] =
467 {
468 {
469 .nMediaTypes = ARRAY_SIZE(mpeg_audio_codec_inputs),
470 .lpMediaType = mpeg_audio_codec_inputs,
471 },
472 {
473 .dwFlags = REG_PINFLAG_B_OUTPUT,
474 .nMediaTypes = ARRAY_SIZE(mpeg_audio_codec_outputs),
475 .lpMediaType = mpeg_audio_codec_outputs,
476 },
477 };
478 static const REGFILTER2 mpeg_audio_codec_reg =
479 {
480 .dwVersion = 2,
481 .dwMerit = 0x03680001,
482 .cPins2 = ARRAY_SIZE(mpeg_audio_codec_pins),
483 .rgPins2 = mpeg_audio_codec_pins,
484 };
485
486 static const REGPINTYPES mpeg_video_codec_inputs[] =
487 {
488 {&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Packet},
489 {&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Payload},
490 };
491 static const REGPINTYPES mpeg_video_codec_outputs[] =
492 {
493 {&MEDIATYPE_Video, &GUID_NULL},
494 };
495 static const REGFILTERPINS2 mpeg_video_codec_pins[] =
496 {
497 {
498 .nMediaTypes = ARRAY_SIZE(mpeg_video_codec_inputs),
499 .lpMediaType = mpeg_video_codec_inputs,
500 },
501 {
502 .dwFlags = REG_PINFLAG_B_OUTPUT,
503 .nMediaTypes = ARRAY_SIZE(mpeg_video_codec_outputs),
504 .lpMediaType = mpeg_video_codec_outputs,
505 },
506 };
507 static const REGFILTER2 mpeg_video_codec_reg =
508 {
509 .dwVersion = 2,
510 .dwMerit = 0x40000001,
511 .cPins2 = ARRAY_SIZE(mpeg_video_codec_pins),
512 .rgPins2 = mpeg_video_codec_pins,
513 };
514
515 IFilterMapper2 *mapper;
516 HRESULT hr;
517
518 TRACE("\n");
519
521 return hr;
522
523 if (FAILED(hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER,
524 &IID_IFilterMapper2, (void **)&mapper)))
525 return hr;
526
527 if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_VideoRenderer, L"Video Renderer", NULL,
528 &CLSID_LegacyAmFilterCategory, NULL, &video_renderer_reg)))
529 goto done;
530 if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_VideoRendererDefault, L"Video Renderer", NULL,
531 &CLSID_LegacyAmFilterCategory, NULL, &video_renderer_default_reg)))
532 goto done;
533 if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_VideoMixingRenderer9, L"Video Mixing Renderer 9", NULL,
534 &CLSID_LegacyAmFilterCategory, NULL, &vmr9_filter_reg)))
535 goto done;
536 if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_AVIDec, L"AVI Decompressor", NULL,
537 &CLSID_LegacyAmFilterCategory, NULL, &avi_decompressor_reg)))
538 goto done;
539 if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_AsyncReader, L"File Source (Async.)", NULL,
540 &CLSID_LegacyAmFilterCategory, NULL, &async_reader_reg)))
541 goto done;
542 if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_ACMWrapper, L"ACM Wrapper", NULL,
543 &CLSID_LegacyAmFilterCategory, NULL, &acm_wrapper_reg)))
544 goto done;
545 if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_AviSplitter, L"AVI Splitter", NULL,
546 NULL, NULL, &avi_splitter_reg)))
547 goto done;
548 if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_MPEG1Splitter, L"MPEG-I Stream Splitter", NULL,
549 NULL, NULL, &mpeg_splitter_reg)))
550 goto done;
551 if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_WAVEParser, L"Wave Parser", NULL,
552 NULL, NULL, &wave_parser_reg)))
553 goto done;
554 if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_CMpegAudioCodec, L"MPEG Audio Decoder", NULL,
555 NULL, NULL, &mpeg_audio_codec_reg)))
556 goto done;
557 if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_CMpegVideoCodec, L"MPEG Video Decoder", NULL,
558 NULL, NULL, &mpeg_video_codec_reg)))
559 goto done;
560
561done:
562 IFilterMapper2_Release(mapper);
563 return hr;
564}
REGPINTYPES
Definition: axextend.idl:194
@ REG_PINFLAG_B_RENDERER
Definition: axextend.idl:219
@ REG_PINFLAG_B_OUTPUT
Definition: axextend.idl:221
@ REG_PINFLAG_B_ZERO
Definition: axextend.idl:218
HRESULT WINAPI QUARTZ_DllRegisterServer(void)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Definition: combase.c:1685
#define MERIT_DO_NOT_USE
Definition: precomp.h:18
#define FAILED(hr)
Definition: intsafe.h:51
#define GUID_NULL
Definition: ks.h:106
DWORD dwVersion
Definition: axextend.idl:238

◆ DllUnregisterServer()

HRESULT WINAPI DllUnregisterServer ( void  )

Definition at line 569 of file main.c.

570{
571 IFilterMapper2 *mapper;
572 HRESULT hr;
573
574 TRACE("\n");
575
576 if (FAILED(hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER,
577 &IID_IFilterMapper2, (void **)&mapper)))
578 return hr;
579
580 if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory, NULL, &CLSID_VideoRenderer)))
581 goto done;
582 if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory, NULL, &CLSID_VideoRendererDefault)))
583 goto done;
584 if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory, NULL, &CLSID_VideoMixingRenderer9)))
585 goto done;
586 if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory, NULL, &CLSID_AVIDec)))
587 goto done;
588 if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory, NULL, &CLSID_AsyncReader)))
589 goto done;
590 if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory, NULL, &CLSID_ACMWrapper)))
591 goto done;
592 if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_AviSplitter)))
593 goto done;
594 if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_MPEG1Splitter)))
595 goto done;
596 if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_WAVEParser)))
597 goto done;
598 if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_CMpegAudioCodec)))
599 goto done;
600 if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_CMpegVideoCodec)))
601 goto done;
602
603done:
604 IFilterMapper2_Release(mapper);
605 if (SUCCEEDED(hr))
607
608 return hr;
609}
HRESULT WINAPI QUARTZ_DllUnregisterServer(void)
#define SUCCEEDED(hr)
Definition: intsafe.h:50

◆ DSCF_AddRef()

static ULONG WINAPI DSCF_AddRef ( IClassFactory *  iface)
static

Definition at line 129 of file main.c.

130{
132 return InterlockedIncrement(&This->ref);
133}
#define InterlockedIncrement
Definition: armddk.h:53
static IClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
Definition: main.c:49

◆ DSCF_CreateInstance()

static HRESULT WINAPI DSCF_CreateInstance ( IClassFactory *  iface,
IUnknown *  pOuter,
REFIID  riid,
void **  ppobj 
)
static

Definition at line 147 of file main.c.

149{
153
154 TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj);
155
156 *ppobj = NULL;
157 if(pOuter && !IsEqualGUID(&IID_IUnknown, riid))
158 return E_NOINTERFACE;
159
160 if (SUCCEEDED(hres = This->create_instance(pOuter, &punk)))
161 {
162 hres = IUnknown_QueryInterface(punk, riid, ppobj);
163 IUnknown_Release(punk);
164 }
165 return hres;
166}
static LPVOID LPUNKNOWN
Definition: dinput.c:53
HRESULT hres
Definition: protocol.c:432
_In_opt_ IUnknown * punk
Definition: shlwapi.h:158
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ DSCF_LockServer()

static HRESULT WINAPI DSCF_LockServer ( IClassFactory *  iface,
BOOL  lock 
)
static

Definition at line 168 of file main.c.

169{
170 FIXME("iface %p, lock %d, stub!\n", iface, lock);
171 return S_OK;
172}
rwlock_t lock
Definition: tcpcore.h:0

◆ DSCF_QueryInterface()

static HRESULT WINAPI DSCF_QueryInterface ( IClassFactory *  iface,
REFIID  riid,
void **  ppobj 
)
static

Definition at line 114 of file main.c.

115{
118 {
119 IClassFactory_AddRef(iface);
120 *ppobj = iface;
121 return S_OK;
122 }
123
124 *ppobj = NULL;
125 WARN("(%p)->(%s,%p), not found\n", iface, debugstr_guid(riid), ppobj);
126 return E_NOINTERFACE;
127}
#define WARN(fmt,...)
Definition: precomp.h:61

◆ DSCF_Release()

static ULONG WINAPI DSCF_Release ( IClassFactory *  iface)
static

Definition at line 135 of file main.c.

136{
139
140 if (ref == 0)
142
143 return ref;
144}
#define InterlockedDecrement
Definition: armddk.h:52
void WINAPI CoTaskMemFree(void *ptr)
Definition: malloc.c:389
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

◆ ICaptureGraphBuilder2_FindInterface_Proxy()

HRESULT CALLBACK ICaptureGraphBuilder2_FindInterface_Proxy ( ICaptureGraphBuilder2 *  This,
const GUID *  pCategory,
const GUID *  pType,
IBaseFilter *  pf,
REFIID  riid,
void **  ppint 
)

Definition at line 645 of file main.c.

651{
652 return ICaptureGraphBuilder2_RemoteFindInterface_Proxy( This, pCategory, pType,
653 pf, riid, (IUnknown **)ppint );
654}

◆ ICaptureGraphBuilder2_FindInterface_Stub()

HRESULT __RPC_STUB ICaptureGraphBuilder2_FindInterface_Stub ( ICaptureGraphBuilder2 *  This,
const GUID *  pCategory,
const GUID *  pType,
IBaseFilter *  pf,
REFIID  riid,
IUnknown **  ppint 
)

Definition at line 656 of file main.c.

662{
663 return ICaptureGraphBuilder2_FindInterface( This, pCategory, pType, pf, riid, (void **)ppint );
664}

◆ ICaptureGraphBuilder_FindInterface_Proxy()

HRESULT CALLBACK ICaptureGraphBuilder_FindInterface_Proxy ( ICaptureGraphBuilder *  This,
const GUID *  pCategory,
IBaseFilter *  pf,
REFIID  riid,
void **  ppint 
)

Definition at line 626 of file main.c.

631{
632 return ICaptureGraphBuilder_RemoteFindInterface_Proxy( This, pCategory, pf,
633 riid, (IUnknown **)ppint );
634}

◆ ICaptureGraphBuilder_FindInterface_Stub()

HRESULT __RPC_STUB ICaptureGraphBuilder_FindInterface_Stub ( ICaptureGraphBuilder *  This,
const GUID *  pCategory,
IBaseFilter *  pf,
REFIID  riid,
IUnknown **  ppint 
)

Definition at line 636 of file main.c.

641{
642 return ICaptureGraphBuilder_FindInterface( This, pCategory, pf, riid, (void **)ppint );
643}

◆ impl_from_IClassFactory()

static IClassFactoryImpl * impl_from_IClassFactory ( IClassFactory *  iface)
inlinestatic

Definition at line 77 of file main.c.

78{
79 return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface);
80}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

◆ QUARTZ_DllGetClassObject()

HRESULT WINAPI QUARTZ_DllGetClassObject ( REFCLSID  ,
REFIID  ,
LPVOID *   
)

Referenced by DllGetClassObject().

◆ QUARTZ_DllMain()

BOOL WINAPI QUARTZ_DllMain ( HINSTANCE  ,
DWORD  ,
LPVOID   
)

Referenced by DllMain().

◆ QUARTZ_DllRegisterServer()

HRESULT WINAPI QUARTZ_DllRegisterServer ( void  )

Referenced by DllRegisterServer().

◆ QUARTZ_DllUnregisterServer()

HRESULT WINAPI QUARTZ_DllUnregisterServer ( void  )

Referenced by DllUnregisterServer().

◆ qzdebugstr_guid()

const char * qzdebugstr_guid ( const GUID *  id)

Definition at line 671 of file main.c.

672{
673 int i;
674
675 for (i=0; InterfaceDesc[i].name; i++)
676 if (IsEqualGUID(&InterfaceDesc[i].riid, id)) return InterfaceDesc[i].name;
677
678 return debugstr_guid(id);
679}
static const struct @330 InterfaceDesc[]

Referenced by BaseMemAllocator_QueryInterface(), EnumFilters_QueryInterface(), StdMediaSample2_QueryInterface(), and VMR9_ImagePresenter_QueryInterface().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( quartz  )

Variable Documentation

◆ DSCF_Vtbl

const IClassFactoryVtbl DSCF_Vtbl
static
Initial value:
=
{
}
static ULONG WINAPI DSCF_AddRef(IClassFactory *iface)
Definition: main.c:84
static ULONG WINAPI DSCF_Release(IClassFactory *iface)
Definition: main.c:90
static HRESULT WINAPI DSCF_LockServer(IClassFactory *iface, BOOL dolock)
Definition: main.c:122
static HRESULT WINAPI DSCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppobj)
Definition: main.c:69
static HRESULT WINAPI DSCF_CreateInstance(IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppobj)
Definition: main.c:101

Definition at line 174 of file main.c.

◆ 

const struct { ... } InterfaceDesc[]
Initial value:
=
{
{ { 0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0} }, NULL }
}

Referenced by qzdebugstr_guid(), and USBSTOR_FdoHandleStartDevice().

◆ name

Definition at line 616 of file main.c.

◆ object_creation

const struct object_creation_info object_creation[]
static
Initial value:
=
{
{ &CLSID_ACMWrapper, acm_wrapper_create },
{ &CLSID_AllocPresenter, vmr7_presenter_create },
{ &CLSID_AsyncReader, async_reader_create },
{ &CLSID_AudioRender, dsound_render_create },
{ &CLSID_AVIDec, avi_dec_create },
{ &CLSID_AviSplitter, avi_splitter_create },
{ &CLSID_CMpegAudioCodec, mpeg_audio_codec_create },
{ &CLSID_CMpegVideoCodec, mpeg_video_codec_create },
{ &CLSID_DSoundRender, dsound_render_create },
{ &CLSID_FilterGraph, filter_graph_create },
{ &CLSID_FilterGraphNoThread, filter_graph_no_thread_create },
{ &CLSID_FilterMapper, filter_mapper_create },
{ &CLSID_FilterMapper2, filter_mapper_create },
{ &CLSID_MemoryAllocator, mem_allocator_create },
{ &CLSID_MPEG1Splitter, mpeg1_splitter_create },
{ &CLSID_SeekingPassThru, seeking_passthrough_create },
{ &CLSID_SystemClock, system_clock_create },
{ &CLSID_VideoRenderer, video_renderer_create },
{ &CLSID_VideoMixingRenderer, vmr7_create },
{ &CLSID_VideoMixingRenderer9, vmr9_create },
{ &CLSID_VideoRendererDefault, video_renderer_default_create },
{ &CLSID_WAVEParser, wave_parser_create },
}
HRESULT mpeg_video_codec_create(IUnknown *outer, IUnknown **out)
Definition: decoder.c:27
HRESULT mpeg_audio_codec_create(IUnknown *outer, IUnknown **out)
Definition: decoder.c:21
HRESULT acm_wrapper_create(IUnknown *outer, IUnknown **out)
Definition: acmwrapper.c:513
HRESULT avi_dec_create(IUnknown *outer, IUnknown **out)
Definition: avidec.c:613
HRESULT dsound_render_create(IUnknown *outer, IUnknown **out)
HRESULT async_reader_create(IUnknown *outer, IUnknown **out)
Definition: filesource.c:430
HRESULT filter_graph_no_thread_create(IUnknown *outer, IUnknown **out)
Definition: filtergraph.c:5757
HRESULT filter_graph_create(IUnknown *outer, IUnknown **out)
Definition: filtergraph.c:5752
HRESULT filter_mapper_create(IUnknown *pUnkOuter, IUnknown **out)
HRESULT mem_allocator_create(IUnknown *lpUnkOuter, IUnknown **out)
Definition: memallocator.c:912
HRESULT mpeg1_splitter_create(IUnknown *outer, IUnknown **out)
Definition: parser.c:27
HRESULT wave_parser_create(IUnknown *outer, IUnknown **out)
Definition: parser.c:33
HRESULT avi_splitter_create(IUnknown *outer, IUnknown **out)
Definition: parser.c:21
HRESULT seeking_passthrough_create(IUnknown *outer, IUnknown **out)
Definition: passthrough.c:94
HRESULT vmr9_create(IUnknown *outer, IUnknown **out)
Definition: vmr9.c:2169
HRESULT video_renderer_create(IUnknown *outer, IUnknown **out)
HRESULT vmr7_create(IUnknown *outer, IUnknown **out)
Definition: vmr7.c:1553
HRESULT video_renderer_default_create(IUnknown *outer, IUnknown **out)
HRESULT vmr7_presenter_create(IUnknown *outer, IUnknown **out)
HRESULT system_clock_create(IUnknown *outer, IUnknown **out)
Definition: systemclock.c:327

Definition at line 88 of file main.c.

◆ riid

Definition at line 615 of file main.c.