2 * DirectShow filter for QuickTime Toolkit on Mac OS X
4 * Copyright (C) 2010 Aric Stewart, CodeWeavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
27 #define NONAMELESSSTRUCT
28 #define NONAMELESSUNION
39 #include "wine/unicode.h"
40 #include "wine/debug.h"
41 #include "wine/strmbase.h"
44 DEFINE_GUID(CLSID_QTVDecoder, 0x683DDACB, 0x4354, 0x490C, 0xA0,0x58, 0xE0,0x5A,0xD0,0xF2,0x05,0x37);
45 DEFINE_GUID(CLSID_QTSplitter, 0xD0E70E49, 0x5927, 0x4894, 0xA3,0x86, 0x35,0x94,0x60,0xEE,0x87,0xC9);
46 DEFINE_GUID(WINESUBTYPE_QTSplitter, 0xFFFFFFFF, 0x5927, 0x4894, 0xA3,0x86, 0x35,0x94,0x60,0xEE,0x87,0xC9);
48 WINE_DEFAULT_DEBUG_CHANNEL(qtdecoder);
50 extern IUnknown * CALLBACK QTVDecoder_create(IUnknown * pUnkOuter, HRESULT* phr);
51 extern IUnknown * CALLBACK QTSplitter_create(IUnknown * pUnkOuter, HRESULT* phr);
53 static const WCHAR wQTVName[] =
54 {'Q','T',' ','V','i','d','e','o',' ','D','e','c','o','d','e','r',0};
55 static const WCHAR wQTDName[] =
56 {'Q','T',' ','V','i','d','e','o',' ','D','e','m','u','x',0};
57 static WCHAR wNull[] = {'\0'};
59 static const AMOVIESETUP_MEDIATYPE amfMTvideo[] =
60 { { &MEDIATYPE_Video, &MEDIASUBTYPE_NULL } };
61 static const AMOVIESETUP_MEDIATYPE amfMTaudio[] =
62 { { &MEDIATYPE_Audio, &MEDIASUBTYPE_NULL } };
63 static const AMOVIESETUP_MEDIATYPE amfMTstream[] =
64 { { &MEDIATYPE_Stream, &WINESUBTYPE_QTSplitter},
65 { &MEDIATYPE_Stream, &MEDIASUBTYPE_NULL } };
67 static const AMOVIESETUP_PIN amfQTVPin[] =
69 FALSE, FALSE, FALSE, FALSE,
77 FALSE, TRUE, FALSE, FALSE,
85 static const AMOVIESETUP_PIN amfQTDPin[] =
87 FALSE, FALSE, FALSE, FALSE,
95 FALSE, TRUE, TRUE, FALSE,
103 FALSE, TRUE, TRUE, FALSE,
111 static const AMOVIESETUP_FILTER amfQTV =
119 static const AMOVIESETUP_FILTER amfQTD =
127 FactoryTemplate const g_Templates[] = {
144 int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
145 static HINSTANCE hInst = NULL;
147 /***********************************************************************
148 * Dll EntryPoint (wineqtdecoder.@)
150 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
153 return STRMBASE_DllMain(hInstDLL,fdwReason,lpv);
156 /***********************************************************************
159 HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
161 return STRMBASE_DllGetClassObject( rclsid, riid, ppv );
164 /***********************************************************************
165 * DllRegisterServer (wineqtdecoder.@)
167 HRESULT WINAPI DllRegisterServer(void)
171 hr = AMovieDllRegisterServer2(TRUE);
173 hr = __wine_register_resources(hInst);
177 /***********************************************************************
178 * DllUnregisterServer (wineqtdecoder.@)
180 HRESULT WINAPI DllUnregisterServer(void)
184 hr = AMovieDllRegisterServer2(FALSE);
186 hr = __wine_unregister_resources(hInst);
190 /***********************************************************************
191 * DllCanUnloadNow (wineqtdecoder.@)
193 HRESULT WINAPI DllCanUnloadNow(void)
196 return STRMBASE_DllCanUnloadNow();