33 unsigned int new_capacity, max_capacity;
36 if (
count <= *capacity)
40 if (
count > max_capacity)
43 new_capacity =
max(4, *capacity);
44 while (new_capacity <
count && new_capacity <= max_capacity / 2)
46 if (new_capacity <
count)
47 new_capacity = max_capacity;
49 if (!(new_elements =
realloc(*elements, new_capacity *
size)))
52 *elements = new_elements;
53 *capacity = new_capacity;
119 IClassFactory_AddRef(iface);
163 IUnknown_Release(
punk);
170 FIXME(
"iface %p, lock %d, stub!\n", iface,
lock);
241 .lpMediaType = video_renderer_inputs,
245 static const REGFILTER2 video_renderer_default_reg =
248 .dwMerit = MERIT_PREFERRED + 1,
250 .rgPins2 = video_renderer_pins,
255 .dwMerit = MERIT_PREFERRED,
257 .rgPins2 = video_renderer_pins,
268 .lpMediaType = vmr9_filter_inputs,
277 .rgPins2 = vmr9_filter_pins,
280 static const REGPINTYPES avi_decompressor_inputs[] =
284 static const REGPINTYPES avi_decompressor_outputs[] =
292 .lpMediaType = avi_decompressor_inputs,
295 .nMediaTypes =
ARRAY_SIZE(avi_decompressor_outputs),
296 .lpMediaType = avi_decompressor_outputs,
300 static const REGFILTER2 avi_decompressor_reg =
303 .dwMerit = MERIT_NORMAL - 16,
305 .rgPins2 = avi_decompressor_pins,
316 .lpMediaType = async_reader_outputs,
323 .dwMerit = MERIT_UNLIKELY,
325 .rgPins2 = async_reader_pins,
340 .lpMediaType = acm_wrapper_inputs,
343 .nMediaTypes =
ARRAY_SIZE(acm_wrapper_outputs),
344 .lpMediaType = acm_wrapper_outputs,
351 .dwMerit = MERIT_NORMAL - 16,
353 .rgPins2 = acm_wrapper_pins,
358 {&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1Audio},
359 {&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1Video},
360 {&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1System},
361 {&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1VideoCD},
363 static const REGPINTYPES mpeg_splitter_audio_outputs[] =
365 {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Packet},
366 {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1AudioPayload},
368 static const REGPINTYPES mpeg_splitter_video_outputs[] =
370 {&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Packet},
371 {&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Payload},
377 .lpMediaType = mpeg_splitter_inputs,
381 .nMediaTypes =
ARRAY_SIZE(mpeg_splitter_audio_outputs),
382 .lpMediaType = mpeg_splitter_audio_outputs,
386 .nMediaTypes =
ARRAY_SIZE(mpeg_splitter_video_outputs),
387 .lpMediaType = mpeg_splitter_video_outputs,
393 .dwMerit = MERIT_NORMAL,
395 .rgPins2 = mpeg_splitter_pins,
400 {&MEDIATYPE_Stream, &MEDIASUBTYPE_Avi},
410 .lpMediaType = avi_splitter_inputs,
414 .nMediaTypes =
ARRAY_SIZE(avi_splitter_outputs),
415 .lpMediaType = avi_splitter_outputs,
421 .dwMerit = MERIT_NORMAL,
423 .rgPins2 = avi_splitter_pins,
428 {&MEDIATYPE_Stream, &MEDIASUBTYPE_WAVE},
429 {&MEDIATYPE_Stream, &MEDIASUBTYPE_AU},
430 {&MEDIATYPE_Stream, &MEDIASUBTYPE_AIFF},
440 .lpMediaType = wave_parser_inputs,
444 .nMediaTypes =
ARRAY_SIZE(wave_parser_outputs),
445 .lpMediaType = wave_parser_outputs,
451 .dwMerit = MERIT_UNLIKELY,
453 .rgPins2 = wave_parser_pins,
456 static const REGPINTYPES mpeg_audio_codec_inputs[] =
458 {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Packet},
459 {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Payload},
460 {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1AudioPayload},
462 static const REGPINTYPES mpeg_audio_codec_outputs[] =
464 {&MEDIATYPE_Audio, &MEDIASUBTYPE_PCM},
470 .lpMediaType = mpeg_audio_codec_inputs,
474 .nMediaTypes =
ARRAY_SIZE(mpeg_audio_codec_outputs),
475 .lpMediaType = mpeg_audio_codec_outputs,
478 static const REGFILTER2 mpeg_audio_codec_reg =
481 .dwMerit = 0x03680001,
483 .rgPins2 = mpeg_audio_codec_pins,
486 static const REGPINTYPES mpeg_video_codec_inputs[] =
488 {&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Packet},
489 {&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Payload},
491 static const REGPINTYPES mpeg_video_codec_outputs[] =
499 .lpMediaType = mpeg_video_codec_inputs,
503 .nMediaTypes =
ARRAY_SIZE(mpeg_video_codec_outputs),
504 .lpMediaType = mpeg_video_codec_outputs,
507 static const REGFILTER2 mpeg_video_codec_reg =
510 .dwMerit = 0x40000001,
512 .rgPins2 = mpeg_video_codec_pins,
524 &IID_IFilterMapper2, (
void **)&mapper)))
527 if (
FAILED(
hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_VideoRenderer,
L"Video Renderer",
NULL,
528 &CLSID_LegacyAmFilterCategory,
NULL, &video_renderer_reg)))
530 if (
FAILED(
hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_VideoRendererDefault,
L"Video Renderer",
NULL,
531 &CLSID_LegacyAmFilterCategory,
NULL, &video_renderer_default_reg)))
533 if (
FAILED(
hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_VideoMixingRenderer9,
L"Video Mixing Renderer 9",
NULL,
534 &CLSID_LegacyAmFilterCategory,
NULL, &vmr9_filter_reg)))
536 if (
FAILED(
hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_AVIDec,
L"AVI Decompressor",
NULL,
537 &CLSID_LegacyAmFilterCategory,
NULL, &avi_decompressor_reg)))
539 if (
FAILED(
hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_AsyncReader,
L"File Source (Async.)",
NULL,
540 &CLSID_LegacyAmFilterCategory,
NULL, &async_reader_reg)))
542 if (
FAILED(
hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_ACMWrapper,
L"ACM Wrapper",
NULL,
543 &CLSID_LegacyAmFilterCategory,
NULL, &acm_wrapper_reg)))
545 if (
FAILED(
hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_AviSplitter,
L"AVI Splitter",
NULL,
548 if (
FAILED(
hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_MPEG1Splitter,
L"MPEG-I Stream Splitter",
NULL,
551 if (
FAILED(
hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_WAVEParser,
L"Wave Parser",
NULL,
554 if (
FAILED(
hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_CMpegAudioCodec,
L"MPEG Audio Decoder",
NULL,
555 NULL,
NULL, &mpeg_audio_codec_reg)))
557 if (
FAILED(
hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_CMpegVideoCodec,
L"MPEG Video Decoder",
NULL,
558 NULL,
NULL, &mpeg_video_codec_reg)))
562 IFilterMapper2_Release(mapper);
577 &IID_IFilterMapper2, (
void **)&mapper)))
580 if (
FAILED(
hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory,
NULL, &CLSID_VideoRenderer)))
582 if (
FAILED(
hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory,
NULL, &CLSID_VideoRendererDefault)))
584 if (
FAILED(
hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory,
NULL, &CLSID_VideoMixingRenderer9)))
586 if (
FAILED(
hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory,
NULL, &CLSID_AVIDec)))
588 if (
FAILED(
hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory,
NULL, &CLSID_AsyncReader)))
590 if (
FAILED(
hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory,
NULL, &CLSID_ACMWrapper)))
592 if (
FAILED(
hr = IFilterMapper2_UnregisterFilter(mapper,
NULL,
NULL, &CLSID_AviSplitter)))
594 if (
FAILED(
hr = IFilterMapper2_UnregisterFilter(mapper,
NULL,
NULL, &CLSID_MPEG1Splitter)))
596 if (
FAILED(
hr = IFilterMapper2_UnregisterFilter(mapper,
NULL,
NULL, &CLSID_WAVEParser)))
598 if (
FAILED(
hr = IFilterMapper2_UnregisterFilter(mapper,
NULL,
NULL, &CLSID_CMpegAudioCodec)))
600 if (
FAILED(
hr = IFilterMapper2_UnregisterFilter(mapper,
NULL,
NULL, &CLSID_CMpegVideoCodec)))
604 IFilterMapper2_Release(mapper);
611#define OUR_GUID_ENTRY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
612 { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } , #name },
620 { { 0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0} },
NULL }
627 const GUID *pCategory,
632 return ICaptureGraphBuilder_RemoteFindInterface_Proxy(
This, pCategory, pf,
637 const GUID *pCategory,
642 return ICaptureGraphBuilder_FindInterface(
This, pCategory, pf,
riid, (
void **)ppint );
646 const GUID *pCategory,
652 return ICaptureGraphBuilder2_RemoteFindInterface_Proxy(
This, pCategory, pType,
657 const GUID *pCategory,
663 return ICaptureGraphBuilder2_FindInterface(
This, pCategory, pType, pf,
riid, (
void **)ppint );
683 FIXME(
"(%d) Stub!\n", ampfactor);
689 FIXME(
"(%d) Stub!\n", db);
704 TRACE(
"hr %#lx, buffer %p, maxlen %lu.\n",
hr,
buffer, maxlen);
727 TRACE(
"hr %#lx, buffer %p, maxlen %lu.\n",
hr,
buffer, maxlen);
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
BOOL NTAPI DllMain(_In_ HINSTANCE hDll, _In_ ULONG dwReason, _In_opt_ PVOID pReserved)
const GUID IID_IClassFactory
HRESULT create_instance(const CLSID *clsid, const IID *iid, void **ppv)
HRESULT mpeg_video_codec_create(IUnknown *outer, IUnknown **out)
HRESULT mpeg_audio_codec_create(IUnknown *outer, IUnknown **out)
static const struct object_creation_info object_creation[]
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
static const IClassFactoryVtbl DSCF_Vtbl
static IClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
static HINSTANCE instance
HRESULT WINAPI DllRegisterServer(void)
static ULONG WINAPI DSCF_AddRef(IClassFactory *iface)
static ULONG WINAPI DSCF_Release(IClassFactory *iface)
HRESULT WINAPI DllUnregisterServer(void)
static HRESULT WINAPI DSCF_LockServer(IClassFactory *iface, BOOL dolock)
static HRESULT WINAPI DSCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppobj)
static HRESULT WINAPI DSCF_CreateInstance(IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppobj)
HRESULT acm_wrapper_create(IUnknown *outer, IUnknown **out)
HRESULT avi_dec_create(IUnknown *outer, IUnknown **out)
HRESULT dsound_render_create(IUnknown *outer, IUnknown **out)
HRESULT async_reader_create(IUnknown *outer, IUnknown **out)
HRESULT filter_graph_no_thread_create(IUnknown *outer, IUnknown **out)
HRESULT filter_graph_create(IUnknown *outer, IUnknown **out)
HRESULT filter_mapper_create(IUnknown *pUnkOuter, IUnknown **out)
HRESULT __RPC_STUB ICaptureGraphBuilder_FindInterface_Stub(ICaptureGraphBuilder *This, const GUID *pCategory, IBaseFilter *pf, REFIID riid, IUnknown **ppint)
const char * qzdebugstr_guid(const GUID *id)
HRESULT WINAPI QUARTZ_DllUnregisterServer(void)
HRESULT WINAPI QUARTZ_DllGetClassObject(REFCLSID, REFIID, LPVOID *)
DWORD WINAPI AMGetErrorTextA(HRESULT hr, LPSTR buffer, DWORD maxlen)
DWORD WINAPI AMGetErrorTextW(HRESULT hr, LPWSTR buffer, DWORD maxlen)
HRESULT WINAPI QUARTZ_DllRegisterServer(void)
HRESULT __RPC_STUB ICaptureGraphBuilder2_FindInterface_Stub(ICaptureGraphBuilder2 *This, const GUID *pCategory, const GUID *pType, IBaseFilter *pf, REFIID riid, IUnknown **ppint)
int WINAPI AmpFactorToDB(int ampfactor)
HRESULT CALLBACK ICaptureGraphBuilder_FindInterface_Proxy(ICaptureGraphBuilder *This, const GUID *pCategory, IBaseFilter *pf, REFIID riid, void **ppint)
static const struct @330 InterfaceDesc[]
BOOL WINAPI QUARTZ_DllMain(HINSTANCE, DWORD, LPVOID)
HRESULT CALLBACK ICaptureGraphBuilder2_FindInterface_Proxy(ICaptureGraphBuilder2 *This, const GUID *pCategory, const GUID *pType, IBaseFilter *pf, REFIID riid, void **ppint)
int WINAPI DBToAmpFactor(int db)
bool array_reserve(void **elements, size_t *capacity, size_t count, size_t size)
HRESULT mem_allocator_create(IUnknown *lpUnkOuter, IUnknown **out)
HRESULT mpeg1_splitter_create(IUnknown *outer, IUnknown **out)
HRESULT wave_parser_create(IUnknown *outer, IUnknown **out)
HRESULT avi_splitter_create(IUnknown *outer, IUnknown **out)
HRESULT seeking_passthrough_create(IUnknown *outer, IUnknown **out)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
void *WINAPI CoTaskMemAlloc(SIZE_T size)
void WINAPI CoTaskMemFree(void *ptr)
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
#define DLL_PROCESS_DETACH
#define WideCharToMultiByte
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
#define MAX_ERROR_TEXT_LEN
GLuint GLuint GLsizei count
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
static const WCHAR errorW[]
#define IsEqualGUID(rguid1, rguid2)
HRESULT vmr9_create(IUnknown *outer, IUnknown **out)
HRESULT video_renderer_create(IUnknown *outer, IUnknown **out)
HRESULT vmr7_create(IUnknown *outer, IUnknown **out)
HRESULT video_renderer_default_create(IUnknown *outer, IUnknown **out)
void video_window_unregister_class(void)
HRESULT vmr7_presenter_create(IUnknown *outer, IUnknown **out)
HRESULT system_clock_create(IUnknown *outer, IUnknown **out)
void strmbase_release_typelibs(void)
IClassFactory IClassFactory_iface
HRESULT(* create_instance)(IUnknown *outer, IUnknown **out)
#define CONTAINING_RECORD(address, type, field)
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out