From: Rémi Bernon rbernon@codeweavers.com
--- configure.ac | 1 + dlls/mfasfsrcsnk/Makefile.in | 11 ++++++++ dlls/mfasfsrcsnk/mfasfsrcsnk.c | 36 +++++++++++++++++++++++ dlls/mfasfsrcsnk/mfasfsrcsnk.idl | 26 +++++++++++++++++ dlls/mfasfsrcsnk/mfasfsrcsnk.rc | 24 ++++++++++++++++ dlls/mfasfsrcsnk/mfasfsrcsnk.rgs | 47 +++++++++++++++++++++++++++++++ dlls/mfasfsrcsnk/mfasfsrcsnk.spec | 3 ++ dlls/mfsrcsnk/media_source.c | 18 ++++++++++++ dlls/mfsrcsnk/media_source.h | 1 + include/wine/mfinternal.idl | 1 + loader/wine.inf.in | 1 + 11 files changed, 169 insertions(+) create mode 100644 dlls/mfasfsrcsnk/Makefile.in create mode 100644 dlls/mfasfsrcsnk/mfasfsrcsnk.c create mode 100644 dlls/mfasfsrcsnk/mfasfsrcsnk.idl create mode 100644 dlls/mfasfsrcsnk/mfasfsrcsnk.rc create mode 100644 dlls/mfasfsrcsnk/mfasfsrcsnk.rgs create mode 100644 dlls/mfasfsrcsnk/mfasfsrcsnk.spec
diff --git a/configure.ac b/configure.ac index d47e8fd8050..f87a234a955 100644 --- a/configure.ac +++ b/configure.ac @@ -2805,6 +2805,7 @@ WINE_CONFIG_MAKEFILE(dlls/mciwave) WINE_CONFIG_MAKEFILE(dlls/mf) WINE_CONFIG_MAKEFILE(dlls/mf/tests) WINE_CONFIG_MAKEFILE(dlls/mf3216) +WINE_CONFIG_MAKEFILE(dlls/mfasfsrcsnk) WINE_CONFIG_MAKEFILE(dlls/mferror) WINE_CONFIG_MAKEFILE(dlls/mfmediaengine) WINE_CONFIG_MAKEFILE(dlls/mfmediaengine/tests) diff --git a/dlls/mfasfsrcsnk/Makefile.in b/dlls/mfasfsrcsnk/Makefile.in new file mode 100644 index 00000000000..f450c304d3b --- /dev/null +++ b/dlls/mfasfsrcsnk/Makefile.in @@ -0,0 +1,11 @@ +MODULE = mfasfsrcsnk.dll +IMPORTS = ole32 mfplat mfuuid uuid +PARENTSRC = ../mfsrcsnk + +EXTRADLLFLAGS = -Wb,--prefer-native + +SOURCES = \ + media_source.c \ + mfasfsrcsnk.c \ + mfasfsrcsnk.idl \ + mfasfsrcsnk.rc diff --git a/dlls/mfasfsrcsnk/mfasfsrcsnk.c b/dlls/mfasfsrcsnk/mfasfsrcsnk.c new file mode 100644 index 00000000000..090ac14a8aa --- /dev/null +++ b/dlls/mfasfsrcsnk/mfasfsrcsnk.c @@ -0,0 +1,36 @@ +/* + * 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 "media_source.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(mfplat); + +/*********************************************************************** + * DllGetClassObject (mfsrcsnk.@) + */ +HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, void **out) +{ + if (IsEqualGUID(clsid, &CLSID_AsfByteStreamPlugin)) + return IClassFactory_QueryInterface(&asf_byte_stream_plugin_factory, riid, out); + + *out = NULL; + FIXME("Unknown clsid %s.\n", debugstr_guid(clsid)); + return CLASS_E_CLASSNOTAVAILABLE; +} diff --git a/dlls/mfasfsrcsnk/mfasfsrcsnk.idl b/dlls/mfasfsrcsnk/mfasfsrcsnk.idl new file mode 100644 index 00000000000..2a368106cb9 --- /dev/null +++ b/dlls/mfasfsrcsnk/mfasfsrcsnk.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("ASF Byte Stream Handler"), + threading(both), + uuid(41457294-644c-4298-a28a-bd69f2c0cf3b) +] +coclass AsfByteStreamPlugin {} diff --git a/dlls/mfasfsrcsnk/mfasfsrcsnk.rc b/dlls/mfasfsrcsnk/mfasfsrcsnk.rc new file mode 100644 index 00000000000..4761406f699 --- /dev/null +++ b/dlls/mfasfsrcsnk/mfasfsrcsnk.rc @@ -0,0 +1,24 @@ +/* + * 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 "windef.h" + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +/* @makedep: mfasfsrcsnk.rgs */ +1 WINE_REGISTRY mfasfsrcsnk.rgs diff --git a/dlls/mfasfsrcsnk/mfasfsrcsnk.rgs b/dlls/mfasfsrcsnk/mfasfsrcsnk.rgs new file mode 100644 index 00000000000..39761c1e6fb --- /dev/null +++ b/dlls/mfasfsrcsnk/mfasfsrcsnk.rgs @@ -0,0 +1,47 @@ +HKLM +{ + NoRemove 'Software' + { + NoRemove 'Microsoft' + { + NoRemove 'Windows Media Foundation' + { + NoRemove 'ByteStreamHandlers' + { + '.asf' + { + val '{41457294-644c-4298-a28a-bd69f2c0cf3b}' = s 'ASF Byte Stream Handler' + } + '.wm' + { + val '{41457294-644c-4298-a28a-bd69f2c0cf3b}' = s 'ASF Byte Stream Handler' + } + '.wma' + { + val '{41457294-644c-4298-a28a-bd69f2c0cf3b}' = s 'ASF Byte Stream Handler' + } + '.wmv' + { + val '{41457294-644c-4298-a28a-bd69f2c0cf3b}' = s 'ASF Byte Stream Handler' + } + 'audio/x-ms-wma' + { + val '{41457294-644c-4298-a28a-bd69f2c0cf3b}' = s 'ASF Byte Stream Handler' + } + 'video/x-ms-asf' + { + val '{41457294-644c-4298-a28a-bd69f2c0cf3b}' = s 'ASF Byte Stream Handler' + } + 'video/x-ms-wm' + { + val '{41457294-644c-4298-a28a-bd69f2c0cf3b}' = s 'ASF Byte Stream Handler' + } + 'video/x-ms-wmv' + { + val '{41457294-644c-4298-a28a-bd69f2c0cf3b}' = s 'ASF Byte Stream Handler' + } + } + } + } + } +} diff --git a/dlls/mfasfsrcsnk/mfasfsrcsnk.spec b/dlls/mfasfsrcsnk/mfasfsrcsnk.spec new file mode 100644 index 00000000000..b717c9c9371 --- /dev/null +++ b/dlls/mfasfsrcsnk/mfasfsrcsnk.spec @@ -0,0 +1,3 @@ +@ stdcall -private DllGetClassObject(ptr ptr ptr) +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() diff --git a/dlls/mfsrcsnk/media_source.c b/dlls/mfsrcsnk/media_source.c index cdd00ece965..8c02743e811 100644 --- a/dlls/mfsrcsnk/media_source.c +++ b/dlls/mfsrcsnk/media_source.c @@ -20,6 +20,24 @@
#include "wine/debug.h"
+static HRESULT WINAPI asf_byte_stream_plugin_factory_CreateInstance(IClassFactory *iface, + IUnknown *outer, REFIID riid, void **out) +{ + static const GUID CLSID_GStreamerByteStreamHandler = {0x317df618,0x5e5a,0x468a,{0x9f,0x15,0xd8,0x27,0xa9,0xa0,0x81,0x62}}; + return CoCreateInstance(&CLSID_GStreamerByteStreamHandler, outer, CLSCTX_INPROC_SERVER, riid, out); +} + +static const IClassFactoryVtbl asf_byte_stream_plugin_factory_vtbl = +{ + class_factory_QueryInterface, + class_factory_AddRef, + class_factory_Release, + asf_byte_stream_plugin_factory_CreateInstance, + class_factory_LockServer, +}; + +IClassFactory asf_byte_stream_plugin_factory = {&asf_byte_stream_plugin_factory_vtbl}; + static HRESULT WINAPI avi_byte_stream_plugin_factory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **out) { diff --git a/dlls/mfsrcsnk/media_source.h b/dlls/mfsrcsnk/media_source.h index 6ac052c1594..1e6c90ea7d5 100644 --- a/dlls/mfsrcsnk/media_source.h +++ b/dlls/mfsrcsnk/media_source.h @@ -20,6 +20,7 @@
#include "wine/debug.h"
+extern IClassFactory asf_byte_stream_plugin_factory; extern IClassFactory avi_byte_stream_plugin_factory; extern IClassFactory mpeg4_byte_stream_plugin_factory; extern IClassFactory wav_byte_stream_plugin_factory; diff --git a/include/wine/mfinternal.idl b/include/wine/mfinternal.idl index e2a33c9cf2f..0106c2b50d5 100644 --- a/include/wine/mfinternal.idl +++ b/include/wine/mfinternal.idl @@ -53,6 +53,7 @@ cpp_quote("DEFINE_GUID(CLSID_MFMP3SinkClassFactory, 0x11275a82, 0x5e5a, 0x47fd, cpp_quote("DEFINE_GUID(CLSID_MFMPEG4SinkClassFactory, 0xa22c4fc7, 0x6e91, 0x4e1d, 0x89, 0xe9, 0x53, 0xb2, 0x66, 0x7b, 0x72, 0xba);") cpp_quote("DEFINE_GUID(CLSID_MFWAVESinkClassFactory, 0x36f99745, 0x23c9, 0x4c9c, 0x8d, 0xd5, 0xcc, 0x31, 0xce, 0x96, 0x43, 0x90);")
+cpp_quote("DEFINE_GUID(CLSID_AsfByteStreamPlugin, 0x41457294, 0x644c, 0x4298, 0xa2, 0x8a, 0xbd, 0x69, 0xf2, 0xc0, 0xcf, 0x3b);") cpp_quote("DEFINE_GUID(CLSID_AVIByteStreamPlugin, 0x7afa253e, 0xf823, 0x42f6, 0xa5, 0xd9, 0x71, 0x4b, 0xde, 0x46, 0x74, 0x12);") cpp_quote("DEFINE_GUID(CLSID_MPEG4ByteStreamHandlerPlugin, 0x271c3902, 0x6095, 0x4c45, 0xa2, 0x2f, 0x20, 0x09, 0x18, 0x16, 0xee, 0x9e);") cpp_quote("DEFINE_GUID(CLSID_WAVByteStreamPlugin, 0x42c9b9f5, 0x16fc, 0x47ef, 0xaf, 0x22, 0xda, 0x05, 0xf7, 0xc8, 0x42, 0xe3);") diff --git a/loader/wine.inf.in b/loader/wine.inf.in index b7a11f86b53..f300700b0f8 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -2106,6 +2106,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 11,,cryptdlg.dll,1 11,,cryptnet.dll,1 11,,devenum.dll,1 +11,,mfasfsrcsnk.dll,1 11,,mfmp4srcsnk.dll,1 11,,mp3dmod.dll,1 11,,mscoree.dll,1