ReactOS 0.4.15-dev-6694-g4ba8af9
digitaldemo.cpp
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS BDA Proxy
4 * FILE: dll/directx/bdaplgin/digitaldemo.cpp
5 * PURPOSE: IBDA_DigitalDemodulator interface
6 *
7 * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org)
8 */
9
10#include "precomp.h"
11
12#ifndef _MSC_VER
13const GUID IID_IBDA_DigitalDemodulator = {0xef30f379, 0x985b, 0x4d10, {0xb6, 0x40, 0xa7, 0x9d, 0x5e, 0x04, 0xe1, 0xe0}};
14const GUID KSPROPSETID_BdaDigitalDemodulator = {0xef30f379, 0x985b, 0x4d10, {0xb6, 0x40, 0xa7, 0x9d, 0x5e, 0x4, 0xe1, 0xe0}};
15#endif
16
17class CBDADigitalDemodulator : public IBDA_DigitalDemodulator
18{
19public:
21
23 {
25 return m_Ref;
26 }
28 {
30 if (!m_Ref)
31 {
32 delete this;
33 return 0;
34 }
35 return m_Ref;
36 }
37 //IBDA_DigitalDemodulator methods
52
55
56protected:
60};
61
65 IN REFIID refiid,
67{
68 *Output = NULL;
69
70 if (IsEqualGUID(refiid, IID_IUnknown))
71 {
72 *Output = PVOID(this);
73 reinterpret_cast<IUnknown*>(*Output)->AddRef();
74 return NOERROR;
75 }
76
78 {
79 *Output = (IBDA_DigitalDemodulator*)(this);
80 reinterpret_cast<IBDA_DigitalDemodulator*>(*Output)->AddRef();
81 return NOERROR;
82 }
83
84#ifdef BDAPLGIN_TRACE
87 StringFromCLSID(refiid, &lpstr);
88 swprintf(Buffer, L"CBDADigitalDemodulator::QueryInterface: NoInterface for %s", lpstr);
92#endif
93
94 return E_NOINTERFACE;
95}
96
100{
102 HRESULT hr;
103
104 // setup request
105 Node.NodeId = m_NodeId;
106 Node.Reserved = 0;
107
108 // perform request
110
111
112#ifdef BDAPLGIN_TRACE
113 WCHAR Buffer[100];
114 swprintf(Buffer, L"CBDADigitalDemodulator::put_ModulationType: pModulationType %lu hr %lx\n", *pModulationType, hr);
116#endif
117
118 return hr;
119}
120
124{
125 return E_NOINTERFACE;
126}
127
131{
133 HRESULT hr;
134
135 // setup request
136 Node.NodeId = m_NodeId;
137 Node.Reserved = 0;
138
139 // perform request
141
142
143#ifdef BDAPLGIN_TRACE
144 WCHAR Buffer[100];
145 swprintf(Buffer, L"CBDADigitalDemodulator::put_InnerFECMethod: pFECMethod %lu hr %lx\n", *pFECMethod, hr);
147#endif
148
149 return hr;
150}
151
155{
156 return E_NOINTERFACE;
157}
158
162{
164 HRESULT hr;
165
166 // setup request
167 Node.NodeId = m_NodeId;
168 Node.Reserved = 0;
169
170 // perform request
172
173#ifdef BDAPLGIN_TRACE
174 WCHAR Buffer[100];
175 swprintf(Buffer, L"CBDADigitalDemodulator::put_InnerFECRate: pFECRate %lu hr %lx\n", *pFECRate, hr);
177#endif
178
179 return hr;
180}
181
185{
186 return E_NOINTERFACE;
187}
188
192{
194 HRESULT hr;
195
196 // setup request
197 Node.NodeId = m_NodeId;
198 Node.Reserved = 0;
199
200 // perform request
202
203#ifdef BDAPLGIN_TRACE
204 WCHAR Buffer[100];
205 swprintf(Buffer, L"CBDADigitalDemodulator::put_OuterFECMethod: pFECMethod %lu hr %lx\n", *pFECMethod, hr);
207#endif
208
209 return hr;
210}
211
212
215{
216 return E_NOINTERFACE;
217}
218
222{
224 HRESULT hr;
225
226 // setup request
227 Node.NodeId = m_NodeId;
228 Node.Reserved = 0;
229
230 // perform request
232
233#ifdef BDAPLGIN_TRACE
234 WCHAR Buffer[100];
235 swprintf(Buffer, L"CBDADigitalDemodulator::put_OuterFECRate: pFECRate %lu hr %lx\n", *pFECRate, hr);
237#endif
238
239 return hr;
240}
241
245{
246 return E_NOINTERFACE;
247}
248
252{
254 HRESULT hr;
255
256 // setup request
257 Node.NodeId = m_NodeId;
258 Node.Reserved = 0;
259
260 // perform request
262
263#ifdef BDAPLGIN_TRACE
264 WCHAR Buffer[100];
265 swprintf(Buffer, L"CBDADigitalDemodulator::put_SymbolRate: pSymbolRate %lu hr %lx\n", *pSymbolRate, hr);
267#endif
268
269 return hr;
270}
271
275{
276 return E_NOINTERFACE;
277}
278
282{
284 HRESULT hr;
285
286 // setup request
287 Node.NodeId = m_NodeId;
288 Node.Reserved = 0;
289
290 // perform request
292
293#ifdef BDAPLGIN_TRACE
294 WCHAR Buffer[100];
295 swprintf(Buffer, L"CBDADigitalDemodulator::put_SpectralInversion: pSpectralInversion %lu hr %lx\n", *pSpectralInversion, hr);
297#endif
298
299 return hr;
300}
301
305{
306 return E_NOINTERFACE;
307}
308
309
311WINAPI
314 ULONG NodeId,
315 REFIID riid,
316 LPVOID * ppv)
317{
318 // construct device control
320
321#ifdef BDAPLGIN_TRACE
322 OutputDebugStringW(L"CBDADigitalDemodulator_fnConstructor\n");
323#endif
324
325 if (!handler)
326 return E_OUTOFMEMORY;
327
328 if (FAILED(handler->QueryInterface(riid, ppv)))
329 {
330 /* not supported */
331 delete handler;
332 return E_NOINTERFACE;
333 }
334
335 return NOERROR;
336}
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define STDMETHODIMP
Definition: basetyps.h:43
@ KSPROPERTY_BDA_INNER_FEC_TYPE
Definition: bdamedia.h:294
@ KSPROPERTY_BDA_OUTER_FEC_RATE
Definition: bdamedia.h:297
@ KSPROPERTY_BDA_MODULATION_TYPE
Definition: bdamedia.h:293
@ KSPROPERTY_BDA_SYMBOL_RATE
Definition: bdamedia.h:298
@ KSPROPERTY_BDA_INNER_FEC_RATE
Definition: bdamedia.h:295
@ KSPROPERTY_BDA_SPECTRAL_INVERSION
Definition: bdamedia.h:299
@ KSPROPERTY_BDA_OUTER_FEC_TYPE
Definition: bdamedia.h:296
const GUID IID_IUnknown
_Must_inspect_result_ _In_ KSP_BDA_NODE_PIN * pProperty
Definition: bdasup.h:156
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
BinaryConvolutionCodeRate
Definition: bdatypes.h:230
ModulationType
Definition: bdatypes.h:261
SpectralInversion
Definition: bdatypes.h:244
FECMethod
Definition: bdatypes.h:253
_In_ BOOLEAN Release
Definition: cdrom.h:920
Definition: bufpool.h:45
HRESULT STDMETHODCALLTYPE get_ModulationType(ModulationType *pModulationType)
HRESULT STDMETHODCALLTYPE get_OuterFECMethod(FECMethod *pFECMethod)
HRESULT STDMETHODCALLTYPE put_InnerFECMethod(FECMethod *pFECMethod)
STDMETHODIMP_(ULONG) AddRef()
Definition: digitaldemo.cpp:22
HRESULT STDMETHODCALLTYPE put_SymbolRate(ULONG *pSymbolRate)
STDMETHODIMP_(ULONG) Release()
Definition: digitaldemo.cpp:27
IKsPropertySet * m_pProperty
Definition: digitaldemo.cpp:58
HRESULT STDMETHODCALLTYPE put_ModulationType(ModulationType *pModulationType)
Definition: digitaldemo.cpp:99
HRESULT STDMETHODCALLTYPE put_OuterFECMethod(FECMethod *pFECMethod)
STDMETHODIMP QueryInterface(REFIID InterfaceId, PVOID *Interface)
Definition: digitaldemo.cpp:64
HRESULT STDMETHODCALLTYPE get_InnerFECMethod(FECMethod *pFECMethod)
HRESULT STDMETHODCALLTYPE get_SymbolRate(ULONG *pSymbolRate)
HRESULT STDMETHODCALLTYPE get_InnerFECRate(BinaryConvolutionCodeRate *pFECRate)
HRESULT STDMETHODCALLTYPE get_SpectralInversion(SpectralInversion *pSpectralInversion)
HRESULT STDMETHODCALLTYPE put_OuterFECRate(BinaryConvolutionCodeRate *pFECRate)
HRESULT STDMETHODCALLTYPE put_SpectralInversion(SpectralInversion *pSpectralInversion)
HRESULT STDMETHODCALLTYPE put_InnerFECRate(BinaryConvolutionCodeRate *pFECRate)
CBDADigitalDemodulator(IKsPropertySet *pProperty, ULONG NodeId)
Definition: digitaldemo.cpp:53
HRESULT STDMETHODCALLTYPE get_OuterFECRate(BinaryConvolutionCodeRate *pFECRate)
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
const GUID IID_IBDA_DigitalDemodulator
Definition: digitaldemo.cpp:13
const GUID KSPROPSETID_BdaDigitalDemodulator
Definition: digitaldemo.cpp:14
HRESULT WINAPI CBDADigitalDemodulator_fnConstructor(IKsPropertySet *pProperty, ULONG NodeId, REFIID riid, LPVOID *ppv)
#define NULL
Definition: types.h:112
union node Node
Definition: types.h:1255
#define MAX_PATH
Definition: compat.h:34
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7482
HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
Definition: compobj.c:2412
#define swprintf
Definition: precomp.h:40
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT Set([in] REFGUID guidPropSet, [in] DWORD dwPropID, [in, size_is(cbInstanceData)] LPVOID pInstanceData, [in] DWORD cbInstanceData, [in, size_is(cbPropData)] LPVOID pPropData, [in] DWORD cbPropData)
ULONG AddRef()
#define FAILED(hr)
Definition: intsafe.h:51
static LPCSTR lpstr
Definition: font.c:51
static LPOLESTR
Definition: stg_prop.c:27
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
#define L(x)
Definition: ntvdm.h:50
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
@ Output
Definition: arc.h:85
HRESULT hr
Definition: shlfolder.c:183
Definition: ks.h:2074
void * PVOID
Definition: typedefs.h:50
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
Definition: dlist.c:348
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
void WINAPI DebugBreak(void)
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364
#define NOERROR
Definition: winerror.h:2354
__wchar_t WCHAR
Definition: xmlstorage.h:180