Aric Stewart : wineqtdecoder: Register the QT Splitter to be a default potential handler for all unhandled streams .
Alexandre Julliard
julliard at winehq.org
Mon Apr 9 13:09:16 CDT 2012
Module: wine
Branch: master
Commit: 9fba260ae46918e5f88294143515a087ce2a8314
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9fba260ae46918e5f88294143515a087ce2a8314
Author: Aric Stewart <aric at codeweavers.com>
Date: Wed Apr 4 12:31:42 2012 -0500
wineqtdecoder: Register the QT Splitter to be a default potential handler for all unhandled streams.
---
dlls/wineqtdecoder/Makefile.in | 3 +++
dlls/wineqtdecoder/main.c | 21 +++++++++++++++++----
dlls/wineqtdecoder/rsrc.rc | 28 ++++++++++++++++++++++++++++
dlls/wineqtdecoder/wineqtdecoder.rgs | 14 ++++++++++++++
4 files changed, 62 insertions(+), 4 deletions(-)
diff --git a/dlls/wineqtdecoder/Makefile.in b/dlls/wineqtdecoder/Makefile.in
index 45cbfa1..52ee03b 100644
--- a/dlls/wineqtdecoder/Makefile.in
+++ b/dlls/wineqtdecoder/Makefile.in
@@ -9,4 +9,7 @@ C_SRCS = \
qtutils.c \
qtvdecoder.c
+RC_SRCS = \
+ rsrc.rc
+
@MAKE_DLL_RULES@
diff --git a/dlls/wineqtdecoder/main.c b/dlls/wineqtdecoder/main.c
index e6e7e60..c7dd76c 100644
--- a/dlls/wineqtdecoder/main.c
+++ b/dlls/wineqtdecoder/main.c
@@ -34,6 +34,7 @@
#include "objbase.h"
#include "uuids.h"
#include "strmif.h"
+#include "rpcproxy.h"
#include "wine/unicode.h"
#include "wine/debug.h"
@@ -42,6 +43,7 @@
#include "initguid.h"
DEFINE_GUID(CLSID_QTVDecoder, 0x683DDACB, 0x4354, 0x490C, 0xA0,0x58, 0xE0,0x5A,0xD0,0xF2,0x05,0x37);
DEFINE_GUID(CLSID_QTSplitter, 0xD0E70E49, 0x5927, 0x4894, 0xA3,0x86, 0x35,0x94,0x60,0xEE,0x87,0xC9);
+DEFINE_GUID(WINESUBTYPE_QTSplitter, 0xFFFFFFFF, 0x5927, 0x4894, 0xA3,0x86, 0x35,0x94,0x60,0xEE,0x87,0xC9);
WINE_DEFAULT_DEBUG_CHANNEL(qtdecoder);
@@ -59,7 +61,8 @@ static const AMOVIESETUP_MEDIATYPE amfMTvideo[] =
static const AMOVIESETUP_MEDIATYPE amfMTaudio[] =
{ { &MEDIATYPE_Audio, &MEDIASUBTYPE_NULL } };
static const AMOVIESETUP_MEDIATYPE amfMTstream[] =
-{ { &MEDIATYPE_Stream, &MEDIASUBTYPE_NULL } };
+{ { &MEDIATYPE_Stream, &WINESUBTYPE_QTSplitter},
+ { &MEDIATYPE_Stream, &MEDIASUBTYPE_NULL } };
static const AMOVIESETUP_PIN amfQTVPin[] =
{ { wNull,
@@ -84,7 +87,7 @@ static const AMOVIESETUP_PIN amfQTDPin[] =
FALSE, FALSE, FALSE, FALSE,
&GUID_NULL,
NULL,
- 1,
+ 2,
amfMTstream
},
{
@@ -139,12 +142,14 @@ FactoryTemplate const g_Templates[] = {
};
int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
+static HINSTANCE hInst = NULL;
/***********************************************************************
* Dll EntryPoint (wineqtdecoder.@)
*/
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
+ hInst = hInstDLL;
return STRMBASE_DllMain(hInstDLL,fdwReason,lpv);
}
@@ -161,8 +166,12 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
*/
HRESULT WINAPI DllRegisterServer(void)
{
+ HRESULT hr;
TRACE("()\n");
- return AMovieDllRegisterServer2(TRUE);
+ hr = AMovieDllRegisterServer2(TRUE);
+ if (SUCCEEDED(hr))
+ hr = __wine_register_resources(hInst);
+ return hr;
}
/***********************************************************************
@@ -170,8 +179,12 @@ HRESULT WINAPI DllRegisterServer(void)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
+ HRESULT hr;
TRACE("\n");
- return AMovieDllRegisterServer2(FALSE);
+ hr = AMovieDllRegisterServer2(FALSE);
+ if (SUCCEEDED(hr))
+ hr = __wine_unregister_resources(hInst);
+ return hr;
}
/***********************************************************************
diff --git a/dlls/wineqtdecoder/rsrc.rc b/dlls/wineqtdecoder/rsrc.rc
new file mode 100644
index 0000000..8615033
--- /dev/null
+++ b/dlls/wineqtdecoder/rsrc.rc
@@ -0,0 +1,28 @@
+/*
+ * 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
+ */
+
+#define WINE_FILEDESCRIPTION_STR "Wine QT Decoder"
+#define WINE_FILENAME_STR "wineqtdecoder.dll"
+#define WINE_FILEVERSION 0,0,1,0
+#define WINE_FILEVERSION_STR "0.0.1.0"
+#define WINE_PRODUCTVERSION 0,0,1,0
+#define WINE_PRODUCTVERSION_STR "1.0.1.0"
+#define WINE_EXTRAVALUES VALUE "OLESelfRegister",""
+
+#include "wine/wine_common_ver.rc"
+
+/* @makedep: wineqtdecoder.rgs */
+2 WINE_REGISTRY wineqtdecoder.rgs
diff --git a/dlls/wineqtdecoder/wineqtdecoder.rgs b/dlls/wineqtdecoder/wineqtdecoder.rgs
new file mode 100644
index 0000000..1c495b3
--- /dev/null
+++ b/dlls/wineqtdecoder/wineqtdecoder.rgs
@@ -0,0 +1,14 @@
+HKCR
+{
+ NoRemove 'Media Type'
+ {
+ NoRemove '{E436EB83-524F-11CE-9F53-0020AF0BA770}'
+ {
+ ForceRemove '{FFFFFFFF-5927-4894-A386-359460EE87C9}'
+ {
+ val '0' = s '0,1,00,0'
+ val 'Source Filter' = s '{E436EBB5-524F-11CE-9F53-0020AF0BA770}'
+ }
+ }
+ }
+}
More information about the wine-cvs
mailing list