ReactOS  0.4.14-dev-55-g2da92ac
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 
11 class CVPConfig : public IVPConfig,
12  public IDistributorNotify
13 {
14 public:
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);
47  HRESULT STDMETHODCALLTYPE GetVideoFormats(LPDWORD pdwNumFormats, IN OUT LPDDPIXELFORMAT pddPixelFormats);
54  HRESULT STDMETHODCALLTYPE SetSurfaceParameters(DWORD dwPitch, IN DWORD dwXOrigin, IN DWORD dwYOrigin);
55  // IVPConfig
58 
59  CVPConfig() : m_Ref(0){}
60  virtual ~CVPConfig(){}
61 
62 protected:
64 };
65 
66 
67 HRESULT
70  IN REFIID refiid,
71  OUT PVOID* Output)
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 
101 HRESULT
104 {
105 #ifdef KSPROXY_TRACE
106  OutputDebugStringW(L"UNIMPLEMENTED\n");
107 #endif
108  return E_NOTIMPL;
109 }
110 
111 HRESULT
114 {
115 #ifdef KSPROXY_TRACE
116  OutputDebugStringW(L"UNIMPLEMENTED\n");
117 #endif
118  return E_NOTIMPL;
119 }
120 
121 HRESULT
124  REFERENCE_TIME tStart)
125 {
126 #ifdef KSPROXY_TRACE
127  OutputDebugStringW(L"UNIMPLEMENTED\n");
128 #endif
129  return E_NOTIMPL;
130 }
131 
132 HRESULT
135  IReferenceClock *pClock)
136 {
137 #ifdef KSPROXY_TRACE
138  OutputDebugStringW(L"UNIMPLEMENTED\n");
139 #endif
140  return E_NOTIMPL;
141 }
142 
143 HRESULT
146 {
147 #ifdef KSPROXY_TRACE
148  OutputDebugStringW(L"UNIMPLEMENTED\n");
149 #endif
150  return E_NOTIMPL;
151 }
152 
153 //-------------------------------------------------------------------
154 // IVPBaseConfig
155 //
156 HRESULT
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 
168 HRESULT
171  DWORD dwChosenEntry)
172 {
173 #ifdef KSPROXY_TRACE
174  OutputDebugStringW(L"UNIMPLEMENTED\n");
175 #endif
176  return E_NOTIMPL;
177 }
178 
179 HRESULT
182  LPAMVPDATAINFO pamvpDataInfo)
183 {
184 #ifdef KSPROXY_TRACE
185  OutputDebugStringW(L"UNIMPLEMENTED\n");
186 #endif
187  return E_NOTIMPL;
188 }
189 
190 HRESULT
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 
202 HRESULT
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 
214 HRESULT
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 
226 HRESULT
229  DWORD dwChosenEntry)
230 {
231 #ifdef KSPROXY_TRACE
232  OutputDebugStringW(L"UNIMPLEMENTED\n");
233 #endif
234  return E_NOTIMPL;
235 }
236 
237 HRESULT
240 {
241 #ifdef KSPROXY_TRACE
242  OutputDebugStringW(L"UNIMPLEMENTED\n");
243 #endif
244  return E_NOTIMPL;
245 }
246 
247 HRESULT
250  LPDIRECTDRAWSURFACE* ppddOverlaySurface)
251 {
252 #ifdef KSPROXY_TRACE
253  OutputDebugStringW(L"UNIMPLEMENTED\n");
254 #endif
255  return E_NOTIMPL;
256 }
257 
258 HRESULT
261  ULONG_PTR dwDDKernelHandle)
262 {
263 #ifdef KSPROXY_TRACE
264  OutputDebugStringW(L"UNIMPLEMENTED\n");
265 #endif
266  return E_NOTIMPL;
267 }
268 
269 HRESULT
272  IN DWORD dwVideoPortID)
273 {
274 #ifdef KSPROXY_TRACE
275  OutputDebugStringW(L"UNIMPLEMENTED\n");
276 #endif
277  return E_NOTIMPL;
278 }
279 
280 
281 HRESULT
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 
294 HRESULT
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 
311 HRESULT
314  LPBOOL pbIsDecimationAllowed)
315 {
316 #ifdef KSPROXY_TRACE
317  OutputDebugStringW(L"UNIMPLEMENTED\n");
318 #endif
319  return E_NOTIMPL;
320 }
321 
322 HRESULT
325  LPAMVPSIZE pamvpSize)
326 {
327 #ifdef KSPROXY_TRACE
328  OutputDebugStringW(L"UNIMPLEMENTED\n");
329 #endif
330  return E_NOTIMPL;
331 }
332 
333 
334 HRESULT
335 WINAPI
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 
HRESULT STDMETHODCALLTYPE SetVideoPortID(IN DWORD dwVideoPortID)
Definition: cvpconfig.cpp:271
HRESULT STDMETHODCALLTYPE Run(REFERENCE_TIME tStart)
Definition: cvpconfig.cpp:123
virtual ~CVPConfig()
Definition: cvpconfig.cpp:60
#define IN
Definition: typedefs.h:38
#define REFIID
Definition: guiddef.h:118
#define E_NOINTERFACE
Definition: winerror.h:2364
HRESULT STDMETHODCALLTYPE GetConnectInfo(LPDWORD pdwNumConnectInfo, IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo)
Definition: cvpconfig.cpp:158
_In_ BOOLEAN Release
Definition: classpnp.h:929
LONG m_Ref
Definition: cvpconfig.cpp:63
#define NOERROR
Definition: winerror.h:2354
HRESULT STDMETHODCALLTYPE Stop()
Definition: cvpconfig.cpp:103
REFIID riid
Definition: precomp.h:44
HRESULT STDMETHODCALLTYPE SetVideoFormat(DWORD dwChosenEntry)
Definition: cvpconfig.cpp:228
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT WINAPI CVPConfig_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
Definition: cvpconfig.cpp:336
HRESULT STDMETHODCALLTYPE NotifyGraphChange()
Definition: cvpconfig.cpp:145
uint32_t ULONG_PTR
Definition: typedefs.h:63
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
long LONG
Definition: pedump.c:60
STDMETHODIMP_(ULONG) AddRef()
Definition: cvpconfig.cpp:17
#define STDMETHODIMP
Definition: basetyps.h:43
HRESULT STDMETHODCALLTYPE SetDirectDrawKernelHandle(ULONG_PTR dwDDKernelHandle)
Definition: cvpconfig.cpp:260
void * PVOID
Definition: retypes.h:9
HRESULT STDMETHODCALLTYPE GetVPDataInfo(LPAMVPDATAINFO pamvpDataInfo)
Definition: cvpconfig.cpp:181
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:359
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
LONG HRESULT
Definition: typedefs.h:77
HRESULT STDMETHODCALLTYPE IsVPDecimationAllowed(LPBOOL pbIsDecimationAllowed)
Definition: cvpconfig.cpp:313
const GUID IID_IUnknown
HRESULT STDMETHODCALLTYPE GetOverlaySurface(LPDIRECTDRAWSURFACE *ppddOverlaySurface)
Definition: cvpconfig.cpp:249
#define WINAPI
Definition: msvc.h:8
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
unsigned long DWORD
Definition: ntddk_ex.h:95
HRESULT STDMETHODCALLTYPE SetSurfaceParameters(DWORD dwPitch, IN DWORD dwXOrigin, IN DWORD dwYOrigin)
Definition: cvpconfig.cpp:296
HRESULT STDMETHODCALLTYPE SetScalingFactors(LPAMVPSIZE pamvpSize)
Definition: cvpconfig.cpp:324
static const WCHAR L[]
Definition: oid.c:1250
#define InterlockedDecrement
Definition: armddk.h:52
Definition: arc.h:85
STDMETHODIMP_(ULONG) Release()
Definition: cvpconfig.cpp:22
HRESULT STDMETHODCALLTYPE SetInvertPolarity()
Definition: cvpconfig.cpp:239
BOOL * LPBOOL
Definition: windef.h:162
#define InterlockedIncrement
Definition: armddk.h:53
STDMETHODIMP QueryInterface(REFIID InterfaceId, PVOID *Interface)
Definition: cvpconfig.cpp:69
HRESULT STDMETHODCALLTYPE GetVideoFormats(LPDWORD pdwNumFormats, IN OUT LPDDPIXELFORMAT pddPixelFormats)
Definition: cvpconfig.cpp:216
#define E_NOTIMPL
Definition: ddrawi.h:99
HRESULT STDMETHODCALLTYPE SetSyncSource(IReferenceClock *pClock)
Definition: cvpconfig.cpp:134
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
HRESULT STDMETHODCALLTYPE GetMaxPixelRate(LPAMVPSIZE pamvpSize, OUT LPDWORD pdwMaxPixelsPerSecond)
Definition: cvpconfig.cpp:192
const GUID IID_IDistributorNotify
HRESULT STDMETHODCALLTYPE Pause()
Definition: cvpconfig.cpp:113
#define OUT
Definition: typedefs.h:39
uint32_t * LPDWORD
Definition: typedefs.h:57
unsigned int ULONG
Definition: retypes.h:1
HRESULT STDMETHODCALLTYPE SetDDSurfaceKernelHandles(DWORD cHandles, IN ULONG_PTR *rgDDKernelHandles)
Definition: cvpconfig.cpp:283
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7786
HRESULT STDMETHODCALLTYPE SetConnectInfo(DWORD dwChosenEntry)
Definition: cvpconfig.cpp:170
HRESULT STDMETHODCALLTYPE InformVPInputFormats(DWORD dwNumFormats, IN LPDDPIXELFORMAT pDDPixelFormats)
Definition: cvpconfig.cpp:204