ReactOS 0.4.15-dev-8417-gb6b82fe
qcap_main.c
Go to the documentation of this file.
1/*
2 * Qcap implementation, dllentry points
3 *
4 * Copyright (C) 2003 Dominik Strasser
5 * Copyright (C) 2005 Rolf Kalbermatter
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21#include "config.h"
22
23#include <assert.h>
24#include <stdio.h>
25#include <stdarg.h>
26
27#define COBJMACROS
28
29#include "windef.h"
30#include "winbase.h"
31#include "wingdi.h"
32#include "winerror.h"
33#include "objbase.h"
34#include "uuids.h"
35#include "strmif.h"
36
37#include "qcap_main.h"
38
39#include "wine/unicode.h"
40#include "wine/debug.h"
41
43
44static LONG objects_ref = 0;
45
46static const WCHAR wAudioCaptureFilter[] =
47{'A','u','d','i','o',' ','C','a','p','t','u','r','e',' ','F','i','l','t','e','r',0};
48static const WCHAR wAVICompressor[] =
49{'A','V','I',' ','C','o','m','p','r','e','s','s','o','r',0};
50static const WCHAR wVFWCaptFilter[] =
51{'V','F','W',' ','C','a','p','t','u','r','e',' ','F','i','l','t','e','r',0};
52static const WCHAR wVFWCaptFilterProp[] =
53{'V','F','W',' ','C','a','p','t','u','r','e',' ','F','i','l','t','e','r',' ',
54 'P','r','o','p','e','r','t','y',' ','P','a','g','e',0};
55static const WCHAR wAVIMux[] =
56{'A','V','I',' ','m','u','x',0};
57static const WCHAR wAVIMuxPropPage[] =
58{'A','V','I',' ','m','u','x',' ','P','r','o','p','e','r','t','y',' ','P','a','g','e',0};
59static const WCHAR wAVIMuxPropPage1[] =
60{'A','V','I',' ','m','u','x',' ','P','r','o','p','e','r','t','y',' ','P','a','g','e','1',0};
61static const WCHAR wFileWriter[] =
62{'F','i','l','e',' ','W','r','i','t','e','r',0};
63static const WCHAR wCaptGraphBuilder[] =
64{'C','a','p','t','u','r','e',' ','G','r','a','p','h',' ','B','u','i','l','d','e','r',0};
65static const WCHAR wCaptGraphBuilder2[] =
66{'C','a','p','t','u','r','e',' ','G','r','a','p','h',' ','B','u','i','l','d','e','r','2',0};
67static const WCHAR wInfPinTeeFilter[] =
68{'I','n','f','i','n','i','t','e',' ','P','i','n',' ','T','e','e',' ','F','i',
69 'l','t','e','r',0};
70static const WCHAR wSmartTeeFilter[] =
71{'S','m','a','r','t',' ','T','e','e',' ','F','i','l','t','e','r',0};
72static const WCHAR wAudioInMixerProp[] =
73{'A','u','d','i','o','I','n','p','u','t','M','i','x','e','r',' ','P','r','o',
74 'p','e','r','t','y',' ','P','a','g','e',0};
75
77 {
79 &CLSID_AudioRecord,
81 NULL
82 },{
84 &CLSID_AVICo,
86 NULL
87 },{
89 &CLSID_VfwCapture,
91 NULL
92 },{
94 &CLSID_CaptureProperties,
95 NULL, /* FIXME: Implement QCAP_createVFWCaptureFilterPropertyPage */
96 NULL
97 },{
98 wAVIMux,
99 &CLSID_AviDest,
101 NULL
102 },{
104 &CLSID_AviMuxProptyPage,
105 NULL, /* FIXME: Implement QCAP_createAVIMuxPropertyPage */
106 NULL
107 },{
109 &CLSID_AviMuxProptyPage1,
110 NULL, /* FIXME: Implement QCAP_createAVIMuxPropertyPage1 */
111 NULL
112 },{
114 &CLSID_FileWriter,
115 NULL, /* FIXME: Implement QCAP_createFileWriter */
116 NULL
117 },{
119 &CLSID_CaptureGraphBuilder,
121 NULL
122 },{
124 &CLSID_CaptureGraphBuilder2,
126 NULL
127 },{
129 &CLSID_InfTee,
130 NULL, /* FIXME: Implement QCAP_createInfinitePinTeeFilter */
131 NULL
132 },{
134 &CLSID_SmartTee,
136 NULL
137 },{
139 &CLSID_AudioInputMixerProperties,
140 NULL, /* FIXME: Implement QCAP_createAudioInputMixerPropertyPage */
141 NULL
142 }
143};
144
145int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
146
147/***********************************************************************
148 * Dll EntryPoint (QCAP.@)
149 */
150BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
151{
152 return STRMBASE_DllMain(hInstDLL,fdwReason,lpv);
153}
154
155/***********************************************************************
156 * DllGetClassObject
157 */
159{
160 return STRMBASE_DllGetClassObject( rclsid, riid, ppv );
161}
162
163/***********************************************************************
164 * DllRegisterServer (QCAP.@)
165 */
167{
168 TRACE("()\n");
170}
171
172/***********************************************************************
173 * DllUnregisterServer (QCAP.@)
174 */
176{
177 TRACE("\n");
179}
180
181/***********************************************************************
182 * DllCanUnloadNow (QCAP.@)
183 */
185{
186 TRACE("\n");
187
189 return S_OK;
190 return S_FALSE;
191}
192
194{
195 if (increment)
198}
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
IUnknown *WINAPI QCAP_createAudioCaptureFilter(IUnknown *outer, HRESULT *phr)
Definition: audiorecord.c:270
IUnknown *WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr)
Definition: avico.c:698
IUnknown *WINAPI QCAP_createAVIMux(IUnknown *pUnkOuter, HRESULT *phr)
Definition: avimux.c:2362
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
IUnknown *CALLBACK QCAP_createCaptureGraphBuilder2(IUnknown *pUnkOuter, HRESULT *phr)
Definition: capturegraph.c:77
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
long LONG
Definition: pedump.c:60
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
Definition: qcap_main.c:150
FactoryTemplate const g_Templates[]
Definition: qcap_main.c:76
HRESULT WINAPI DllRegisterServer(void)
Definition: qcap_main.c:166
static const WCHAR wAVIMuxPropPage[]
Definition: qcap_main.c:57
static const WCHAR wVFWCaptFilter[]
Definition: qcap_main.c:50
static const WCHAR wCaptGraphBuilder[]
Definition: qcap_main.c:63
static const WCHAR wInfPinTeeFilter[]
Definition: qcap_main.c:67
static const WCHAR wAVICompressor[]
Definition: qcap_main.c:48
static const WCHAR wAudioInMixerProp[]
Definition: qcap_main.c:72
static const WCHAR wAVIMux[]
Definition: qcap_main.c:55
static const WCHAR wSmartTeeFilter[]
Definition: qcap_main.c:70
static const WCHAR wFileWriter[]
Definition: qcap_main.c:61
HRESULT WINAPI DllUnregisterServer(void)
Definition: qcap_main.c:175
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: qcap_main.c:158
static const WCHAR wAudioCaptureFilter[]
Definition: qcap_main.c:46
int g_cTemplates
Definition: qcap_main.c:145
static LONG objects_ref
Definition: qcap_main.c:44
static const WCHAR wCaptGraphBuilder2[]
Definition: qcap_main.c:65
DWORD ObjectRefCount(BOOL increment)
Definition: qcap_main.c:193
static const WCHAR wVFWCaptFilterProp[]
Definition: qcap_main.c:52
HRESULT WINAPI DllCanUnloadNow(void)
Definition: qcap_main.c:184
static const WCHAR wAVIMuxPropPage1[]
Definition: qcap_main.c:59
IUnknown *WINAPI QCAP_createVFWCaptureFilter(IUnknown *pUnkOuter, HRESULT *phr) DECLSPEC_HIDDEN
Definition: vfwcapture.c:216
IUnknown *WINAPI QCAP_createSmartTeeFilter(IUnknown *pUnkOuter, HRESULT *phr) DECLSPEC_HIDDEN
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI STRMBASE_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: dllfunc.c:340
HRESULT WINAPI STRMBASE_DllCanUnloadNow(void)
Definition: dllfunc.c:393
BOOL WINAPI STRMBASE_DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
Definition: dllfunc.c:217
HRESULT WINAPI AMovieDllRegisterServer2(BOOL bRegister)
Definition: dllfunc.c:155
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
__wchar_t WCHAR
Definition: xmlstorage.h:180