Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygencvpconfig.cpp
Go to the documentation of this file.
00001 /* 00002 * COPYRIGHT: See COPYING in the top level directory 00003 * PROJECT: ReactOS WDM Streaming ActiveMovie Proxy 00004 * FILE: dll/directx/ksproxy/cvpconfig.cpp 00005 * PURPOSE: IVPConfig interface 00006 * 00007 * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) 00008 */ 00009 #include "precomp.h" 00010 00011 class CVPConfig : public IVPConfig, 00012 public IDistributorNotify 00013 { 00014 public: 00015 STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface); 00016 00017 STDMETHODIMP_(ULONG) AddRef() 00018 { 00019 InterlockedIncrement(&m_Ref); 00020 return m_Ref; 00021 } 00022 STDMETHODIMP_(ULONG) Release() 00023 { 00024 InterlockedDecrement(&m_Ref); 00025 00026 if (!m_Ref) 00027 { 00028 delete this; 00029 return 0; 00030 } 00031 return m_Ref; 00032 } 00033 00034 // IDistributorNotify interface 00035 HRESULT STDMETHODCALLTYPE Stop(); 00036 HRESULT STDMETHODCALLTYPE Pause(); 00037 HRESULT STDMETHODCALLTYPE Run(REFERENCE_TIME tStart); 00038 HRESULT STDMETHODCALLTYPE SetSyncSource(IReferenceClock *pClock); 00039 HRESULT STDMETHODCALLTYPE NotifyGraphChange(); 00040 00041 // IVPBaseConfig 00042 HRESULT STDMETHODCALLTYPE GetConnectInfo(LPDWORD pdwNumConnectInfo, IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo); 00043 HRESULT STDMETHODCALLTYPE SetConnectInfo(DWORD dwChosenEntry); 00044 HRESULT STDMETHODCALLTYPE GetVPDataInfo(LPAMVPDATAINFO pamvpDataInfo); 00045 HRESULT STDMETHODCALLTYPE GetMaxPixelRate(LPAMVPSIZE pamvpSize, OUT LPDWORD pdwMaxPixelsPerSecond); 00046 HRESULT STDMETHODCALLTYPE InformVPInputFormats(DWORD dwNumFormats, IN LPDDPIXELFORMAT pDDPixelFormats); 00047 HRESULT STDMETHODCALLTYPE GetVideoFormats(LPDWORD pdwNumFormats, IN OUT LPDDPIXELFORMAT pddPixelFormats); 00048 HRESULT STDMETHODCALLTYPE SetVideoFormat(DWORD dwChosenEntry); 00049 HRESULT STDMETHODCALLTYPE SetInvertPolarity(); 00050 HRESULT STDMETHODCALLTYPE GetOverlaySurface(LPDIRECTDRAWSURFACE* ppddOverlaySurface); 00051 HRESULT STDMETHODCALLTYPE SetDirectDrawKernelHandle(ULONG_PTR dwDDKernelHandle); 00052 HRESULT STDMETHODCALLTYPE SetVideoPortID(IN DWORD dwVideoPortID); 00053 HRESULT STDMETHODCALLTYPE SetDDSurfaceKernelHandles(DWORD cHandles, IN ULONG_PTR *rgDDKernelHandles); 00054 HRESULT STDMETHODCALLTYPE SetSurfaceParameters(DWORD dwPitch, IN DWORD dwXOrigin, IN DWORD dwYOrigin); 00055 // IVPConfig 00056 HRESULT STDMETHODCALLTYPE IsVPDecimationAllowed(LPBOOL pbIsDecimationAllowed); 00057 HRESULT STDMETHODCALLTYPE SetScalingFactors(LPAMVPSIZE pamvpSize); 00058 00059 CVPConfig() : m_Ref(0){} 00060 virtual ~CVPConfig(){} 00061 00062 protected: 00063 LONG m_Ref; 00064 }; 00065 00066 00067 HRESULT 00068 STDMETHODCALLTYPE 00069 CVPConfig::QueryInterface( 00070 IN REFIID refiid, 00071 OUT PVOID* Output) 00072 { 00073 if (IsEqualGUID(refiid, IID_IUnknown)) 00074 { 00075 *Output = PVOID(this); 00076 reinterpret_cast<IUnknown*>(*Output)->AddRef(); 00077 return NOERROR; 00078 } 00079 if (IsEqualGUID(refiid, IID_IDistributorNotify)) 00080 { 00081 *Output = (IDistributorNotify*)(this); 00082 reinterpret_cast<IDistributorNotify*>(*Output)->AddRef(); 00083 return NOERROR; 00084 } 00085 00086 if (IsEqualGUID(refiid, IID_IVPConfig)) 00087 { 00088 *Output = (IVPConfig*)(this); 00089 reinterpret_cast<IVPConfig*>(*Output)->AddRef(); 00090 return NOERROR; 00091 } 00092 00093 return E_NOINTERFACE; 00094 } 00095 00096 //------------------------------------------------------------------- 00097 // IDistributorNotify interface 00098 // 00099 00100 00101 HRESULT 00102 STDMETHODCALLTYPE 00103 CVPConfig::Stop() 00104 { 00105 #ifdef KSPROXY_TRACE 00106 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00107 #endif 00108 return E_NOTIMPL; 00109 } 00110 00111 HRESULT 00112 STDMETHODCALLTYPE 00113 CVPConfig::Pause() 00114 { 00115 #ifdef KSPROXY_TRACE 00116 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00117 #endif 00118 return E_NOTIMPL; 00119 } 00120 00121 HRESULT 00122 STDMETHODCALLTYPE 00123 CVPConfig::Run( 00124 REFERENCE_TIME tStart) 00125 { 00126 #ifdef KSPROXY_TRACE 00127 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00128 #endif 00129 return E_NOTIMPL; 00130 } 00131 00132 HRESULT 00133 STDMETHODCALLTYPE 00134 CVPConfig::SetSyncSource( 00135 IReferenceClock *pClock) 00136 { 00137 #ifdef KSPROXY_TRACE 00138 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00139 #endif 00140 return E_NOTIMPL; 00141 } 00142 00143 HRESULT 00144 STDMETHODCALLTYPE 00145 CVPConfig::NotifyGraphChange() 00146 { 00147 #ifdef KSPROXY_TRACE 00148 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00149 #endif 00150 return E_NOTIMPL; 00151 } 00152 00153 //------------------------------------------------------------------- 00154 // IVPBaseConfig 00155 // 00156 HRESULT 00157 STDMETHODCALLTYPE 00158 CVPConfig::GetConnectInfo( 00159 LPDWORD pdwNumConnectInfo, 00160 IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo) 00161 { 00162 #ifdef KSPROXY_TRACE 00163 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00164 #endif 00165 return E_NOTIMPL; 00166 } 00167 00168 HRESULT 00169 STDMETHODCALLTYPE 00170 CVPConfig::SetConnectInfo( 00171 DWORD dwChosenEntry) 00172 { 00173 #ifdef KSPROXY_TRACE 00174 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00175 #endif 00176 return E_NOTIMPL; 00177 } 00178 00179 HRESULT 00180 STDMETHODCALLTYPE 00181 CVPConfig::GetVPDataInfo( 00182 LPAMVPDATAINFO pamvpDataInfo) 00183 { 00184 #ifdef KSPROXY_TRACE 00185 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00186 #endif 00187 return E_NOTIMPL; 00188 } 00189 00190 HRESULT 00191 STDMETHODCALLTYPE 00192 CVPConfig::GetMaxPixelRate( 00193 LPAMVPSIZE pamvpSize, 00194 OUT LPDWORD pdwMaxPixelsPerSecond) 00195 { 00196 #ifdef KSPROXY_TRACE 00197 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00198 #endif 00199 return E_NOTIMPL; 00200 } 00201 00202 HRESULT 00203 STDMETHODCALLTYPE 00204 CVPConfig::InformVPInputFormats( 00205 DWORD dwNumFormats, 00206 IN LPDDPIXELFORMAT pDDPixelFormats) 00207 { 00208 #ifdef KSPROXY_TRACE 00209 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00210 #endif 00211 return E_NOTIMPL; 00212 } 00213 00214 HRESULT 00215 STDMETHODCALLTYPE 00216 CVPConfig::GetVideoFormats( 00217 LPDWORD pdwNumFormats, 00218 IN OUT LPDDPIXELFORMAT pddPixelFormats) 00219 { 00220 #ifdef KSPROXY_TRACE 00221 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00222 #endif 00223 return E_NOTIMPL; 00224 } 00225 00226 HRESULT 00227 STDMETHODCALLTYPE 00228 CVPConfig::SetVideoFormat( 00229 DWORD dwChosenEntry) 00230 { 00231 #ifdef KSPROXY_TRACE 00232 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00233 #endif 00234 return E_NOTIMPL; 00235 } 00236 00237 HRESULT 00238 STDMETHODCALLTYPE 00239 CVPConfig::SetInvertPolarity() 00240 { 00241 #ifdef KSPROXY_TRACE 00242 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00243 #endif 00244 return E_NOTIMPL; 00245 } 00246 00247 HRESULT 00248 STDMETHODCALLTYPE 00249 CVPConfig::GetOverlaySurface( 00250 LPDIRECTDRAWSURFACE* ppddOverlaySurface) 00251 { 00252 #ifdef KSPROXY_TRACE 00253 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00254 #endif 00255 return E_NOTIMPL; 00256 } 00257 00258 HRESULT 00259 STDMETHODCALLTYPE 00260 CVPConfig::SetDirectDrawKernelHandle( 00261 ULONG_PTR dwDDKernelHandle) 00262 { 00263 #ifdef KSPROXY_TRACE 00264 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00265 #endif 00266 return E_NOTIMPL; 00267 } 00268 00269 HRESULT 00270 STDMETHODCALLTYPE 00271 CVPConfig::SetVideoPortID( 00272 IN DWORD dwVideoPortID) 00273 { 00274 #ifdef KSPROXY_TRACE 00275 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00276 #endif 00277 return E_NOTIMPL; 00278 } 00279 00280 00281 HRESULT 00282 STDMETHODCALLTYPE 00283 CVPConfig::SetDDSurfaceKernelHandles( 00284 DWORD cHandles, 00285 IN ULONG_PTR *rgDDKernelHandles) 00286 { 00287 #ifdef KSPROXY_TRACE 00288 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00289 #endif 00290 return E_NOTIMPL; 00291 } 00292 00293 00294 HRESULT 00295 STDMETHODCALLTYPE 00296 CVPConfig::SetSurfaceParameters( 00297 DWORD dwPitch, 00298 IN DWORD dwXOrigin, 00299 IN DWORD dwYOrigin) 00300 { 00301 #ifdef KSPROXY_TRACE 00302 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00303 #endif 00304 return E_NOTIMPL; 00305 } 00306 00307 //------------------------------------------------------------------- 00308 // IVPConfig 00309 // 00310 00311 HRESULT 00312 STDMETHODCALLTYPE 00313 CVPConfig::IsVPDecimationAllowed( 00314 LPBOOL pbIsDecimationAllowed) 00315 { 00316 #ifdef KSPROXY_TRACE 00317 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00318 #endif 00319 return E_NOTIMPL; 00320 } 00321 00322 HRESULT 00323 STDMETHODCALLTYPE 00324 CVPConfig::SetScalingFactors( 00325 LPAMVPSIZE pamvpSize) 00326 { 00327 #ifdef KSPROXY_TRACE 00328 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00329 #endif 00330 return E_NOTIMPL; 00331 } 00332 00333 00334 HRESULT 00335 WINAPI 00336 CVPConfig_Constructor( 00337 IUnknown * pUnkOuter, 00338 REFIID riid, 00339 LPVOID * ppv) 00340 { 00341 #ifdef KSPROXY_TRACE 00342 OutputDebugStringW(L"CVPConfig_Constructor\n"); 00343 #endif 00344 00345 CVPConfig * handler = new CVPConfig(); 00346 00347 if (!handler) 00348 return E_OUTOFMEMORY; 00349 00350 if (FAILED(handler->QueryInterface(riid, ppv))) 00351 { 00352 /* not supported */ 00353 delete handler; 00354 return E_NOINTERFACE; 00355 } 00356 00357 return NOERROR; 00358 } 00359 Generated on Sun May 27 2012 04:21:50 for ReactOS by
1.7.6.1
|