wined3d: Allow color fills on FBO attachable surfaces in ffp_blit_supported().
[wine] / dlls / wineqtdecoder / main.c
1 /*
2  * DirectShow filter for QuickTime Toolkit on Mac OS X
3  *
4  * Copyright (C) 2010 Aric Stewart, CodeWeavers
5  *
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.
10  *
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.
15  *
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
19  */
20 #include "config.h"
21
22 #include <assert.h>
23 #include <stdio.h>
24 #include <stdarg.h>
25
26 #define COBJMACROS
27 #define NONAMELESSSTRUCT
28 #define NONAMELESSUNION
29
30 #include "windef.h"
31 #include "winbase.h"
32 #include "wingdi.h"
33 #include "winerror.h"
34 #include "objbase.h"
35 #include "uuids.h"
36 #include "strmif.h"
37
38 #include "wine/unicode.h"
39 #include "wine/debug.h"
40 #include "wine/strmbase.h"
41
42 #include "initguid.h"
43 DEFINE_GUID(CLSID_QTVDecoder, 0x683DDACB, 0x4354, 0x490C, 0xA0,0x58, 0xE0,0x5A,0xD0,0xF2,0x05,0x37);
44 DEFINE_GUID(CLSID_QTSplitter,    0xD0E70E49, 0x5927, 0x4894, 0xA3,0x86, 0x35,0x94,0x60,0xEE,0x87,0xC9);
45
46 WINE_DEFAULT_DEBUG_CHANNEL(qtdecoder);
47
48 extern IUnknown * CALLBACK QTVDecoder_create(IUnknown * pUnkOuter, HRESULT* phr);
49 extern IUnknown * CALLBACK QTSplitter_create(IUnknown * pUnkOuter, HRESULT* phr);
50
51 static const WCHAR wQTVName[] =
52 {'Q','T',' ','V','i','d','e','o',' ','D','e','c','o','d','e','r',0};
53 static const WCHAR wQTDName[] =
54 {'Q','T',' ','V','i','d','e','o',' ','D','e','m','u','x',0};
55 static WCHAR wNull[] = {'\0'};
56
57 static const AMOVIESETUP_MEDIATYPE amfMTvideo[] =
58 {   { &MEDIATYPE_Video, &MEDIASUBTYPE_NULL } };
59 static const AMOVIESETUP_MEDIATYPE amfMTaudio[] =
60 {   { &MEDIATYPE_Audio, &MEDIASUBTYPE_NULL } };
61 static const AMOVIESETUP_MEDIATYPE amfMTstream[] =
62 {   { &MEDIATYPE_Stream, &MEDIASUBTYPE_NULL } };
63
64 static const AMOVIESETUP_PIN amfQTVPin[] =
65 {   {   wNull,
66         FALSE, FALSE, FALSE, FALSE,
67         &GUID_NULL,
68         NULL,
69         1,
70         amfMTvideo
71     },
72     {
73         wNull,
74         FALSE, TRUE, FALSE, FALSE,
75         &GUID_NULL,
76         NULL,
77         1,
78         amfMTvideo
79     },
80 };
81
82 static const AMOVIESETUP_PIN amfQTDPin[] =
83 {   {   wNull,
84         FALSE, FALSE, FALSE, FALSE,
85         &GUID_NULL,
86         NULL,
87         1,
88         amfMTstream
89     },
90     {
91         wNull,
92         FALSE, TRUE, TRUE, FALSE,
93         &GUID_NULL,
94         NULL,
95         1,
96         amfMTvideo
97     },
98     {
99         wNull,
100         FALSE, TRUE, TRUE, FALSE,
101         &GUID_NULL,
102         NULL,
103         1,
104         amfMTaudio
105     },
106 };
107
108 static const AMOVIESETUP_FILTER amfQTV =
109 {   &CLSID_QTVDecoder,
110     wQTVName,
111     MERIT_NORMAL,
112     2,
113     amfQTVPin
114 };
115
116 static const AMOVIESETUP_FILTER amfQTD =
117 {   &CLSID_QTSplitter,
118     wQTDName,
119     MERIT_NORMAL,
120     3,
121     amfQTDPin
122 };
123
124 FactoryTemplate const g_Templates[] = {
125     {
126         wQTVName,
127         &CLSID_QTVDecoder,
128         QTVDecoder_create,
129         NULL,
130         &amfQTV,
131     },
132     {
133         wQTDName,
134         &CLSID_QTSplitter,
135         QTSplitter_create,
136         NULL,
137         &amfQTD,
138     }
139 };
140
141 int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
142
143 /***********************************************************************
144  *    Dll EntryPoint (wineqtdecoder.@)
145  */
146 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
147 {
148     return STRMBASE_DllMain(hInstDLL,fdwReason,lpv);
149 }
150
151 /***********************************************************************
152  *    DllGetClassObject
153  */
154 HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
155 {
156     return STRMBASE_DllGetClassObject( rclsid, riid, ppv );
157 }
158
159 /***********************************************************************
160  *    DllRegisterServer (wineqtdecoder.@)
161  */
162 HRESULT WINAPI DllRegisterServer(void)
163 {
164     TRACE("()\n");
165     return AMovieDllRegisterServer2(TRUE);
166 }
167
168 /***********************************************************************
169  *    DllUnregisterServer (wineqtdecoder.@)
170  */
171 HRESULT WINAPI DllUnregisterServer(void)
172 {
173     TRACE("\n");
174     return AMovieDllRegisterServer2(FALSE);
175 }
176
177 /***********************************************************************
178  *    DllCanUnloadNow (wineqtdecoder.@)
179  */
180 HRESULT WINAPI DllCanUnloadNow(void)
181 {
182     TRACE("\n");
183     return STRMBASE_DllCanUnloadNow();
184 }