ReactOS 0.4.15-dev-7924-g5949c20
cvpconfig.cpp
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS WDM Streaming ActiveMovie Proxy
4 * FILE: dll/directx/ksproxy/cvpconfig.cpp
5 * PURPOSE: IVPConfig interface
6 *
7 * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org)
8 */
9#include "precomp.h"
10
11class CVPConfig : public IVPConfig,
13{
14public:
16
18 {
20 return m_Ref;
21 }
23 {
25
26 if (!m_Ref)
27 {
28 delete this;
29 return 0;
30 }
31 return m_Ref;
32 }
33
34 // IDistributorNotify interface
40
41 // IVPBaseConfig
42 HRESULT STDMETHODCALLTYPE GetConnectInfo(LPDWORD pdwNumConnectInfo, IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo);
45 HRESULT STDMETHODCALLTYPE GetMaxPixelRate(LPAMVPSIZE pamvpSize, OUT LPDWORD pdwMaxPixelsPerSecond);
54 HRESULT STDMETHODCALLTYPE SetSurfaceParameters(DWORD dwPitch, IN DWORD dwXOrigin, IN DWORD dwYOrigin);
55 // IVPConfig
58
60 virtual ~CVPConfig(){}
61
62protected:
64};
65
66
70 IN REFIID refiid,
72{
73 if (IsEqualGUID(refiid, IID_IUnknown))
74 {
75 *Output = PVOID(this);
76 reinterpret_cast<IUnknown*>(*Output)->AddRef();
77 return NOERROR;
78 }
80 {
81 *Output = (IDistributorNotify*)(this);
82 reinterpret_cast<IDistributorNotify*>(*Output)->AddRef();
83 return NOERROR;
84 }
85
86 if (IsEqualGUID(refiid, IID_IVPConfig))
87 {
88 *Output = (IVPConfig*)(this);
89 reinterpret_cast<IVPConfig*>(*Output)->AddRef();
90 return NOERROR;
91 }
92
93 return E_NOINTERFACE;
94}
95
96//-------------------------------------------------------------------
97// IDistributorNotify interface
98//
99
100
104{
105#ifdef KSPROXY_TRACE
106 OutputDebugStringW(L"UNIMPLEMENTED\n");
107#endif
108 return E_NOTIMPL;
109}
110
114{
115#ifdef KSPROXY_TRACE
116 OutputDebugStringW(L"UNIMPLEMENTED\n");
117#endif
118 return E_NOTIMPL;
119}
120
124 REFERENCE_TIME tStart)
125{
126#ifdef KSPROXY_TRACE
127 OutputDebugStringW(L"UNIMPLEMENTED\n");
128#endif
129 return E_NOTIMPL;
130}
131
135 IReferenceClock *pClock)
136{
137#ifdef KSPROXY_TRACE
138 OutputDebugStringW(L"UNIMPLEMENTED\n");
139#endif
140 return E_NOTIMPL;
141}
142
146{
147#ifdef KSPROXY_TRACE
148 OutputDebugStringW(L"UNIMPLEMENTED\n");
149#endif
150 return E_NOTIMPL;
151}
152
153//-------------------------------------------------------------------
154// IVPBaseConfig
155//
159 LPDWORD pdwNumConnectInfo,
160 IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo)
161{
162#ifdef KSPROXY_TRACE
163 OutputDebugStringW(L"UNIMPLEMENTED\n");
164#endif
165 return E_NOTIMPL;
166}
167
171 DWORD dwChosenEntry)
172{
173#ifdef KSPROXY_TRACE
174 OutputDebugStringW(L"UNIMPLEMENTED\n");
175#endif
176 return E_NOTIMPL;
177}
178
182 LPAMVPDATAINFO pamvpDataInfo)
183{
184#ifdef KSPROXY_TRACE
185 OutputDebugStringW(L"UNIMPLEMENTED\n");
186#endif
187 return E_NOTIMPL;
188}
189
193 LPAMVPSIZE pamvpSize,
194 OUT LPDWORD pdwMaxPixelsPerSecond)
195{
196#ifdef KSPROXY_TRACE
197 OutputDebugStringW(L"UNIMPLEMENTED\n");
198#endif
199 return E_NOTIMPL;
200}
201
205 DWORD dwNumFormats,
206 IN LPDDPIXELFORMAT pDDPixelFormats)
207{
208#ifdef KSPROXY_TRACE
209 OutputDebugStringW(L"UNIMPLEMENTED\n");
210#endif
211 return E_NOTIMPL;
212}
213
217 LPDWORD pdwNumFormats,
218 IN OUT LPDDPIXELFORMAT pddPixelFormats)
219{
220#ifdef KSPROXY_TRACE
221 OutputDebugStringW(L"UNIMPLEMENTED\n");
222#endif
223 return E_NOTIMPL;
224}
225
229 DWORD dwChosenEntry)
230{
231#ifdef KSPROXY_TRACE
232 OutputDebugStringW(L"UNIMPLEMENTED\n");
233#endif
234 return E_NOTIMPL;
235}
236
240{
241#ifdef KSPROXY_TRACE
242 OutputDebugStringW(L"UNIMPLEMENTED\n");
243#endif
244 return E_NOTIMPL;
245}
246
250 LPDIRECTDRAWSURFACE* ppddOverlaySurface)
251{
252#ifdef KSPROXY_TRACE
253 OutputDebugStringW(L"UNIMPLEMENTED\n");
254#endif
255 return E_NOTIMPL;
256}
257
261 ULONG_PTR dwDDKernelHandle)
262{
263#ifdef KSPROXY_TRACE
264 OutputDebugStringW(L"UNIMPLEMENTED\n");
265#endif
266 return E_NOTIMPL;
267}
268
272 IN DWORD dwVideoPortID)
273{
274#ifdef KSPROXY_TRACE
275 OutputDebugStringW(L"UNIMPLEMENTED\n");
276#endif
277 return E_NOTIMPL;
278}
279
280
284 DWORD cHandles,
285 IN ULONG_PTR *rgDDKernelHandles)
286{
287#ifdef KSPROXY_TRACE
288 OutputDebugStringW(L"UNIMPLEMENTED\n");
289#endif
290 return E_NOTIMPL;
291}
292
293
297 DWORD dwPitch,
298 IN DWORD dwXOrigin,
299 IN DWORD dwYOrigin)
300{
301#ifdef KSPROXY_TRACE
302 OutputDebugStringW(L"UNIMPLEMENTED\n");
303#endif
304 return E_NOTIMPL;
305}
306
307//-------------------------------------------------------------------
308// IVPConfig
309//
310
314 LPBOOL pbIsDecimationAllowed)
315{
316#ifdef KSPROXY_TRACE
317 OutputDebugStringW(L"UNIMPLEMENTED\n");
318#endif
319 return E_NOTIMPL;
320}
321
325 LPAMVPSIZE pamvpSize)
326{
327#ifdef KSPROXY_TRACE
328 OutputDebugStringW(L"UNIMPLEMENTED\n");
329#endif
330 return E_NOTIMPL;
331}
332
333
335WINAPI
337 IUnknown * pUnkOuter,
338 REFIID riid,
339 LPVOID * ppv)
340{
341#ifdef KSPROXY_TRACE
342 OutputDebugStringW(L"CVPConfig_Constructor\n");
343#endif
344
345 CVPConfig * handler = new CVPConfig();
346
347 if (!handler)
348 return E_OUTOFMEMORY;
349
350 if (FAILED(handler->QueryInterface(riid, ppv)))
351 {
352 /* not supported */
353 delete handler;
354 return E_NOINTERFACE;
355 }
356
357 return NOERROR;
358}
359
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define STDMETHODIMP
Definition: basetyps.h:43
const GUID IID_IUnknown
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
virtual ~CVPConfig()
Definition: cvpconfig.cpp:60
HRESULT STDMETHODCALLTYPE Run(REFERENCE_TIME tStart)
Definition: cvpconfig.cpp:123
HRESULT STDMETHODCALLTYPE InformVPInputFormats(DWORD dwNumFormats, IN LPDDPIXELFORMAT pDDPixelFormats)
Definition: cvpconfig.cpp:204
HRESULT STDMETHODCALLTYPE Pause()
Definition: cvpconfig.cpp:113
HRESULT STDMETHODCALLTYPE SetDirectDrawKernelHandle(ULONG_PTR dwDDKernelHandle)
Definition: cvpconfig.cpp:260
HRESULT STDMETHODCALLTYPE SetVideoFormat(DWORD dwChosenEntry)
Definition: cvpconfig.cpp:228
LONG m_Ref
Definition: cvpconfig.cpp:63
HRESULT STDMETHODCALLTYPE SetInvertPolarity()
Definition: cvpconfig.cpp:239
HRESULT STDMETHODCALLTYPE SetConnectInfo(DWORD dwChosenEntry)
Definition: cvpconfig.cpp:170
HRESULT STDMETHODCALLTYPE SetSyncSource(IReferenceClock *pClock)
Definition: cvpconfig.cpp:134
HRESULT STDMETHODCALLTYPE SetDDSurfaceKernelHandles(DWORD cHandles, IN ULONG_PTR *rgDDKernelHandles)
Definition: cvpconfig.cpp:283
HRESULT STDMETHODCALLTYPE IsVPDecimationAllowed(LPBOOL pbIsDecimationAllowed)
Definition: cvpconfig.cpp:313
STDMETHODIMP_(ULONG) AddRef()
Definition: cvpconfig.cpp:17
HRESULT STDMETHODCALLTYPE GetVideoFormats(LPDWORD pdwNumFormats, IN OUT LPDDPIXELFORMAT pddPixelFormats)
Definition: cvpconfig.cpp:216
HRESULT STDMETHODCALLTYPE GetConnectInfo(LPDWORD pdwNumConnectInfo, IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo)
Definition: cvpconfig.cpp:158
STDMETHODIMP_(ULONG) Release()
Definition: cvpconfig.cpp:22
STDMETHODIMP QueryInterface(REFIID InterfaceId, PVOID *Interface)
Definition: cvpconfig.cpp:69
HRESULT STDMETHODCALLTYPE SetSurfaceParameters(DWORD dwPitch, IN DWORD dwXOrigin, IN DWORD dwYOrigin)
Definition: cvpconfig.cpp:296
HRESULT STDMETHODCALLTYPE SetVideoPortID(IN DWORD dwVideoPortID)
Definition: cvpconfig.cpp:271
HRESULT STDMETHODCALLTYPE GetOverlaySurface(LPDIRECTDRAWSURFACE *ppddOverlaySurface)
Definition: cvpconfig.cpp:249
HRESULT STDMETHODCALLTYPE Stop()
Definition: cvpconfig.cpp:103
HRESULT STDMETHODCALLTYPE GetMaxPixelRate(LPAMVPSIZE pamvpSize, OUT LPDWORD pdwMaxPixelsPerSecond)
Definition: cvpconfig.cpp:192
HRESULT STDMETHODCALLTYPE SetScalingFactors(LPAMVPSIZE pamvpSize)
Definition: cvpconfig.cpp:324
HRESULT STDMETHODCALLTYPE NotifyGraphChange()
Definition: cvpconfig.cpp:145
HRESULT STDMETHODCALLTYPE GetVPDataInfo(LPAMVPDATAINFO pamvpDataInfo)
Definition: cvpconfig.cpp:181
HRESULT WINAPI CVPConfig_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
Definition: cvpconfig.cpp:336
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_NOTIMPL
Definition: ddrawi.h:99
const GUID IID_IDistributorNotify
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7482
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
unsigned long DWORD
Definition: ntddk_ex.h:95
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
ULONG AddRef()
ULONG Release()
#define FAILED(hr)
Definition: intsafe.h:51
#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
void * PVOID
Definition: typedefs.h:50
uint32_t * LPDWORD
Definition: typedefs.h:59
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
struct tagRun Run
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
BOOL * LPBOOL
Definition: windef.h:162
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364
#define NOERROR
Definition: winerror.h:2354