From: Rémi Bernon rbernon@codeweavers.com
--- dlls/mfsrcsnk/Makefile.in | 2 ++ dlls/mfsrcsnk/factory.c | 4 +++- dlls/mfsrcsnk/media_source.c | 39 ++++++++++++++++++++++++++++++++++++ dlls/mfsrcsnk/media_source.h | 23 +++++++++++++++++++++ dlls/mfsrcsnk/mfsrcsnk.idl | 7 +++++++ dlls/mfsrcsnk/mfsrcsnk.rc | 24 ++++++++++++++++++++++ dlls/mfsrcsnk/mfsrcsnk.rgs | 31 ++++++++++++++++++++++++++++ include/wine/mfinternal.idl | 2 ++ 8 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 dlls/mfsrcsnk/media_source.c create mode 100644 dlls/mfsrcsnk/media_source.h create mode 100644 dlls/mfsrcsnk/mfsrcsnk.rc create mode 100644 dlls/mfsrcsnk/mfsrcsnk.rgs
diff --git a/dlls/mfsrcsnk/Makefile.in b/dlls/mfsrcsnk/Makefile.in index 7a3f947eb0c..4b4d209e8c2 100644 --- a/dlls/mfsrcsnk/Makefile.in +++ b/dlls/mfsrcsnk/Makefile.in @@ -6,5 +6,7 @@ EXTRADLLFLAGS = -Wb,--prefer-native
SOURCES = \ factory.c \ + media_source.c \ mfsrcsnk.idl \ + mfsrcsnk.rc \ wave.c diff --git a/dlls/mfsrcsnk/factory.c b/dlls/mfsrcsnk/factory.c index 66434ef7092..e89129f9e03 100644 --- a/dlls/mfsrcsnk/factory.c +++ b/dlls/mfsrcsnk/factory.c @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "mfsrcsnk_private.h" +#include "media_source.h"
#include "wine/debug.h"
@@ -29,6 +29,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, void **out) { *out = NULL;
+ if (IsEqualGUID(clsid, &CLSID_AVIByteStreamPlugin)) + return IClassFactory_QueryInterface(&avi_byte_stream_plugin_factory, riid, out); if (IsEqualGUID(clsid, &CLSID_MFWAVESinkClassFactory)) return IClassFactory_QueryInterface(wave_sink_class_factory, riid, out);
diff --git a/dlls/mfsrcsnk/media_source.c b/dlls/mfsrcsnk/media_source.c new file mode 100644 index 00000000000..0c765ab9494 --- /dev/null +++ b/dlls/mfsrcsnk/media_source.c @@ -0,0 +1,39 @@ +/* + * 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 "mfsrcsnk_private.h" + +#include "wine/debug.h" + +static HRESULT WINAPI avi_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 avi_byte_stream_plugin_factory_vtbl = +{ + class_factory_QueryInterface, + class_factory_AddRef, + class_factory_Release, + avi_byte_stream_plugin_factory_CreateInstance, + class_factory_LockServer, +}; + +IClassFactory avi_byte_stream_plugin_factory = {&avi_byte_stream_plugin_factory_vtbl}; diff --git a/dlls/mfsrcsnk/media_source.h b/dlls/mfsrcsnk/media_source.h new file mode 100644 index 00000000000..63333658086 --- /dev/null +++ b/dlls/mfsrcsnk/media_source.h @@ -0,0 +1,23 @@ +/* + * 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 "mfsrcsnk_private.h" + +#include "wine/debug.h" + +extern IClassFactory avi_byte_stream_plugin_factory; diff --git a/dlls/mfsrcsnk/mfsrcsnk.idl b/dlls/mfsrcsnk/mfsrcsnk.idl index 13bdac2977e..e40831d7a7f 100644 --- a/dlls/mfsrcsnk/mfsrcsnk.idl +++ b/dlls/mfsrcsnk/mfsrcsnk.idl @@ -18,6 +18,13 @@
#pragma makedep register
+[ + helpstring("AVI Byte Stream Handler"), + threading(both), + uuid(7afa253e-f823-42f6-a5d9-714bde467412) +] +coclass AVIByteStreamPlugin { } + [ helpstring("MF WAVE Sink Factory"), threading(both), diff --git a/dlls/mfsrcsnk/mfsrcsnk.rc b/dlls/mfsrcsnk/mfsrcsnk.rc new file mode 100644 index 00000000000..363aa8aa971 --- /dev/null +++ b/dlls/mfsrcsnk/mfsrcsnk.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: mfsrcsnk.rgs */ +1 WINE_REGISTRY mfsrcsnk.rgs diff --git a/dlls/mfsrcsnk/mfsrcsnk.rgs b/dlls/mfsrcsnk/mfsrcsnk.rgs new file mode 100644 index 00000000000..ee897e464a2 --- /dev/null +++ b/dlls/mfsrcsnk/mfsrcsnk.rgs @@ -0,0 +1,31 @@ +HKLM +{ + NoRemove 'Software' + { + NoRemove 'Microsoft' + { + NoRemove 'Windows Media Foundation' + { + NoRemove 'ByteStreamHandlers' + { + '.avi' + { + val '{7afa253e-f823-42f6-a5d9-714bde467412}' = s 'AVI Byte Stream Handler' + } + 'video/avi' + { + val '{7afa253e-f823-42f6-a5d9-714bde467412}' = s 'AVI Byte Stream Handler' + } + 'video/msvideo' + { + val '{7afa253e-f823-42f6-a5d9-714bde467412}' = s 'AVI Byte Stream Handler' + } + 'video/x-msvideo' + { + val '{7afa253e-f823-42f6-a5d9-714bde467412}' = s 'AVI Byte Stream Handler' + } + } + } + } + } +} diff --git a/include/wine/mfinternal.idl b/include/wine/mfinternal.idl index 9dbb5fcb47e..41cac45bbbb 100644 --- a/include/wine/mfinternal.idl +++ b/include/wine/mfinternal.idl @@ -52,3 +52,5 @@ cpp_quote("DEFINE_GUID(CLSID_MFFMPEG4SinkClassFactory, 0x60f9f51e, 0x4613, 0x4b3 cpp_quote("DEFINE_GUID(CLSID_MFMP3SinkClassFactory, 0x11275a82, 0x5e5a, 0x47fd, 0xa0, 0x1c, 0x36, 0x83, 0xc1, 0x2f, 0xb1, 0x96);") 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_AVIByteStreamPlugin, 0x7afa253e, 0xf823, 0x42f6, 0xa5, 0xd9, 0x71, 0x4b, 0xde, 0x46, 0x74, 0x12);")