Similar to !6430 and !6362, this should make it possible to use native override for these classes.
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/quartz/regsvr.c | 401 +++++++++++++++++++------------------------ 1 file changed, 175 insertions(+), 226 deletions(-)
diff --git a/dlls/quartz/regsvr.c b/dlls/quartz/regsvr.c index f203f0b7fa7..28ae50ade0c 100644 --- a/dlls/quartz/regsvr.c +++ b/dlls/quartz/regsvr.c @@ -37,226 +37,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
-/* - * Near the bottom of this file are the exported DllRegisterServer and - * DllUnregisterServer, which make all this worthwhile. - */ - -struct mediatype -{ - CLSID const *majortype; /* NULL for end of list */ - CLSID const *subtype; - DWORD fourcc; -}; - -struct pin -{ - DWORD flags; /* 0xFFFFFFFF for end of list */ - struct mediatype mediatypes[11]; -}; - -struct regsvr_filter -{ - CLSID const *clsid; /* NULL for end of list */ - CLSID const *category; - WCHAR name[50]; - DWORD merit; - struct pin pins[11]; -}; - -/*********************************************************************** - * register_filters - */ -static HRESULT register_filters(struct regsvr_filter const *list) -{ - HRESULT hr; - IFilterMapper2* pFM2 = NULL; - - CoInitialize(NULL); - hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterMapper2, (LPVOID*)&pFM2); - - if (SUCCEEDED(hr)) { - for (; SUCCEEDED(hr) && list->clsid; ++list) { - REGFILTER2 rf2; - REGFILTERPINS2* prfp2; - int i; - - for (i = 0; list->pins[i].flags != 0xFFFFFFFF; i++) ; - rf2.dwVersion = 2; - rf2.dwMerit = list->merit; - rf2.cPins2 = i; - rf2.rgPins2 = prfp2 = CoTaskMemAlloc(i*sizeof(REGFILTERPINS2)); - if (!prfp2) { - hr = E_OUTOFMEMORY; - break; - } - for (i = 0; list->pins[i].flags != 0xFFFFFFFF; i++) { - REGPINTYPES* lpMediatype; - CLSID* lpClsid; - int j, nbmt; - - for (nbmt = 0; list->pins[i].mediatypes[nbmt].majortype; nbmt++) ; - /* Allocate a single buffer for regpintypes struct and clsids */ - lpMediatype = CoTaskMemAlloc(nbmt*(sizeof(REGPINTYPES) + 2*sizeof(CLSID))); - if (!lpMediatype) { - hr = E_OUTOFMEMORY; - break; - } - lpClsid = (CLSID*) (lpMediatype + nbmt); - for (j = 0; j < nbmt; j++) { - (lpMediatype + j)->clsMajorType = lpClsid + j*2; - memcpy(lpClsid + j*2, list->pins[i].mediatypes[j].majortype, sizeof(CLSID)); - (lpMediatype + j)->clsMinorType = lpClsid + j*2 + 1; - if (list->pins[i].mediatypes[j].subtype) - memcpy(lpClsid + j*2 + 1, list->pins[i].mediatypes[j].subtype, sizeof(CLSID)); - else { - /* Subtypes are often a combination of major type + fourcc/tag */ - memcpy(lpClsid + j*2 + 1, list->pins[i].mediatypes[j].majortype, sizeof(CLSID)); - *(DWORD*)(lpClsid + j*2 + 1) = list->pins[i].mediatypes[j].fourcc; - } - } - prfp2[i].dwFlags = list->pins[i].flags; - prfp2[i].cInstances = 0; - prfp2[i].nMediaTypes = j; - prfp2[i].lpMediaType = lpMediatype; - prfp2[i].nMediums = 0; - prfp2[i].lpMedium = NULL; - prfp2[i].clsPinCategory = NULL; - } - - if (FAILED(hr)) { - ERR("failed to register with hresult %#lx\n", hr); - CoTaskMemFree(prfp2); - break; - } - - hr = IFilterMapper2_RegisterFilter(pFM2, list->clsid, list->name, NULL, list->category, NULL, &rf2); - - while (i) { - CoTaskMemFree((REGPINTYPES*)prfp2[i-1].lpMediaType); - i--; - } - CoTaskMemFree(prfp2); - } - } - - if (pFM2) - IFilterMapper2_Release(pFM2); - - CoUninitialize(); - - return hr; -} - -/*********************************************************************** - * unregister_filters - */ -static HRESULT unregister_filters(struct regsvr_filter const *list) -{ - HRESULT hr; - IFilterMapper2* pFM2; - - hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterMapper2, (LPVOID*)&pFM2); - - if (SUCCEEDED(hr)) { - for (; SUCCEEDED(hr) && list->clsid; ++list) - hr = IFilterMapper2_UnregisterFilter(pFM2, list->category, NULL, list->clsid); - IFilterMapper2_Release(pFM2); - } - - return hr; -} - -/*********************************************************************** - * filter list - */ - -static struct regsvr_filter const filter_list[] = { - { &CLSID_VideoRenderer, - &CLSID_LegacyAmFilterCategory, - L"Video Renderer", - 0x800000, - { { REG_PINFLAG_B_RENDERER, - { { &MEDIATYPE_Video, &GUID_NULL }, - { NULL } - }, - }, - { 0xFFFFFFFF }, - } - }, - { &CLSID_VideoRendererDefault, - &CLSID_LegacyAmFilterCategory, - L"Video Renderer", - 0x800001, - { { REG_PINFLAG_B_RENDERER, - { { &MEDIATYPE_Video, &GUID_NULL }, - { NULL } - }, - }, - { 0xFFFFFFFF }, - } - }, - { &CLSID_VideoMixingRenderer9, - &CLSID_LegacyAmFilterCategory, - L"Video Mixing Renderer 9", - 0x200000, - { { REG_PINFLAG_B_RENDERER, - { { &MEDIATYPE_Video, &GUID_NULL }, - { NULL } - }, - }, - { 0xFFFFFFFF }, - } - }, - { &CLSID_AVIDec, - &CLSID_LegacyAmFilterCategory, - L"AVI Decompressor", - 0x5ffff0, - { { 0, - { { &MEDIATYPE_Video, &GUID_NULL }, - { NULL } - }, - }, - { REG_PINFLAG_B_OUTPUT, - { { &MEDIATYPE_Video, &GUID_NULL }, - { NULL } - }, - }, - { 0xFFFFFFFF }, - } - }, - { &CLSID_AsyncReader, - &CLSID_LegacyAmFilterCategory, - L"File Source (Async.)", - 0x400000, - { { REG_PINFLAG_B_OUTPUT, - { { &MEDIATYPE_Stream, &GUID_NULL }, - { NULL } - }, - }, - { 0xFFFFFFFF }, - } - }, - { &CLSID_ACMWrapper, - &CLSID_LegacyAmFilterCategory, - L"ACM Wrapper", - 0x5ffff0, - { { 0, - { { &MEDIATYPE_Audio, &GUID_NULL }, - { NULL } - }, - }, - { REG_PINFLAG_B_OUTPUT, - { { &MEDIATYPE_Audio, &GUID_NULL }, - { NULL } - }, - }, - { 0xFFFFFFFF }, - } - }, - { NULL } /* list terminator */ -}; - extern HRESULT WINAPI QUARTZ_DllRegisterServer(void); extern HRESULT WINAPI QUARTZ_DllUnregisterServer(void);
@@ -265,13 +45,162 @@ extern HRESULT WINAPI QUARTZ_DllUnregisterServer(void); */ HRESULT WINAPI DllRegisterServer(void) { + static const REGPINTYPES video_renderer_inputs[] = + { + {&MEDIATYPE_Video, &GUID_NULL}, + }; + static const REGFILTERPINS2 video_renderer_pins[] = + { + { + .nMediaTypes = ARRAY_SIZE(video_renderer_inputs), + .lpMediaType = video_renderer_inputs, + .dwFlags = REG_PINFLAG_B_RENDERER, + }, + }; + static const REGFILTER2 video_renderer_default_reg = + { + .dwVersion = 2, + .dwMerit = MERIT_PREFERRED + 1, + .cPins2 = ARRAY_SIZE(video_renderer_pins), + .rgPins2 = video_renderer_pins, + }; + static const REGFILTER2 video_renderer_reg = + { + .dwVersion = 2, + .dwMerit = MERIT_PREFERRED, + .cPins2 = ARRAY_SIZE(video_renderer_pins), + .rgPins2 = video_renderer_pins, + }; + + static const REGPINTYPES vmr9_filter_inputs[] = + { + {&MEDIATYPE_Video, &GUID_NULL}, + }; + static const REGFILTERPINS2 vmr9_filter_pins[] = + { + { + .nMediaTypes = ARRAY_SIZE(vmr9_filter_inputs), + .lpMediaType = vmr9_filter_inputs, + .dwFlags = REG_PINFLAG_B_RENDERER, + }, + }; + static const REGFILTER2 vmr9_filter_reg = + { + .dwVersion = 2, + .dwMerit = MERIT_DO_NOT_USE, + .cPins2 = ARRAY_SIZE(vmr9_filter_pins), + .rgPins2 = vmr9_filter_pins, + }; + + static const REGPINTYPES avi_decompressor_inputs[] = + { + {&MEDIATYPE_Video, &GUID_NULL}, + }; + static const REGPINTYPES avi_decompressor_outputs[] = + { + {&MEDIATYPE_Video, &GUID_NULL}, + }; + static const REGFILTERPINS2 avi_decompressor_pins[] = + { + { + .nMediaTypes = ARRAY_SIZE(avi_decompressor_inputs), + .lpMediaType = avi_decompressor_inputs, + }, + { + .nMediaTypes = ARRAY_SIZE(avi_decompressor_outputs), + .lpMediaType = avi_decompressor_outputs, + .dwFlags = REG_PINFLAG_B_OUTPUT, + }, + }; + static const REGFILTER2 avi_decompressor_reg = + { + .dwVersion = 2, + .dwMerit = MERIT_NORMAL - 16, + .cPins2 = ARRAY_SIZE(avi_decompressor_pins), + .rgPins2 = avi_decompressor_pins, + }; + + static const REGPINTYPES async_reader_outputs[] = + { + {&MEDIATYPE_Stream, &GUID_NULL}, + }; + static const REGFILTERPINS2 async_reader_pins[] = + { + { + .nMediaTypes = ARRAY_SIZE(async_reader_outputs), + .lpMediaType = async_reader_outputs, + .dwFlags = REG_PINFLAG_B_OUTPUT, + }, + }; + static const REGFILTER2 async_reader_reg = + { + .dwVersion = 2, + .dwMerit = MERIT_UNLIKELY, + .cPins2 = ARRAY_SIZE(async_reader_pins), + .rgPins2 = async_reader_pins, + }; + + static const REGPINTYPES acm_wrapper_inputs[] = + { + {&MEDIATYPE_Audio, &GUID_NULL}, + }; + static const REGPINTYPES acm_wrapper_outputs[] = + { + {&MEDIATYPE_Audio, &GUID_NULL}, + }; + static const REGFILTERPINS2 acm_wrapper_pins[] = + { + { + .nMediaTypes = ARRAY_SIZE(acm_wrapper_inputs), + .lpMediaType = acm_wrapper_inputs, + }, + { + .nMediaTypes = ARRAY_SIZE(acm_wrapper_outputs), + .lpMediaType = acm_wrapper_outputs, + .dwFlags = REG_PINFLAG_B_OUTPUT, + }, + }; + static const REGFILTER2 acm_wrapper_reg = + { + .dwVersion = 2, + .dwMerit = MERIT_NORMAL - 16, + .cPins2 = ARRAY_SIZE(acm_wrapper_pins), + .rgPins2 = acm_wrapper_pins, + }; + + IFilterMapper2 *mapper; HRESULT hr;
TRACE("\n");
- hr = QUARTZ_DllRegisterServer(); - if (SUCCEEDED(hr)) - hr = register_filters(filter_list); + if (FAILED(hr = QUARTZ_DllRegisterServer())) + return hr; + + if (FAILED(hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, + &IID_IFilterMapper2, (void **)&mapper))) + return hr; + + if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_VideoRenderer, L"Video Renderer", NULL, + &CLSID_LegacyAmFilterCategory, NULL, &video_renderer_reg))) + goto done; + if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_VideoRendererDefault, L"Video Renderer", NULL, + &CLSID_LegacyAmFilterCategory, NULL, &video_renderer_default_reg))) + goto done; + if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_VideoMixingRenderer9, L"Video Mixing Renderer 9", NULL, + &CLSID_LegacyAmFilterCategory, NULL, &vmr9_filter_reg))) + goto done; + if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_AVIDec, L"AVI Decompressor", NULL, + &CLSID_LegacyAmFilterCategory, NULL, &avi_decompressor_reg))) + goto done; + if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_AsyncReader, L"File Source (Async.)", NULL, + &CLSID_LegacyAmFilterCategory, NULL, &async_reader_reg))) + goto done; + if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_ACMWrapper, L"ACM Wrapper", NULL, + &CLSID_LegacyAmFilterCategory, NULL, &acm_wrapper_reg))) + goto done; + +done: + IFilterMapper2_Release(mapper); return hr; }
@@ -280,12 +209,32 @@ HRESULT WINAPI DllRegisterServer(void) */ HRESULT WINAPI DllUnregisterServer(void) { + IFilterMapper2 *mapper; HRESULT hr;
TRACE("\n");
- hr = unregister_filters(filter_list); - if (SUCCEEDED(hr)) - hr = QUARTZ_DllUnregisterServer(); + if (FAILED(hr = QUARTZ_DllUnregisterServer())) + return hr; + + if (FAILED(hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, + &IID_IFilterMapper2, (void **)&mapper))) + return hr; + + if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory, NULL, &CLSID_VideoRenderer))) + goto done; + if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory, NULL, &CLSID_VideoRendererDefault))) + goto done; + if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory, NULL, &CLSID_VideoMixingRenderer9))) + goto done; + if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory, NULL, &CLSID_AVIDec))) + goto done; + if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory, NULL, &CLSID_AsyncReader))) + goto done; + if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory, NULL, &CLSID_ACMWrapper))) + goto done; + +done: + IFilterMapper2_Release(mapper); return hr; }
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/quartz/Makefile.in | 1 + dlls/quartz/main.c | 3 ++ dlls/quartz/parser.c | 37 ++++++++++++++ dlls/quartz/quartz_private.h | 20 ++++++++ dlls/quartz/quartz_strmif.idl | 7 +++ dlls/quartz/regsvr.c | 47 ++++++++++++++++++ dlls/winegstreamer/main.c | 52 +------------------- dlls/winegstreamer/winegstreamer_classes.idl | 5 +- 8 files changed, 119 insertions(+), 53 deletions(-) create mode 100644 dlls/quartz/parser.c
diff --git a/dlls/quartz/Makefile.in b/dlls/quartz/Makefile.in index db6280f27ed..ec0c641df07 100644 --- a/dlls/quartz/Makefile.in +++ b/dlls/quartz/Makefile.in @@ -13,6 +13,7 @@ SOURCES = \ filtermapper.c \ main.c \ memallocator.c \ + parser.c \ passthrough.c \ quartz.rc \ quartz_strmif.idl \ diff --git a/dlls/quartz/main.c b/dlls/quartz/main.c index f52884afb34..a6932d3210c 100644 --- a/dlls/quartz/main.c +++ b/dlls/quartz/main.c @@ -169,6 +169,9 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
+ if (IsEqualGUID(rclsid, &CLSID_MPEG1Splitter)) + return IClassFactory_QueryInterface(&mpeg1_splitter_factory, riid, ppv); + if (IsEqualGUID( &IID_IClassFactory, riid ) || IsEqualGUID( &IID_IUnknown, riid)) { for (i = 0; i < ARRAY_SIZE(object_creation); i++) diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c new file mode 100644 index 00000000000..3acb7e4e0ab --- /dev/null +++ b/dlls/quartz/parser.c @@ -0,0 +1,37 @@ +/* + * Copyright 2024 Rémi Bernon for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "quartz_private.h" + +static HRESULT WINAPI mpeg1_splitter_factory_CreateInstance(IClassFactory *iface, IUnknown *outer, + REFIID riid, void **out) +{ + static const GUID CLSID_wg_mpeg1_splitter = {0xa8edbf98,0x2442,0x42c5,{0x85,0xa1,0xab,0x05,0xa5,0x80,0xdf,0x53}}; + return CoCreateInstance(&CLSID_wg_mpeg1_splitter, outer, CLSCTX_INPROC_SERVER, riid, out); +} + +static const IClassFactoryVtbl mpeg1_splitter_factory_vtbl = +{ + class_factory_QueryInterface, + class_factory_AddRef, + class_factory_Release, + mpeg1_splitter_factory_CreateInstance, + class_factory_LockServer, +}; + +IClassFactory mpeg1_splitter_factory = {&mpeg1_splitter_factory_vtbl}; diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h index 946709f936a..bc3204ed64f 100644 --- a/dlls/quartz/quartz_private.h +++ b/dlls/quartz/quartz_private.h @@ -48,6 +48,8 @@ #define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000) #define BYTES_FROM_MEDIATIME(time) ((time) / 10000000)
+extern IClassFactory mpeg1_splitter_factory; + HRESULT acm_wrapper_create(IUnknown *outer, IUnknown **out); HRESULT avi_dec_create(IUnknown *outer, IUnknown **out); HRESULT async_reader_create(IUnknown *outer, IUnknown **out); @@ -145,4 +147,22 @@ HRESULT WINAPI BaseControlWindowImpl_GetRestorePosition(IVideoWindow *iface, LON HRESULT WINAPI BaseControlWindowImpl_HideCursor(IVideoWindow *iface, LONG HideCursor); HRESULT WINAPI BaseControlWindowImpl_IsCursorHidden(IVideoWindow *iface, LONG *CursorHidden);
+static inline HRESULT WINAPI class_factory_QueryInterface(IClassFactory *iface, REFIID riid, void **out) +{ + *out = IsEqualGUID(riid, &IID_IClassFactory) || IsEqualGUID(riid, &IID_IUnknown) ? iface : NULL; + return *out ? S_OK : E_NOINTERFACE; +} +static inline ULONG WINAPI class_factory_AddRef(IClassFactory *iface) +{ + return 2; +} +static inline ULONG WINAPI class_factory_Release(IClassFactory *iface) +{ + return 1; +} +static inline HRESULT WINAPI class_factory_LockServer(IClassFactory *iface, BOOL dolock) +{ + return S_OK; +} + #endif /* __QUARTZ_PRIVATE_INCLUDED__ */ diff --git a/dlls/quartz/quartz_strmif.idl b/dlls/quartz/quartz_strmif.idl index 51812f4be30..bca51a59b31 100644 --- a/dlls/quartz/quartz_strmif.idl +++ b/dlls/quartz/quartz_strmif.idl @@ -145,3 +145,10 @@ coclass VideoMixingRenderer9 { interface IBaseFilter; } uuid(99d54f63-1a69-41ae-aa4d-c976eb3f0713) ] coclass AllocPresenter {} + +[ + helpstring("MPEG-I Stream Splitter"), + threading(both), + uuid(336475d0-942a-11ce-a870-00aa002feab5) +] +coclass MPEG1Splitter {} diff --git a/dlls/quartz/regsvr.c b/dlls/quartz/regsvr.c index 28ae50ade0c..3a27c83418e 100644 --- a/dlls/quartz/regsvr.c +++ b/dlls/quartz/regsvr.c @@ -168,6 +168,48 @@ HRESULT WINAPI DllRegisterServer(void) .rgPins2 = acm_wrapper_pins, };
+ static const REGPINTYPES mpeg_splitter_inputs[] = + { + {&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1Audio}, + {&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1Video}, + {&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1System}, + {&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1VideoCD}, + }; + static const REGPINTYPES mpeg_splitter_audio_outputs[] = + { + {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Packet}, + {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1AudioPayload}, + }; + static const REGPINTYPES mpeg_splitter_video_outputs[] = + { + {&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Packet}, + {&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Payload}, + }; + static const REGFILTERPINS2 mpeg_splitter_pins[] = + { + { + .nMediaTypes = ARRAY_SIZE(mpeg_splitter_inputs), + .lpMediaType = mpeg_splitter_inputs, + }, + { + .dwFlags = REG_PINFLAG_B_ZERO | REG_PINFLAG_B_OUTPUT, + .nMediaTypes = ARRAY_SIZE(mpeg_splitter_audio_outputs), + .lpMediaType = mpeg_splitter_audio_outputs, + }, + { + .dwFlags = REG_PINFLAG_B_ZERO | REG_PINFLAG_B_OUTPUT, + .nMediaTypes = ARRAY_SIZE(mpeg_splitter_video_outputs), + .lpMediaType = mpeg_splitter_video_outputs, + }, + }; + static const REGFILTER2 mpeg_splitter_reg = + { + .dwVersion = 2, + .dwMerit = MERIT_NORMAL, + .cPins2 = ARRAY_SIZE(mpeg_splitter_pins), + .rgPins2 = mpeg_splitter_pins, + }; + IFilterMapper2 *mapper; HRESULT hr;
@@ -198,6 +240,9 @@ HRESULT WINAPI DllRegisterServer(void) if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_ACMWrapper, L"ACM Wrapper", NULL, &CLSID_LegacyAmFilterCategory, NULL, &acm_wrapper_reg))) goto done; + if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_MPEG1Splitter, L"MPEG-I Stream Splitter", NULL, + NULL, NULL, &mpeg_splitter_reg))) + goto done;
done: IFilterMapper2_Release(mapper); @@ -233,6 +278,8 @@ HRESULT WINAPI DllUnregisterServer(void) goto done; if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory, NULL, &CLSID_ACMWrapper))) goto done; + if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_MPEG1Splitter))) + goto done;
done: IFilterMapper2_Release(mapper); diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index 006cd370d99..6bc37e7e024 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -997,6 +997,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) static const GUID CLSID_wg_resampler = {0x92f35e78,0x15a5,0x486b,{0x88,0x8e,0x57,0x5f,0x99,0x65,0x1c,0xe2}}; static const GUID CLSID_wg_wma_decoder = {0x5b4d4e54,0x0620,0x4cf9,{0x94,0xae,0x78,0x23,0x96,0x5c,0x28,0xb6}}; static const GUID CLSID_wg_wmv_decoder = {0x62ee5ddb,0x4f52,0x48e2,{0x89,0x28,0x78,0x7b,0x02,0x53,0xa0,0xbc}}; + static const GUID CLSID_wg_mpeg1_splitter = {0xa8edbf98,0x2442,0x42c5,{0x85,0xa1,0xab,0x05,0xa5,0x80,0xdf,0x53}}; struct class_factory *factory; HRESULT hr;
@@ -1018,7 +1019,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) factory = &mpeg_video_codec_cf; else if (IsEqualGUID(clsid, &CLSID_mpeg_layer3_decoder)) factory = &mpeg_layer3_decoder_cf; - else if (IsEqualGUID(clsid, &CLSID_MPEG1Splitter)) + else if (IsEqualGUID(clsid, &CLSID_wg_mpeg1_splitter)) factory = &mpeg_splitter_cf; else if (IsEqualGUID(clsid, &CLSID_WAVEParser)) factory = &wave_parser_cf; @@ -1198,52 +1199,6 @@ static const REGFILTER2 reg_mpeg_layer3_decoder = .u.s2.rgPins2 = reg_mpeg_layer3_decoder_pins, };
-static const REGPINTYPES reg_mpeg_splitter_sink_mts[4] = -{ - {&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1Audio}, - {&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1Video}, - {&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1System}, - {&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1VideoCD}, -}; - -static const REGPINTYPES reg_mpeg_splitter_audio_mts[2] = -{ - {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Packet}, - {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1AudioPayload}, -}; - -static const REGPINTYPES reg_mpeg_splitter_video_mts[2] = -{ - {&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Packet}, - {&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Payload}, -}; - -static const REGFILTERPINS2 reg_mpeg_splitter_pins[3] = -{ - { - .nMediaTypes = 4, - .lpMediaType = reg_mpeg_splitter_sink_mts, - }, - { - .dwFlags = REG_PINFLAG_B_ZERO | REG_PINFLAG_B_OUTPUT, - .nMediaTypes = 2, - .lpMediaType = reg_mpeg_splitter_audio_mts, - }, - { - .dwFlags = REG_PINFLAG_B_ZERO | REG_PINFLAG_B_OUTPUT, - .nMediaTypes = 2, - .lpMediaType = reg_mpeg_splitter_video_mts, - }, -}; - -static const REGFILTER2 reg_mpeg_splitter = -{ - .dwVersion = 2, - .dwMerit = MERIT_NORMAL, - .u.s2.cPins2 = 3, - .u.s2.rgPins2 = reg_mpeg_splitter_pins, -}; - static const REGPINTYPES reg_wave_parser_sink_mts[3] = { {&MEDIATYPE_Stream, &MEDIASUBTYPE_WAVE}, @@ -1321,8 +1276,6 @@ HRESULT WINAPI DllRegisterServer(void) L"MPEG Video Decoder", NULL, NULL, NULL, ®_mpeg_video_codec); IFilterMapper2_RegisterFilter(mapper, &CLSID_mpeg_layer3_decoder, L"MPEG Layer-3 Decoder", NULL, NULL, NULL, ®_mpeg_layer3_decoder); - IFilterMapper2_RegisterFilter(mapper, &CLSID_MPEG1Splitter, - L"MPEG-I Stream Splitter", NULL, NULL, NULL, ®_mpeg_splitter); IFilterMapper2_RegisterFilter(mapper, &CLSID_WAVEParser, L"Wave Parser", NULL, NULL, NULL, ®_wave_parser);
IFilterMapper2_Release(mapper); @@ -1349,7 +1302,6 @@ HRESULT WINAPI DllUnregisterServer(void) IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_CMpegAudioCodec); IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_CMpegVideoCodec); IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_mpeg_layer3_decoder); - IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_MPEG1Splitter); IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_WAVEParser);
IFilterMapper2_Release(mapper); diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl index 65d3e3c5c1a..34170690de9 100644 --- a/dlls/winegstreamer/winegstreamer_classes.idl +++ b/dlls/winegstreamer/winegstreamer_classes.idl @@ -50,11 +50,10 @@ coclass CMpegVideoCodec {} coclass mpeg_layer3_decoder {}
[ - helpstring("MPEG-I Stream Splitter"), threading(both), - uuid(336475d0-942a-11ce-a870-00aa002feab5) + uuid(a8edbf98-2442-42c5-85a1-ab05a580df53) ] -coclass MPEG1Splitter {} +coclass wg_mpeg1_splitter {}
[ helpstring("Wave Parser"),
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/quartz/main.c | 2 ++ dlls/quartz/parser.c | 18 +++++++++++ dlls/quartz/quartz_private.h | 1 + dlls/quartz/quartz_strmif.idl | 7 +++++ dlls/quartz/regsvr.c | 33 ++++++++++++++++++++ dlls/winegstreamer/main.c | 28 ++--------------- dlls/winegstreamer/winegstreamer_classes.idl | 5 ++- 7 files changed, 65 insertions(+), 29 deletions(-)
diff --git a/dlls/quartz/main.c b/dlls/quartz/main.c index a6932d3210c..6564fb043e9 100644 --- a/dlls/quartz/main.c +++ b/dlls/quartz/main.c @@ -169,6 +169,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
+ if (IsEqualGUID(rclsid, &CLSID_AviSplitter)) + return IClassFactory_QueryInterface(&avi_splitter_factory, riid, ppv); if (IsEqualGUID(rclsid, &CLSID_MPEG1Splitter)) return IClassFactory_QueryInterface(&mpeg1_splitter_factory, riid, ppv);
diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index 3acb7e4e0ab..ad5a4843584 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -18,6 +18,24 @@
#include "quartz_private.h"
+static HRESULT WINAPI avi_splitter_factory_CreateInstance(IClassFactory *iface, IUnknown *outer, + REFIID riid, void **out) +{ + static const GUID CLSID_wg_avi_splitter = {0x272bfbfb,0x50d0,0x4078,{0xb6,0x00,0x1e,0x95,0x9c,0x30,0x13,0x37}}; + return CoCreateInstance(&CLSID_wg_avi_splitter, outer, CLSCTX_INPROC_SERVER, riid, out); +} + +static const IClassFactoryVtbl avi_splitter_factory_vtbl = +{ + class_factory_QueryInterface, + class_factory_AddRef, + class_factory_Release, + avi_splitter_factory_CreateInstance, + class_factory_LockServer, +}; + +IClassFactory avi_splitter_factory = {&avi_splitter_factory_vtbl}; + static HRESULT WINAPI mpeg1_splitter_factory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **out) { diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h index bc3204ed64f..38b72495ec2 100644 --- a/dlls/quartz/quartz_private.h +++ b/dlls/quartz/quartz_private.h @@ -48,6 +48,7 @@ #define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000) #define BYTES_FROM_MEDIATIME(time) ((time) / 10000000)
+extern IClassFactory avi_splitter_factory; extern IClassFactory mpeg1_splitter_factory;
HRESULT acm_wrapper_create(IUnknown *outer, IUnknown **out); diff --git a/dlls/quartz/quartz_strmif.idl b/dlls/quartz/quartz_strmif.idl index bca51a59b31..74158a7fe90 100644 --- a/dlls/quartz/quartz_strmif.idl +++ b/dlls/quartz/quartz_strmif.idl @@ -152,3 +152,10 @@ coclass AllocPresenter {} uuid(336475d0-942a-11ce-a870-00aa002feab5) ] coclass MPEG1Splitter {} + +[ + helpstring("AVI Splitter"), + threading(both), + uuid(1b544c20-fd0b-11ce-8c63-00aa0044b51e) +] +coclass AviSplitter {} diff --git a/dlls/quartz/regsvr.c b/dlls/quartz/regsvr.c index 3a27c83418e..9cd2e18ff7b 100644 --- a/dlls/quartz/regsvr.c +++ b/dlls/quartz/regsvr.c @@ -210,6 +210,34 @@ HRESULT WINAPI DllRegisterServer(void) .rgPins2 = mpeg_splitter_pins, };
+ static const REGPINTYPES avi_splitter_inputs[] = + { + {&MEDIATYPE_Stream, &MEDIASUBTYPE_Avi}, + }; + static const REGPINTYPES avi_splitter_outputs[] = + { + {&MEDIATYPE_Video, &GUID_NULL}, + }; + static const REGFILTERPINS2 avi_splitter_pins[] = + { + { + .nMediaTypes = ARRAY_SIZE(avi_splitter_inputs), + .lpMediaType = avi_splitter_inputs, + }, + { + .dwFlags = REG_PINFLAG_B_OUTPUT, + .nMediaTypes = ARRAY_SIZE(avi_splitter_outputs), + .lpMediaType = avi_splitter_outputs, + }, + }; + static const REGFILTER2 avi_splitter_reg = + { + .dwVersion = 2, + .dwMerit = MERIT_NORMAL, + .cPins2 = ARRAY_SIZE(avi_splitter_pins), + .rgPins2 = avi_splitter_pins, + }; + IFilterMapper2 *mapper; HRESULT hr;
@@ -240,6 +268,9 @@ HRESULT WINAPI DllRegisterServer(void) if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_ACMWrapper, L"ACM Wrapper", NULL, &CLSID_LegacyAmFilterCategory, NULL, &acm_wrapper_reg))) goto done; + if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_AviSplitter, L"AVI Splitter", NULL, + NULL, NULL, &avi_splitter_reg))) + goto done; if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_MPEG1Splitter, L"MPEG-I Stream Splitter", NULL, NULL, NULL, &mpeg_splitter_reg))) goto done; @@ -278,6 +309,8 @@ HRESULT WINAPI DllUnregisterServer(void) goto done; if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, &CLSID_LegacyAmFilterCategory, NULL, &CLSID_ACMWrapper))) goto done; + if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_AviSplitter))) + goto done; if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_MPEG1Splitter))) goto done;
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index 6bc37e7e024..c95927cefb4 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -991,6 +991,7 @@ static struct class_factory mpeg4_sink_class_factory_cf = {{&class_factory_vtbl}
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) { + static const GUID CLSID_wg_avi_splitter = {0x272bfbfb,0x50d0,0x4078,{0xb6,0x00,0x1e,0x95,0x9c,0x30,0x13,0x37}}; static const GUID CLSID_wg_color_converter = {0xf47e2da5,0xe370,0x47b7,{0x90,0x3a,0x07,0x8d,0xdd,0x45,0xa5,0xcc}}; static const GUID CLSID_wg_mp3_sink_factory = {0x1f302877,0xaaab,0x40a3,{0xb9,0xe0,0x9f,0x48,0xda,0xf3,0x5b,0xc8}}; static const GUID CLSID_wg_mpeg4_sink_factory = {0x5d5407d9,0xc6ca,0x4770,{0xa7,0xcc,0x27,0xc0,0xcb,0x8a,0x76,0x27}}; @@ -1009,7 +1010,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) if (SUCCEEDED(hr = mfplat_get_class_object(clsid, iid, out))) return hr;
- if (IsEqualGUID(clsid, &CLSID_AviSplitter)) + if (IsEqualGUID(clsid, &CLSID_wg_avi_splitter)) factory = &avi_splitter_cf; else if (IsEqualGUID(clsid, &CLSID_decodebin_parser)) factory = &decodebin_parser_cf; @@ -1080,29 +1081,6 @@ static const REGPINTYPES reg_audio_mt = {&MEDIATYPE_Audio, &GUID_NULL}; static const REGPINTYPES reg_stream_mt = {&MEDIATYPE_Stream, &GUID_NULL}; static const REGPINTYPES reg_video_mt = {&MEDIATYPE_Video, &GUID_NULL};
-static const REGPINTYPES reg_avi_splitter_sink_mt = {&MEDIATYPE_Stream, &MEDIASUBTYPE_Avi}; - -static const REGFILTERPINS2 reg_avi_splitter_pins[2] = -{ - { - .nMediaTypes = 1, - .lpMediaType = ®_avi_splitter_sink_mt, - }, - { - .dwFlags = REG_PINFLAG_B_OUTPUT, - .nMediaTypes = 1, - .lpMediaType = ®_video_mt, - }, -}; - -static const REGFILTER2 reg_avi_splitter = -{ - .dwVersion = 2, - .dwMerit = MERIT_NORMAL, - .u.s2.cPins2 = 2, - .u.s2.rgPins2 = reg_avi_splitter_pins, -}; - static const REGPINTYPES reg_mpeg_audio_codec_sink_mts[3] = { {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Packet}, @@ -1267,7 +1245,6 @@ HRESULT WINAPI DllRegisterServer(void) &IID_IFilterMapper2, (void **)&mapper))) return hr;
- IFilterMapper2_RegisterFilter(mapper, &CLSID_AviSplitter, L"AVI Splitter", NULL, NULL, NULL, ®_avi_splitter); IFilterMapper2_RegisterFilter(mapper, &CLSID_decodebin_parser, L"GStreamer splitter filter", NULL, NULL, NULL, ®_decodebin_parser); IFilterMapper2_RegisterFilter(mapper, &CLSID_CMpegAudioCodec, @@ -1297,7 +1274,6 @@ HRESULT WINAPI DllUnregisterServer(void) &IID_IFilterMapper2, (void **)&mapper))) return hr;
- IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_AviSplitter); IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_decodebin_parser); IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_CMpegAudioCodec); IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_CMpegVideoCodec); diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl index 34170690de9..665cb9826c4 100644 --- a/dlls/winegstreamer/winegstreamer_classes.idl +++ b/dlls/winegstreamer/winegstreamer_classes.idl @@ -22,11 +22,10 @@ #pragma makedep register
[ - helpstring("AVI Splitter"), threading(both), - uuid(1b544c20-fd0b-11ce-8c63-00aa0044b51e) + uuid(272bfbfb-50d0-4078-b600-1e959c301337) ] -coclass AviSplitter {} +coclass wg_avi_splitter {}
[ helpstring("MPEG Audio Decoder"),
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/quartz/main.c | 2 ++ dlls/quartz/parser.c | 18 ++++++++++ dlls/quartz/quartz_private.h | 1 + dlls/quartz/quartz_strmif.idl | 7 ++++ dlls/quartz/regsvr.c | 35 ++++++++++++++++++++ dlls/winegstreamer/main.c | 32 ++---------------- dlls/winegstreamer/winegstreamer_classes.idl | 5 ++- 7 files changed, 67 insertions(+), 33 deletions(-)
diff --git a/dlls/quartz/main.c b/dlls/quartz/main.c index 6564fb043e9..2a14bf375ed 100644 --- a/dlls/quartz/main.c +++ b/dlls/quartz/main.c @@ -173,6 +173,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) return IClassFactory_QueryInterface(&avi_splitter_factory, riid, ppv); if (IsEqualGUID(rclsid, &CLSID_MPEG1Splitter)) return IClassFactory_QueryInterface(&mpeg1_splitter_factory, riid, ppv); + if (IsEqualGUID(rclsid, &CLSID_WAVEParser)) + return IClassFactory_QueryInterface(&wave_parser_factory, riid, ppv);
if (IsEqualGUID( &IID_IClassFactory, riid ) || IsEqualGUID( &IID_IUnknown, riid)) { diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index ad5a4843584..f515ddfa35b 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -53,3 +53,21 @@ static const IClassFactoryVtbl mpeg1_splitter_factory_vtbl = };
IClassFactory mpeg1_splitter_factory = {&mpeg1_splitter_factory_vtbl}; + +static HRESULT WINAPI wave_parser_factory_CreateInstance(IClassFactory *iface, IUnknown *outer, + REFIID riid, void **out) +{ + static const GUID CLSID_wg_wave_parser = {0x3f839ec7,0x5ea6,0x49e1,{0x80,0xc2,0x1e,0xa3,0x00,0xf8,0xb0,0xe0}}; + return CoCreateInstance(&CLSID_wg_wave_parser, outer, CLSCTX_INPROC_SERVER, riid, out); +} + +static const IClassFactoryVtbl wave_parser_factory_vtbl = +{ + class_factory_QueryInterface, + class_factory_AddRef, + class_factory_Release, + wave_parser_factory_CreateInstance, + class_factory_LockServer, +}; + +IClassFactory wave_parser_factory = {&wave_parser_factory_vtbl}; diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h index 38b72495ec2..f460b2d1132 100644 --- a/dlls/quartz/quartz_private.h +++ b/dlls/quartz/quartz_private.h @@ -50,6 +50,7 @@
extern IClassFactory avi_splitter_factory; extern IClassFactory mpeg1_splitter_factory; +extern IClassFactory wave_parser_factory;
HRESULT acm_wrapper_create(IUnknown *outer, IUnknown **out); HRESULT avi_dec_create(IUnknown *outer, IUnknown **out); diff --git a/dlls/quartz/quartz_strmif.idl b/dlls/quartz/quartz_strmif.idl index 74158a7fe90..4ea198c5ea0 100644 --- a/dlls/quartz/quartz_strmif.idl +++ b/dlls/quartz/quartz_strmif.idl @@ -159,3 +159,10 @@ coclass MPEG1Splitter {} uuid(1b544c20-fd0b-11ce-8c63-00aa0044b51e) ] coclass AviSplitter {} + +[ + helpstring("Wave Parser"), + threading(both), + uuid(d51bd5a1-7548-11cf-a520-0080c77ef58a) +] +coclass WAVEParser {} diff --git a/dlls/quartz/regsvr.c b/dlls/quartz/regsvr.c index 9cd2e18ff7b..6f354404adc 100644 --- a/dlls/quartz/regsvr.c +++ b/dlls/quartz/regsvr.c @@ -238,6 +238,36 @@ HRESULT WINAPI DllRegisterServer(void) .rgPins2 = avi_splitter_pins, };
+ static const REGPINTYPES wave_parser_inputs[] = + { + {&MEDIATYPE_Stream, &MEDIASUBTYPE_WAVE}, + {&MEDIATYPE_Stream, &MEDIASUBTYPE_AU}, + {&MEDIATYPE_Stream, &MEDIASUBTYPE_AIFF}, + }; + static const REGPINTYPES wave_parser_outputs[] = + { + {&MEDIATYPE_Audio, &GUID_NULL}, + }; + static const REGFILTERPINS2 wave_parser_pins[] = + { + { + .nMediaTypes = ARRAY_SIZE(wave_parser_inputs), + .lpMediaType = wave_parser_inputs, + }, + { + .dwFlags = REG_PINFLAG_B_OUTPUT, + .nMediaTypes = ARRAY_SIZE(wave_parser_outputs), + .lpMediaType = wave_parser_outputs, + }, + }; + static const REGFILTER2 wave_parser_reg = + { + .dwVersion = 2, + .dwMerit = MERIT_UNLIKELY, + .cPins2 = ARRAY_SIZE(wave_parser_pins), + .rgPins2 = wave_parser_pins, + }; + IFilterMapper2 *mapper; HRESULT hr;
@@ -274,6 +304,9 @@ HRESULT WINAPI DllRegisterServer(void) if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_MPEG1Splitter, L"MPEG-I Stream Splitter", NULL, NULL, NULL, &mpeg_splitter_reg))) goto done; + if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_WAVEParser, L"Wave Parser", NULL, + NULL, NULL, &wave_parser_reg))) + goto done;
done: IFilterMapper2_Release(mapper); @@ -313,6 +346,8 @@ HRESULT WINAPI DllUnregisterServer(void) goto done; if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_MPEG1Splitter))) goto done; + if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_WAVEParser))) + goto done;
done: IFilterMapper2_Release(mapper); diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index c95927cefb4..33cd3439f62 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -999,6 +999,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) static const GUID CLSID_wg_wma_decoder = {0x5b4d4e54,0x0620,0x4cf9,{0x94,0xae,0x78,0x23,0x96,0x5c,0x28,0xb6}}; static const GUID CLSID_wg_wmv_decoder = {0x62ee5ddb,0x4f52,0x48e2,{0x89,0x28,0x78,0x7b,0x02,0x53,0xa0,0xbc}}; static const GUID CLSID_wg_mpeg1_splitter = {0xa8edbf98,0x2442,0x42c5,{0x85,0xa1,0xab,0x05,0xa5,0x80,0xdf,0x53}}; + static const GUID CLSID_wg_wave_parser = {0x3f839ec7,0x5ea6,0x49e1,{0x80,0xc2,0x1e,0xa3,0x00,0xf8,0xb0,0xe0}}; struct class_factory *factory; HRESULT hr;
@@ -1022,7 +1023,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) factory = &mpeg_layer3_decoder_cf; else if (IsEqualGUID(clsid, &CLSID_wg_mpeg1_splitter)) factory = &mpeg_splitter_cf; - else if (IsEqualGUID(clsid, &CLSID_WAVEParser)) + else if (IsEqualGUID(clsid, &CLSID_wg_wave_parser)) factory = &wave_parser_cf; else if (IsEqualGUID(clsid, &CLSID_wg_wma_decoder)) factory = &wma_decoder_cf; @@ -1177,33 +1178,6 @@ static const REGFILTER2 reg_mpeg_layer3_decoder = .u.s2.rgPins2 = reg_mpeg_layer3_decoder_pins, };
-static const REGPINTYPES reg_wave_parser_sink_mts[3] = -{ - {&MEDIATYPE_Stream, &MEDIASUBTYPE_WAVE}, - {&MEDIATYPE_Stream, &MEDIASUBTYPE_AU}, - {&MEDIATYPE_Stream, &MEDIASUBTYPE_AIFF}, -}; - -static const REGFILTERPINS2 reg_wave_parser_pins[2] = -{ - { - .nMediaTypes = 3, - .lpMediaType = reg_wave_parser_sink_mts, - }, - { - .dwFlags = REG_PINFLAG_B_OUTPUT, - .nMediaTypes = 1, - .lpMediaType = ®_audio_mt, - }, -}; - -static const REGFILTER2 reg_wave_parser = -{ - .dwVersion = 2, - .dwMerit = MERIT_UNLIKELY, - .u.s2.cPins2 = 2, - .u.s2.rgPins2 = reg_wave_parser_pins, -};
static const REGFILTERPINS2 reg_decodebin_parser_pins[3] = { @@ -1253,7 +1227,6 @@ HRESULT WINAPI DllRegisterServer(void) L"MPEG Video Decoder", NULL, NULL, NULL, ®_mpeg_video_codec); IFilterMapper2_RegisterFilter(mapper, &CLSID_mpeg_layer3_decoder, L"MPEG Layer-3 Decoder", NULL, NULL, NULL, ®_mpeg_layer3_decoder); - IFilterMapper2_RegisterFilter(mapper, &CLSID_WAVEParser, L"Wave Parser", NULL, NULL, NULL, ®_wave_parser);
IFilterMapper2_Release(mapper);
@@ -1278,7 +1251,6 @@ HRESULT WINAPI DllUnregisterServer(void) IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_CMpegAudioCodec); IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_CMpegVideoCodec); IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_mpeg_layer3_decoder); - IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_WAVEParser);
IFilterMapper2_Release(mapper);
diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl index 665cb9826c4..f34cf998288 100644 --- a/dlls/winegstreamer/winegstreamer_classes.idl +++ b/dlls/winegstreamer/winegstreamer_classes.idl @@ -55,11 +55,10 @@ coclass mpeg_layer3_decoder {} coclass wg_mpeg1_splitter {}
[ - helpstring("Wave Parser"), threading(both), - uuid(d51bd5a1-7548-11cf-a520-0080c77ef58a) + uuid(3f839ec7-5ea6-49e1-80c2-1ea300f8b0e0) ] -coclass WAVEParser {} +coclass wg_wave_parser {}
[ helpstring("GStreamer parser using decodebin"),
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/quartz/Makefile.in | 1 + dlls/quartz/decoder.c | 37 +++++++++++++++++++ dlls/quartz/main.c | 2 + dlls/quartz/quartz_private.h | 1 + dlls/quartz/quartz_strmif.idl | 7 ++++ dlls/quartz/regsvr.c | 35 ++++++++++++++++++ dlls/winegstreamer/main.c | 39 +------------------- dlls/winegstreamer/winegstreamer_classes.idl | 5 +-- 8 files changed, 87 insertions(+), 40 deletions(-) create mode 100644 dlls/quartz/decoder.c
diff --git a/dlls/quartz/Makefile.in b/dlls/quartz/Makefile.in index ec0c641df07..2d13df56a02 100644 --- a/dlls/quartz/Makefile.in +++ b/dlls/quartz/Makefile.in @@ -7,6 +7,7 @@ SOURCES = \ acmwrapper.c \ avidec.c \ control_tlb.idl \ + decoder.c \ dsoundrender.c \ filesource.c \ filtergraph.c \ diff --git a/dlls/quartz/decoder.c b/dlls/quartz/decoder.c new file mode 100644 index 00000000000..41db48f18ba --- /dev/null +++ b/dlls/quartz/decoder.c @@ -0,0 +1,37 @@ +/* + * Copyright 2024 Rémi Bernon for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "quartz_private.h" + +static HRESULT WINAPI mpeg_audio_codec_factory_CreateInstance(IClassFactory *iface, IUnknown *outer, + REFIID riid, void **out) +{ + static const GUID CLSID_wg_mpeg_audio_decoder = {0xc9f285f8,0x4380,0x4121,{0x97,0x1f,0x49,0xa9,0x53,0x16,0xc2,0x7b}}; + return CoCreateInstance(&CLSID_wg_mpeg_audio_decoder, outer, CLSCTX_INPROC_SERVER, riid, out); +} + +static const IClassFactoryVtbl mpeg_audio_codec_factory_vtbl = +{ + class_factory_QueryInterface, + class_factory_AddRef, + class_factory_Release, + mpeg_audio_codec_factory_CreateInstance, + class_factory_LockServer, +}; + +IClassFactory mpeg_audio_codec_factory = {&mpeg_audio_codec_factory_vtbl}; diff --git a/dlls/quartz/main.c b/dlls/quartz/main.c index 2a14bf375ed..5b31f4c33ce 100644 --- a/dlls/quartz/main.c +++ b/dlls/quartz/main.c @@ -175,6 +175,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) return IClassFactory_QueryInterface(&mpeg1_splitter_factory, riid, ppv); if (IsEqualGUID(rclsid, &CLSID_WAVEParser)) return IClassFactory_QueryInterface(&wave_parser_factory, riid, ppv); + if (IsEqualGUID(rclsid, &CLSID_CMpegAudioCodec)) + return IClassFactory_QueryInterface(&mpeg_audio_codec_factory, riid, ppv);
if (IsEqualGUID( &IID_IClassFactory, riid ) || IsEqualGUID( &IID_IUnknown, riid)) { diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h index f460b2d1132..774d40786d7 100644 --- a/dlls/quartz/quartz_private.h +++ b/dlls/quartz/quartz_private.h @@ -51,6 +51,7 @@ extern IClassFactory avi_splitter_factory; extern IClassFactory mpeg1_splitter_factory; extern IClassFactory wave_parser_factory; +extern IClassFactory mpeg_audio_codec_factory;
HRESULT acm_wrapper_create(IUnknown *outer, IUnknown **out); HRESULT avi_dec_create(IUnknown *outer, IUnknown **out); diff --git a/dlls/quartz/quartz_strmif.idl b/dlls/quartz/quartz_strmif.idl index 4ea198c5ea0..b39ac041662 100644 --- a/dlls/quartz/quartz_strmif.idl +++ b/dlls/quartz/quartz_strmif.idl @@ -166,3 +166,10 @@ coclass AviSplitter {} uuid(d51bd5a1-7548-11cf-a520-0080c77ef58a) ] coclass WAVEParser {} + +[ + helpstring("MPEG Audio Decoder"), + threading(both), + uuid(4a2286e0-7bef-11ce-9bd9-0000e202599c) +] +coclass CMpegAudioCodec {} diff --git a/dlls/quartz/regsvr.c b/dlls/quartz/regsvr.c index 6f354404adc..723b88332db 100644 --- a/dlls/quartz/regsvr.c +++ b/dlls/quartz/regsvr.c @@ -268,6 +268,36 @@ HRESULT WINAPI DllRegisterServer(void) .rgPins2 = wave_parser_pins, };
+ static const REGPINTYPES mpeg_audio_codec_inputs[] = + { + {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Packet}, + {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Payload}, + {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1AudioPayload}, + }; + static const REGPINTYPES mpeg_audio_codec_outputs[] = + { + {&MEDIATYPE_Audio, &MEDIASUBTYPE_PCM}, + }; + static const REGFILTERPINS2 mpeg_audio_codec_pins[] = + { + { + .nMediaTypes = ARRAY_SIZE(mpeg_audio_codec_inputs), + .lpMediaType = mpeg_audio_codec_inputs, + }, + { + .dwFlags = REG_PINFLAG_B_OUTPUT, + .nMediaTypes = ARRAY_SIZE(mpeg_audio_codec_outputs), + .lpMediaType = mpeg_audio_codec_outputs, + }, + }; + static const REGFILTER2 mpeg_audio_codec_reg = + { + .dwVersion = 2, + .dwMerit = 0x03680001, + .cPins2 = ARRAY_SIZE(mpeg_audio_codec_pins), + .rgPins2 = mpeg_audio_codec_pins, + }; + IFilterMapper2 *mapper; HRESULT hr;
@@ -307,6 +337,9 @@ HRESULT WINAPI DllRegisterServer(void) if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_WAVEParser, L"Wave Parser", NULL, NULL, NULL, &wave_parser_reg))) goto done; + if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_CMpegAudioCodec, L"MPEG Audio Decoder", NULL, + NULL, NULL, &mpeg_audio_codec_reg))) + goto done;
done: IFilterMapper2_Release(mapper); @@ -348,6 +381,8 @@ HRESULT WINAPI DllUnregisterServer(void) goto done; if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_WAVEParser))) goto done; + if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_CMpegAudioCodec))) + goto done;
done: IFilterMapper2_Release(mapper); diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index 33cd3439f62..6e0ce7284ea 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -995,6 +995,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) static const GUID CLSID_wg_color_converter = {0xf47e2da5,0xe370,0x47b7,{0x90,0x3a,0x07,0x8d,0xdd,0x45,0xa5,0xcc}}; static const GUID CLSID_wg_mp3_sink_factory = {0x1f302877,0xaaab,0x40a3,{0xb9,0xe0,0x9f,0x48,0xda,0xf3,0x5b,0xc8}}; static const GUID CLSID_wg_mpeg4_sink_factory = {0x5d5407d9,0xc6ca,0x4770,{0xa7,0xcc,0x27,0xc0,0xcb,0x8a,0x76,0x27}}; + static const GUID CLSID_wg_mpeg_audio_decoder = {0xc9f285f8,0x4380,0x4121,{0x97,0x1f,0x49,0xa9,0x53,0x16,0xc2,0x7b}}; static const GUID CLSID_wg_resampler = {0x92f35e78,0x15a5,0x486b,{0x88,0x8e,0x57,0x5f,0x99,0x65,0x1c,0xe2}}; static const GUID CLSID_wg_wma_decoder = {0x5b4d4e54,0x0620,0x4cf9,{0x94,0xae,0x78,0x23,0x96,0x5c,0x28,0xb6}}; static const GUID CLSID_wg_wmv_decoder = {0x62ee5ddb,0x4f52,0x48e2,{0x89,0x28,0x78,0x7b,0x02,0x53,0xa0,0xbc}}; @@ -1015,7 +1016,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) factory = &avi_splitter_cf; else if (IsEqualGUID(clsid, &CLSID_decodebin_parser)) factory = &decodebin_parser_cf; - else if (IsEqualGUID(clsid, &CLSID_CMpegAudioCodec)) + else if (IsEqualGUID(clsid, &CLSID_wg_mpeg_audio_decoder)) factory = &mpeg_audio_codec_cf; else if (IsEqualGUID(clsid, &CLSID_CMpegVideoCodec)) factory = &mpeg_video_codec_cf; @@ -1082,39 +1083,6 @@ static const REGPINTYPES reg_audio_mt = {&MEDIATYPE_Audio, &GUID_NULL}; static const REGPINTYPES reg_stream_mt = {&MEDIATYPE_Stream, &GUID_NULL}; static const REGPINTYPES reg_video_mt = {&MEDIATYPE_Video, &GUID_NULL};
-static const REGPINTYPES reg_mpeg_audio_codec_sink_mts[3] = -{ - {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Packet}, - {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Payload}, - {&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1AudioPayload}, -}; - -static const REGPINTYPES reg_mpeg_audio_codec_source_mts[1] = -{ - {&MEDIATYPE_Audio, &MEDIASUBTYPE_PCM}, -}; - -static const REGFILTERPINS2 reg_mpeg_audio_codec_pins[2] = -{ - { - .nMediaTypes = 3, - .lpMediaType = reg_mpeg_audio_codec_sink_mts, - }, - { - .dwFlags = REG_PINFLAG_B_OUTPUT, - .nMediaTypes = 1, - .lpMediaType = reg_mpeg_audio_codec_source_mts, - }, -}; - -static const REGFILTER2 reg_mpeg_audio_codec = -{ - .dwVersion = 2, - .dwMerit = 0x03680001, - .u.s2.cPins2 = 2, - .u.s2.rgPins2 = reg_mpeg_audio_codec_pins, -}; - static const REGPINTYPES reg_mpeg_video_codec_sink_mts[2] = { {&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Packet}, @@ -1221,8 +1189,6 @@ HRESULT WINAPI DllRegisterServer(void)
IFilterMapper2_RegisterFilter(mapper, &CLSID_decodebin_parser, L"GStreamer splitter filter", NULL, NULL, NULL, ®_decodebin_parser); - IFilterMapper2_RegisterFilter(mapper, &CLSID_CMpegAudioCodec, - L"MPEG Audio Decoder", NULL, NULL, NULL, ®_mpeg_audio_codec); IFilterMapper2_RegisterFilter(mapper, &CLSID_CMpegVideoCodec, L"MPEG Video Decoder", NULL, NULL, NULL, ®_mpeg_video_codec); IFilterMapper2_RegisterFilter(mapper, &CLSID_mpeg_layer3_decoder, @@ -1248,7 +1214,6 @@ HRESULT WINAPI DllUnregisterServer(void) return hr;
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_decodebin_parser); - IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_CMpegAudioCodec); IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_CMpegVideoCodec); IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_mpeg_layer3_decoder);
diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl index f34cf998288..821f7db3763 100644 --- a/dlls/winegstreamer/winegstreamer_classes.idl +++ b/dlls/winegstreamer/winegstreamer_classes.idl @@ -28,11 +28,10 @@ coclass wg_avi_splitter {}
[ - helpstring("MPEG Audio Decoder"), threading(both), - uuid(4a2286e0-7bef-11ce-9bd9-0000e202599c) + uuid(c9f285f8-4380-4121-971f-49a95316c27b) ] -coclass CMpegAudioCodec {} +coclass wg_mpeg_audio_decoder {}
[ helpstring("MPEG Video Decoder"),
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/quartz/decoder.c | 18 ++++++++++ dlls/quartz/main.c | 2 ++ dlls/quartz/quartz_private.h | 1 + dlls/quartz/quartz_strmif.idl | 7 ++++ dlls/quartz/regsvr.c | 34 ++++++++++++++++++ dlls/winegstreamer/main.c | 38 ++------------------ dlls/winegstreamer/winegstreamer_classes.idl | 5 ++- 7 files changed, 66 insertions(+), 39 deletions(-)
diff --git a/dlls/quartz/decoder.c b/dlls/quartz/decoder.c index 41db48f18ba..82bea2d1f39 100644 --- a/dlls/quartz/decoder.c +++ b/dlls/quartz/decoder.c @@ -35,3 +35,21 @@ static const IClassFactoryVtbl mpeg_audio_codec_factory_vtbl = };
IClassFactory mpeg_audio_codec_factory = {&mpeg_audio_codec_factory_vtbl}; + +static HRESULT WINAPI mpeg_video_codec_factory_CreateInstance(IClassFactory *iface, IUnknown *outer, + REFIID riid, void **out) +{ + static const GUID CLSID_wg_mpeg_video_decoder = {0x5ed2e5f6,0xbf3e,0x4180,{0x83,0xa4,0x48,0x47,0xcc,0x5b,0x4e,0xa3}}; + return CoCreateInstance(&CLSID_wg_mpeg_video_decoder, outer, CLSCTX_INPROC_SERVER, riid, out); +} + +static const IClassFactoryVtbl mpeg_video_codec_factory_vtbl = +{ + class_factory_QueryInterface, + class_factory_AddRef, + class_factory_Release, + mpeg_video_codec_factory_CreateInstance, + class_factory_LockServer, +}; + +IClassFactory mpeg_video_codec_factory = {&mpeg_video_codec_factory_vtbl}; diff --git a/dlls/quartz/main.c b/dlls/quartz/main.c index 5b31f4c33ce..aaaf825e1ac 100644 --- a/dlls/quartz/main.c +++ b/dlls/quartz/main.c @@ -177,6 +177,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) return IClassFactory_QueryInterface(&wave_parser_factory, riid, ppv); if (IsEqualGUID(rclsid, &CLSID_CMpegAudioCodec)) return IClassFactory_QueryInterface(&mpeg_audio_codec_factory, riid, ppv); + if (IsEqualGUID(rclsid, &CLSID_CMpegVideoCodec)) + return IClassFactory_QueryInterface(&mpeg_video_codec_factory, riid, ppv);
if (IsEqualGUID( &IID_IClassFactory, riid ) || IsEqualGUID( &IID_IUnknown, riid)) { diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h index 774d40786d7..3a01582e151 100644 --- a/dlls/quartz/quartz_private.h +++ b/dlls/quartz/quartz_private.h @@ -52,6 +52,7 @@ extern IClassFactory avi_splitter_factory; extern IClassFactory mpeg1_splitter_factory; extern IClassFactory wave_parser_factory; extern IClassFactory mpeg_audio_codec_factory; +extern IClassFactory mpeg_video_codec_factory;
HRESULT acm_wrapper_create(IUnknown *outer, IUnknown **out); HRESULT avi_dec_create(IUnknown *outer, IUnknown **out); diff --git a/dlls/quartz/quartz_strmif.idl b/dlls/quartz/quartz_strmif.idl index b39ac041662..ad63352ff07 100644 --- a/dlls/quartz/quartz_strmif.idl +++ b/dlls/quartz/quartz_strmif.idl @@ -173,3 +173,10 @@ coclass WAVEParser {} uuid(4a2286e0-7bef-11ce-9bd9-0000e202599c) ] coclass CMpegAudioCodec {} + +[ + helpstring("MPEG Video Decoder"), + threading(both), + uuid(feb50740-7bef-11ce-9bd9-0000e202599c) +] +coclass CMpegVideoCodec {} diff --git a/dlls/quartz/regsvr.c b/dlls/quartz/regsvr.c index 723b88332db..219b6247506 100644 --- a/dlls/quartz/regsvr.c +++ b/dlls/quartz/regsvr.c @@ -298,6 +298,35 @@ HRESULT WINAPI DllRegisterServer(void) .rgPins2 = mpeg_audio_codec_pins, };
+ static const REGPINTYPES mpeg_video_codec_inputs[] = + { + {&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Packet}, + {&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Payload}, + }; + static const REGPINTYPES mpeg_video_codec_outputs[] = + { + {&MEDIATYPE_Video, &GUID_NULL}, + }; + static const REGFILTERPINS2 mpeg_video_codec_pins[] = + { + { + .nMediaTypes = ARRAY_SIZE(mpeg_video_codec_inputs), + .lpMediaType = mpeg_video_codec_inputs, + }, + { + .dwFlags = REG_PINFLAG_B_OUTPUT, + .nMediaTypes = ARRAY_SIZE(mpeg_video_codec_outputs), + .lpMediaType = mpeg_video_codec_outputs, + }, + }; + static const REGFILTER2 mpeg_video_codec_reg = + { + .dwVersion = 2, + .dwMerit = 0x40000001, + .cPins2 = ARRAY_SIZE(mpeg_video_codec_pins), + .rgPins2 = mpeg_video_codec_pins, + }; + IFilterMapper2 *mapper; HRESULT hr;
@@ -340,6 +369,9 @@ HRESULT WINAPI DllRegisterServer(void) if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_CMpegAudioCodec, L"MPEG Audio Decoder", NULL, NULL, NULL, &mpeg_audio_codec_reg))) goto done; + if (FAILED(hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_CMpegVideoCodec, L"MPEG Video Decoder", NULL, + NULL, NULL, &mpeg_video_codec_reg))) + goto done;
done: IFilterMapper2_Release(mapper); @@ -383,6 +415,8 @@ HRESULT WINAPI DllUnregisterServer(void) goto done; if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_CMpegAudioCodec))) goto done; + if (FAILED(hr = IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_CMpegVideoCodec))) + goto done;
done: IFilterMapper2_Release(mapper); diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index 6e0ce7284ea..5822723722d 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -996,6 +996,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) static const GUID CLSID_wg_mp3_sink_factory = {0x1f302877,0xaaab,0x40a3,{0xb9,0xe0,0x9f,0x48,0xda,0xf3,0x5b,0xc8}}; static const GUID CLSID_wg_mpeg4_sink_factory = {0x5d5407d9,0xc6ca,0x4770,{0xa7,0xcc,0x27,0xc0,0xcb,0x8a,0x76,0x27}}; static const GUID CLSID_wg_mpeg_audio_decoder = {0xc9f285f8,0x4380,0x4121,{0x97,0x1f,0x49,0xa9,0x53,0x16,0xc2,0x7b}}; + static const GUID CLSID_wg_mpeg_video_decoder = {0x5ed2e5f6,0xbf3e,0x4180,{0x83,0xa4,0x48,0x47,0xcc,0x5b,0x4e,0xa3}}; static const GUID CLSID_wg_resampler = {0x92f35e78,0x15a5,0x486b,{0x88,0x8e,0x57,0x5f,0x99,0x65,0x1c,0xe2}}; static const GUID CLSID_wg_wma_decoder = {0x5b4d4e54,0x0620,0x4cf9,{0x94,0xae,0x78,0x23,0x96,0x5c,0x28,0xb6}}; static const GUID CLSID_wg_wmv_decoder = {0x62ee5ddb,0x4f52,0x48e2,{0x89,0x28,0x78,0x7b,0x02,0x53,0xa0,0xbc}}; @@ -1018,7 +1019,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) factory = &decodebin_parser_cf; else if (IsEqualGUID(clsid, &CLSID_wg_mpeg_audio_decoder)) factory = &mpeg_audio_codec_cf; - else if (IsEqualGUID(clsid, &CLSID_CMpegVideoCodec)) + else if (IsEqualGUID(clsid, &CLSID_wg_mpeg_video_decoder)) factory = &mpeg_video_codec_cf; else if (IsEqualGUID(clsid, &CLSID_mpeg_layer3_decoder)) factory = &mpeg_layer3_decoder_cf; @@ -1083,38 +1084,6 @@ static const REGPINTYPES reg_audio_mt = {&MEDIATYPE_Audio, &GUID_NULL}; static const REGPINTYPES reg_stream_mt = {&MEDIATYPE_Stream, &GUID_NULL}; static const REGPINTYPES reg_video_mt = {&MEDIATYPE_Video, &GUID_NULL};
-static const REGPINTYPES reg_mpeg_video_codec_sink_mts[2] = -{ - {&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Packet}, - {&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Payload}, -}; - -static const REGPINTYPES reg_mpeg_video_codec_source_mts[1] = -{ - {&MEDIATYPE_Video, &GUID_NULL}, -}; - -static const REGFILTERPINS2 reg_mpeg_video_codec_pins[2] = -{ - { - .nMediaTypes = 2, - .lpMediaType = reg_mpeg_video_codec_sink_mts, - }, - { - .dwFlags = REG_PINFLAG_B_OUTPUT, - .nMediaTypes = 1, - .lpMediaType = reg_mpeg_video_codec_source_mts, - }, -}; - -static const REGFILTER2 reg_mpeg_video_codec = -{ - .dwVersion = 2, - .dwMerit = 0x40000001, - .u.s2.cPins2 = 2, - .u.s2.rgPins2 = reg_mpeg_video_codec_pins, -}; - static const REGPINTYPES reg_mpeg_layer3_decoder_sink_mts[1] = { {&MEDIATYPE_Audio, &MEDIASUBTYPE_MP3}, @@ -1189,8 +1158,6 @@ HRESULT WINAPI DllRegisterServer(void)
IFilterMapper2_RegisterFilter(mapper, &CLSID_decodebin_parser, L"GStreamer splitter filter", NULL, NULL, NULL, ®_decodebin_parser); - IFilterMapper2_RegisterFilter(mapper, &CLSID_CMpegVideoCodec, - L"MPEG Video Decoder", NULL, NULL, NULL, ®_mpeg_video_codec); IFilterMapper2_RegisterFilter(mapper, &CLSID_mpeg_layer3_decoder, L"MPEG Layer-3 Decoder", NULL, NULL, NULL, ®_mpeg_layer3_decoder);
@@ -1214,7 +1181,6 @@ HRESULT WINAPI DllUnregisterServer(void) return hr;
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_decodebin_parser); - IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_CMpegVideoCodec); IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_mpeg_layer3_decoder);
IFilterMapper2_Release(mapper); diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl index 821f7db3763..1438f9d663c 100644 --- a/dlls/winegstreamer/winegstreamer_classes.idl +++ b/dlls/winegstreamer/winegstreamer_classes.idl @@ -34,11 +34,10 @@ coclass wg_avi_splitter {} coclass wg_mpeg_audio_decoder {}
[ - helpstring("MPEG Video Decoder"), threading(both), - uuid(feb50740-7bef-11ce-9bd9-0000e202599c) + uuid(5ed2e5f6-bf3e-4180-83a4-4847cc5b4ea3) ] -coclass CMpegVideoCodec {} +coclass wg_mpeg_video_decoder {}
[ helpstring("MPEG Layer-3 Decoder"),
From: Rémi Bernon rbernon@codeweavers.com
--- configure.ac | 1 + dlls/l3codecx.ax/Makefile.in | 10 ++ dlls/l3codecx.ax/l3codecx.ax.spec | 3 + dlls/l3codecx.ax/l3codecx.c | 114 +++++++++++++++++++ dlls/l3codecx.ax/l3codecx.idl | 26 +++++ dlls/quartz/decoder.c | 18 +++ dlls/quartz/quartz_private.h | 1 + dlls/winegstreamer/main.c | 40 +------ dlls/winegstreamer/winegstreamer_classes.idl | 5 +- loader/wine.inf.in | 1 + 10 files changed, 178 insertions(+), 41 deletions(-) create mode 100644 dlls/l3codecx.ax/Makefile.in create mode 100644 dlls/l3codecx.ax/l3codecx.ax.spec create mode 100644 dlls/l3codecx.ax/l3codecx.c create mode 100644 dlls/l3codecx.ax/l3codecx.idl
diff --git a/configure.ac b/configure.ac index 4dcb780013a..be0b9d3a930 100644 --- a/configure.ac +++ b/configure.ac @@ -2785,6 +2785,7 @@ WINE_CONFIG_MAKEFILE(dlls/ksproxy.ax) WINE_CONFIG_MAKEFILE(dlls/ksuser) WINE_CONFIG_MAKEFILE(dlls/ktmw32) WINE_CONFIG_MAKEFILE(dlls/l3codeca.acm) +WINE_CONFIG_MAKEFILE(dlls/l3codecx.ax) WINE_CONFIG_MAKEFILE(dlls/light.msstyles) WINE_CONFIG_MAKEFILE(dlls/loadperf) WINE_CONFIG_MAKEFILE(dlls/localspl) diff --git a/dlls/l3codecx.ax/Makefile.in b/dlls/l3codecx.ax/Makefile.in new file mode 100644 index 00000000000..dd5e9d53693 --- /dev/null +++ b/dlls/l3codecx.ax/Makefile.in @@ -0,0 +1,10 @@ +MODULE = l3codecx.ax +IMPORTS = combase msdmo dmoguids strmiids wmcodecdspuuid uuid +PARENTSRC = ../quartz + +EXTRADLLFLAGS = -Wb,--prefer-native + +SOURCES = \ + decoder.c \ + l3codecx.c \ + l3codecx.idl diff --git a/dlls/l3codecx.ax/l3codecx.ax.spec b/dlls/l3codecx.ax/l3codecx.ax.spec new file mode 100644 index 00000000000..b717c9c9371 --- /dev/null +++ b/dlls/l3codecx.ax/l3codecx.ax.spec @@ -0,0 +1,3 @@ +@ stdcall -private DllGetClassObject(ptr ptr ptr) +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() diff --git a/dlls/l3codecx.ax/l3codecx.c b/dlls/l3codecx.ax/l3codecx.c new file mode 100644 index 00000000000..8c45347adec --- /dev/null +++ b/dlls/l3codecx.ax/l3codecx.c @@ -0,0 +1,114 @@ +/* + * Copyright 2024 Rémi Bernon for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "quartz_private.h" +#include "mpegtype.h" +#include "rpcproxy.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); + +#include "initguid.h" + +DEFINE_GUID(CLSID_MPEGLayer3Decoder,0x38be3000,0xdbf4,0x11d0,0x86,0x0e,0x00,0xa0,0x24,0xcf,0xef,0x6d); +DEFINE_GUID(MEDIASUBTYPE_MP3,WAVE_FORMAT_MPEGLAYER3,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71); + +/*********************************************************************** + * DllGetClassObject (l3codecx.@) + */ +HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) +{ + if (IsEqualGUID(clsid, &CLSID_MPEGLayer3Decoder)) + return IClassFactory_QueryInterface(&mp3_decoder_factory, iid, out); + + *out = NULL; + FIXME("Unknown clsid %s.\n", debugstr_guid(clsid)); + return CLASS_E_CLASSNOTAVAILABLE; +} + +/*********************************************************************** + * DllRegisterServer (l3codecx.@) + */ +HRESULT WINAPI DllRegisterServer(void) +{ + static const REGPINTYPES mpeg_layer3_decoder_inputs[] = + { + {&MEDIATYPE_Audio, &MEDIASUBTYPE_MP3}, + }; + static const REGPINTYPES mpeg_layer3_decoder_outputs[] = + { + {&MEDIATYPE_Audio, &MEDIASUBTYPE_PCM}, + }; + static const REGFILTERPINS2 mpeg_layer3_decoder_pins[] = + { + { + .nMediaTypes = ARRAY_SIZE(mpeg_layer3_decoder_inputs), + .lpMediaType = mpeg_layer3_decoder_inputs, + }, + { + .dwFlags = REG_PINFLAG_B_OUTPUT, + .nMediaTypes = ARRAY_SIZE(mpeg_layer3_decoder_outputs), + .lpMediaType = mpeg_layer3_decoder_outputs, + }, + }; + static const REGFILTER2 mpeg_layer3_decoder_desc = + { + .dwVersion = 2, + .dwMerit = 0x00810000, + .cPins2 = ARRAY_SIZE(mpeg_layer3_decoder_pins), + .rgPins2 = mpeg_layer3_decoder_pins, + }; + + IFilterMapper2 *mapper; + HRESULT hr; + + TRACE(".\n"); + + if (FAILED(hr = __wine_register_resources())) + return hr; + + if (FAILED(hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, + &IID_IFilterMapper2, (void **)&mapper))) + return hr; + hr = IFilterMapper2_RegisterFilter(mapper, &CLSID_MPEGLayer3Decoder, L"MPEG Layer-3 Decoder", NULL, + NULL, NULL, &mpeg_layer3_decoder_desc); + IFilterMapper2_Release(mapper); + return hr; +} + +/*********************************************************************** + * DllUnregisterServer (l3codecx.@) + */ +HRESULT WINAPI DllUnregisterServer(void) +{ + IFilterMapper2 *mapper; + HRESULT hr; + + TRACE(".\n"); + + if (FAILED(hr = __wine_unregister_resources())) + return hr; + + if (FAILED(hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, + &IID_IFilterMapper2, (void **)&mapper))) + return hr; + hr = IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_MPEGLayer3Decoder); + IFilterMapper2_Release(mapper); + return S_OK; +} diff --git a/dlls/l3codecx.ax/l3codecx.idl b/dlls/l3codecx.ax/l3codecx.idl new file mode 100644 index 00000000000..22f5a5f285d --- /dev/null +++ b/dlls/l3codecx.ax/l3codecx.idl @@ -0,0 +1,26 @@ +/* + * Copyright 2024 Rémi Bernon for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma makedep register + +[ + helpstring("MPEG Layer-3 Decoder"), + threading(both), + uuid(38be3000-dbf4-11d0-860e-00a024cfef6d) +] +coclass MPEGLayer3Decoder {} diff --git a/dlls/quartz/decoder.c b/dlls/quartz/decoder.c index 82bea2d1f39..83efec158d5 100644 --- a/dlls/quartz/decoder.c +++ b/dlls/quartz/decoder.c @@ -18,6 +18,24 @@
#include "quartz_private.h"
+static HRESULT WINAPI mp3_decoder_factory_CreateInstance(IClassFactory *iface, IUnknown *outer, + REFIID riid, void **out) +{ + static const GUID CLSID_wg_mp3_decoder = {0x84cd8e3e,0xb221,0x434a,{0x88,0x82,0x9d,0x6c,0x8d,0xf4,0x90,0xe1}}; + return CoCreateInstance(&CLSID_wg_mp3_decoder, outer, CLSCTX_INPROC_SERVER, riid, out); +} + +static const IClassFactoryVtbl mp3_decoder_factory_vtbl = +{ + class_factory_QueryInterface, + class_factory_AddRef, + class_factory_Release, + mp3_decoder_factory_CreateInstance, + class_factory_LockServer, +}; + +IClassFactory mp3_decoder_factory = {&mp3_decoder_factory_vtbl}; + static HRESULT WINAPI mpeg_audio_codec_factory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **out) { diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h index 3a01582e151..d58c5953b13 100644 --- a/dlls/quartz/quartz_private.h +++ b/dlls/quartz/quartz_private.h @@ -51,6 +51,7 @@ extern IClassFactory avi_splitter_factory; extern IClassFactory mpeg1_splitter_factory; extern IClassFactory wave_parser_factory; +extern IClassFactory mp3_decoder_factory; extern IClassFactory mpeg_audio_codec_factory; extern IClassFactory mpeg_video_codec_factory;
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index 5822723722d..d18db8b21e8 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -41,8 +41,6 @@ WINE_DECLARE_DEBUG_CHANNEL(wmvcore); DEFINE_GUID(GUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); DEFINE_GUID(MEDIASUBTYPE_VC1S,MAKEFOURCC('V','C','1','S'),0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-static const GUID MEDIASUBTYPE_MP3 = {0x00000055, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; - bool array_reserve(void **elements, size_t *capacity, size_t count, size_t size) { unsigned int new_capacity, max_capacity; @@ -1000,6 +998,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) static const GUID CLSID_wg_resampler = {0x92f35e78,0x15a5,0x486b,{0x88,0x8e,0x57,0x5f,0x99,0x65,0x1c,0xe2}}; static const GUID CLSID_wg_wma_decoder = {0x5b4d4e54,0x0620,0x4cf9,{0x94,0xae,0x78,0x23,0x96,0x5c,0x28,0xb6}}; static const GUID CLSID_wg_wmv_decoder = {0x62ee5ddb,0x4f52,0x48e2,{0x89,0x28,0x78,0x7b,0x02,0x53,0xa0,0xbc}}; + static const GUID CLSID_wg_mp3_decoder = {0x84cd8e3e,0xb221,0x434a,{0x88,0x82,0x9d,0x6c,0x8d,0xf4,0x90,0xe1}}; static const GUID CLSID_wg_mpeg1_splitter = {0xa8edbf98,0x2442,0x42c5,{0x85,0xa1,0xab,0x05,0xa5,0x80,0xdf,0x53}}; static const GUID CLSID_wg_wave_parser = {0x3f839ec7,0x5ea6,0x49e1,{0x80,0xc2,0x1e,0xa3,0x00,0xf8,0xb0,0xe0}}; struct class_factory *factory; @@ -1021,7 +1020,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) factory = &mpeg_audio_codec_cf; else if (IsEqualGUID(clsid, &CLSID_wg_mpeg_video_decoder)) factory = &mpeg_video_codec_cf; - else if (IsEqualGUID(clsid, &CLSID_mpeg_layer3_decoder)) + else if (IsEqualGUID(clsid, &CLSID_wg_mp3_decoder)) factory = &mpeg_layer3_decoder_cf; else if (IsEqualGUID(clsid, &CLSID_wg_mpeg1_splitter)) factory = &mpeg_splitter_cf; @@ -1084,38 +1083,6 @@ static const REGPINTYPES reg_audio_mt = {&MEDIATYPE_Audio, &GUID_NULL}; static const REGPINTYPES reg_stream_mt = {&MEDIATYPE_Stream, &GUID_NULL}; static const REGPINTYPES reg_video_mt = {&MEDIATYPE_Video, &GUID_NULL};
-static const REGPINTYPES reg_mpeg_layer3_decoder_sink_mts[1] = -{ - {&MEDIATYPE_Audio, &MEDIASUBTYPE_MP3}, -}; - -static const REGPINTYPES reg_mpeg_layer3_decoder_source_mts[1] = -{ - {&MEDIATYPE_Audio, &MEDIASUBTYPE_PCM}, -}; - -static const REGFILTERPINS2 reg_mpeg_layer3_decoder_pins[2] = -{ - { - .nMediaTypes = 1, - .lpMediaType = reg_mpeg_layer3_decoder_sink_mts, - }, - { - .dwFlags = REG_PINFLAG_B_OUTPUT, - .nMediaTypes = 1, - .lpMediaType = reg_mpeg_layer3_decoder_source_mts, - }, -}; - -static const REGFILTER2 reg_mpeg_layer3_decoder = -{ - .dwVersion = 2, - .dwMerit = 0x00810000, - .u.s2.cPins2 = 2, - .u.s2.rgPins2 = reg_mpeg_layer3_decoder_pins, -}; - - static const REGFILTERPINS2 reg_decodebin_parser_pins[3] = { { @@ -1158,8 +1125,6 @@ HRESULT WINAPI DllRegisterServer(void)
IFilterMapper2_RegisterFilter(mapper, &CLSID_decodebin_parser, L"GStreamer splitter filter", NULL, NULL, NULL, ®_decodebin_parser); - IFilterMapper2_RegisterFilter(mapper, &CLSID_mpeg_layer3_decoder, - L"MPEG Layer-3 Decoder", NULL, NULL, NULL, ®_mpeg_layer3_decoder);
IFilterMapper2_Release(mapper);
@@ -1181,7 +1146,6 @@ HRESULT WINAPI DllUnregisterServer(void) return hr;
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_decodebin_parser); - IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_mpeg_layer3_decoder);
IFilterMapper2_Release(mapper);
diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl index 1438f9d663c..bb9f81c2341 100644 --- a/dlls/winegstreamer/winegstreamer_classes.idl +++ b/dlls/winegstreamer/winegstreamer_classes.idl @@ -40,11 +40,10 @@ coclass wg_mpeg_audio_decoder {} coclass wg_mpeg_video_decoder {}
[ - helpstring("MPEG Layer-3 Decoder"), threading(both), - uuid(38be3000-dbf4-11d0-860e-00a024cfef6d) + uuid(84cd8e3e-b221-434a-8882-9d6c8df490e1) ] -coclass mpeg_layer3_decoder {} +coclass wg_mp3_decoder {}
[ threading(both), diff --git a/loader/wine.inf.in b/loader/wine.inf.in index 7adba6e080a..ac1a20ef46a 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -2107,6 +2107,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 11,,cryptdlg.dll,1 11,,cryptnet.dll,1 11,,devenum.dll,1 +11,,l3codecx.ax,1 11,,mfasfsrcsnk.dll,1 11,,mfh264enc.dll,1 11,,mfmp4srcsnk.dll,1
Why not use the existing object_creation[] array?
As long as you're rewriting most of regsvr.c would you mind just merging that file into main.c?
Emil Velikov (@xexaxo) commented about dlls/l3codecx.ax/Makefile.in:
+MODULE = l3codecx.ax +IMPORTS = combase msdmo dmoguids strmiids wmcodecdspuuid uuid +PARENTSRC = ../quartz
+EXTRADLLFLAGS = -Wb,--prefer-native
The initial PR adds prefer-natier decorations to the new DLLs. The second PR does not and this one also adds them.
Is that intentional, what's the distinction between them?
On Wed Sep 4 17:02:25 2024 +0000, Emil Velikov wrote:
The initial PR adds prefer-natier decorations to the new DLLs. The second PR does not and this one also adds them. Is that intentional, what's the distinction between them?
It's not entirely intentional, the mfsrcsnk DLL had prefer-native already so I kept it for the other related DLLs. Then I added it for everything else but changed my mind about the DMO transforms, which are already implemented without it.
This here is a left-over of the initial version, although it may be worth keeping. I don't mind either way.
On Wed Sep 4 18:24:20 2024 +0000, Elizabeth Figura wrote:
Why not use the existing object_creation[] array? As long as you're rewriting most of regsvr.c would you mind just merging that file into main.c?
As I'm forwarding the call to another CoCreateInstance it seemed better to pass all the parameters through untouched.
As long as you're rewriting most of regsvr.c would you mind just merging that file into main.c?
Sure.
On Wed Sep 4 18:23:12 2024 +0000, Rémi Bernon wrote:
It's not entirely intentional, the mfsrcsnk DLL had prefer-native already so I kept it for the other related DLLs. Then I added it for everything else but changed my mind about the DMO transforms, which are already implemented without it. This here is a left-over of the initial version, although it may be worth keeping. I don't mind either way.
Ack, was double checking since there were a few "add missing prefer-native" MRs recently. Thanks
As I'm forwarding the call to another CoCreateInstance it seemed better to pass all the parameters through untouched.
I'm not sure I see why? What parameters are meaningfully touched?