Author: janderwald Date: Wed Mar 24 18:30:43 2010 New Revision: 46399
URL: http://svn.reactos.org/svn/reactos?rev=46399&view=rev Log: [KSPROXY] - Silent traces
Modified: trunk/reactos/dll/directx/ksproxy/allocator.cpp trunk/reactos/dll/directx/ksproxy/basicaudio.cpp trunk/reactos/dll/directx/ksproxy/clockforward.cpp trunk/reactos/dll/directx/ksproxy/cvpconfig.cpp trunk/reactos/dll/directx/ksproxy/cvpvbiconfig.cpp trunk/reactos/dll/directx/ksproxy/datatype.cpp trunk/reactos/dll/directx/ksproxy/enum_mediatypes.cpp trunk/reactos/dll/directx/ksproxy/enumpins.cpp trunk/reactos/dll/directx/ksproxy/input_pin.cpp trunk/reactos/dll/directx/ksproxy/interface.cpp trunk/reactos/dll/directx/ksproxy/mediasample.cpp trunk/reactos/dll/directx/ksproxy/node.cpp trunk/reactos/dll/directx/ksproxy/output_pin.cpp trunk/reactos/dll/directx/ksproxy/precomp.h trunk/reactos/dll/directx/ksproxy/proxy.cpp trunk/reactos/dll/directx/ksproxy/qualityforward.cpp
Modified: trunk/reactos/dll/directx/ksproxy/allocator.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/allocat... ============================================================================== --- trunk/reactos/dll/directx/ksproxy/allocator.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/allocator.cpp [iso-8859-1] Wed Mar 24 18:30:43 2010 @@ -140,7 +140,10 @@ SYSTEM_INFO SystemInfo;
EnterCriticalSection(&m_CriticalSection); + +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsAllocator::SetProperties\n"); +#endif
if (!pRequest || !pActual) return E_POINTER; @@ -216,7 +219,9 @@ //TODO integer overflow checks EnterCriticalSection(&m_CriticalSection);
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsAllocator::Commit\n"); +#endif
if (m_Mode == KsAllocatorMode_Kernel) { @@ -301,7 +306,9 @@ { EnterCriticalSection(&m_CriticalSection);
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsAllocator::Decommit\n"); +#endif
if (m_Mode == KsAllocatorMode_Kernel) { @@ -392,7 +399,9 @@ { EnterCriticalSection(&m_CriticalSection);
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsAllocator::ReleaseBuffer\n"); +#endif
// media sample always 1 ref count in free list pBuffer->AddRef(); @@ -429,7 +438,10 @@ IMemAllocatorNotifyCallbackTemp *pNotify) { EnterCriticalSection(&m_CriticalSection); + +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsAllocator::SetNotify\n"); +#endif
if (pNotify) pNotify->AddRef(); @@ -521,7 +533,9 @@ KSALLOCATOR_FRAMING AllocatorFraming; HANDLE hPin;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsAllocator::KsCreateAllocatorAndGetHandle\n"); +#endif
if (m_hAllocator) { @@ -590,7 +604,9 @@ REFIID riid, LPVOID * ppv) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsAllocator_Constructor\n"); +#endif
CKsAllocator * handler = new CKsAllocator();
Modified: trunk/reactos/dll/directx/ksproxy/basicaudio.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/basicau... ============================================================================== --- trunk/reactos/dll/directx/ksproxy/basicaudio.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/basicaudio.cpp [iso-8859-1] Wed Mar 24 18:30:43 2010 @@ -97,7 +97,9 @@ STDMETHODCALLTYPE CKsBasicAudio::Stop() { - OutputDebugStringW(L"UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -105,7 +107,10 @@ STDMETHODCALLTYPE CKsBasicAudio::Pause() { - OutputDebugStringW(L"UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif + return E_NOTIMPL; }
@@ -114,7 +119,10 @@ CKsBasicAudio::Run( REFERENCE_TIME tStart) { - OutputDebugStringW(L"UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif + return E_NOTIMPL; }
@@ -123,7 +131,9 @@ CKsBasicAudio::SetSyncSource( IReferenceClock *pClock) { - OutputDebugStringW(L"UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -131,7 +141,10 @@ STDMETHODCALLTYPE CKsBasicAudio::NotifyGraphChange() { - OutputDebugStringW(L"UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif + return E_NOTIMPL; }
@@ -144,7 +157,10 @@ CKsBasicAudio::GetTypeInfoCount( UINT *pctinfo) { - OutputDebugStringW(L"UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif + return E_NOTIMPL; }
@@ -155,7 +171,9 @@ LCID lcid, ITypeInfo **ppTInfo) { - OutputDebugStringW(L"UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -168,7 +186,10 @@ LCID lcid, DISPID *rgDispId) { - OutputDebugStringW(L"UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif + return E_NOTIMPL; }
@@ -184,7 +205,10 @@ EXCEPINFO *pExcepInfo, UINT *puArgErr) { - OutputDebugStringW(L"UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif + return E_NOTIMPL; }
@@ -197,7 +221,10 @@ CKsBasicAudio::put_Volume( long lVolume) { - OutputDebugStringW(L"UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif + return E_NOTIMPL; }
@@ -207,7 +234,10 @@ CKsBasicAudio::get_Volume( long *plVolume) { - OutputDebugStringW(L"UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif + return E_NOTIMPL; }
@@ -217,7 +247,10 @@ CKsBasicAudio::put_Balance( long lBalance) { - OutputDebugStringW(L"UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif + return E_NOTIMPL; }
@@ -227,7 +260,10 @@ CKsBasicAudio::get_Balance( long *plBalance) { - OutputDebugStringW(L"UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif + return E_NOTIMPL; }
@@ -238,7 +274,9 @@ REFIID riid, LPVOID * ppv) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsBasicAudio_Constructor\n"); +#endif
CKsBasicAudio * handler = new CKsBasicAudio();
Modified: trunk/reactos/dll/directx/ksproxy/clockforward.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/clockfo... ============================================================================== --- trunk/reactos/dll/directx/ksproxy/clockforward.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/clockforward.cpp [iso-8859-1] Wed Mar 24 18:30:43 2010 @@ -120,10 +120,11 @@ STDMETHODCALLTYPE CKsClockForwarder::Stop() { +#ifdef KSPROXY_TRACE WCHAR Buffer[200]; - swprintf(Buffer, L"CKsClockForwarder::Stop m_ThreadStarted %u m_PendingStop %u m_hThread %p m_hEvent %p m_Handle %p\n", m_ThreadStarted, m_PendingStop, m_hThread, m_hEvent, m_Handle); OutputDebugStringW(Buffer); +#endif
m_Time = 0; if (m_ThreadStarted) @@ -164,7 +165,9 @@ STDMETHODCALLTYPE CKsClockForwarder::Pause() { +#ifdef KSPROXY_TRACE OutputDebugString("CKsClockForwarder::Pause\n"); +#endif
if (!m_hEvent) { @@ -204,7 +207,9 @@ CKsClockForwarder::Run( REFERENCE_TIME tStart) { +#ifdef KSPROXY_TRACE OutputDebugString("CKsClockForwarder::Run\n"); +#endif
m_Time = tStart;
@@ -231,7 +236,9 @@ CKsClockForwarder::SetSyncSource( IReferenceClock *pClock) { +#ifdef KSPROXY_TRACE OutputDebugString("CKsClockForwarder::SetSyncSource\n"); +#endif
if (pClock) pClock->AddRef(); @@ -248,7 +255,10 @@ STDMETHODCALLTYPE CKsClockForwarder::NotifyGraphChange() { +#ifdef KSPROXY_TRACE OutputDebugString("CKsClockForwarder::NotifyGraphChange\n"); +#endif + return NOERROR; }
@@ -279,9 +289,11 @@ if (SUCCEEDED(hr)) m_State = State;
+#ifdef KSPROXY_TRACE WCHAR Buffer[100]; swprintf(Buffer, L"CKsClockForwarder::SetClockState m_State %u State %u hr %lx\n", m_State, State, hr); OutputDebugStringW(Buffer); +#endif
return hr; } @@ -331,14 +343,18 @@ HRESULT hr; HANDLE handle;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsClockForwarder_Constructor\n"); +#endif
// open default clock hr = KsOpenDefaultDevice(KSCATEGORY_CLOCK, GENERIC_READ | GENERIC_WRITE, &handle);
if (hr != NOERROR) { +#ifdef KSPROXY_TRACE OutputDebugString("CKsClockForwarder_Constructor failed to open device\n"); +#endif return hr; }
Modified: trunk/reactos/dll/directx/ksproxy/cvpconfig.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/cvpconf... ============================================================================== --- trunk/reactos/dll/directx/ksproxy/cvpconfig.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/cvpconfig.cpp [iso-8859-1] Wed Mar 24 18:30:43 2010 @@ -102,7 +102,9 @@ STDMETHODCALLTYPE CVPConfig::Stop() { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -110,7 +112,9 @@ STDMETHODCALLTYPE CVPConfig::Pause() { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -119,7 +123,9 @@ CVPConfig::Run( REFERENCE_TIME tStart) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -128,7 +134,9 @@ CVPConfig::SetSyncSource( IReferenceClock *pClock) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -136,7 +144,9 @@ STDMETHODCALLTYPE CVPConfig::NotifyGraphChange() { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -149,7 +159,9 @@ LPDWORD pdwNumConnectInfo, IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -158,7 +170,9 @@ CVPConfig::SetConnectInfo( DWORD dwChosenEntry) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -167,7 +181,9 @@ CVPConfig::GetVPDataInfo( LPAMVPDATAINFO pamvpDataInfo) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -177,7 +193,9 @@ LPAMVPSIZE pamvpSize, OUT LPDWORD pdwMaxPixelsPerSecond) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -187,7 +205,9 @@ DWORD dwNumFormats, IN LPDDPIXELFORMAT pDDPixelFormats) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -197,7 +217,9 @@ LPDWORD pdwNumFormats, IN OUT LPDDPIXELFORMAT pddPixelFormats) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -206,7 +228,9 @@ CVPConfig::SetVideoFormat( DWORD dwChosenEntry) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -214,7 +238,9 @@ STDMETHODCALLTYPE CVPConfig::SetInvertPolarity() { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -223,7 +249,9 @@ CVPConfig::GetOverlaySurface( LPDIRECTDRAWSURFACE* ppddOverlaySurface) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -232,7 +260,9 @@ CVPConfig::SetDirectDrawKernelHandle( ULONG_PTR dwDDKernelHandle) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -241,7 +271,9 @@ CVPConfig::SetVideoPortID( IN DWORD dwVideoPortID) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -252,7 +284,9 @@ DWORD cHandles, IN ULONG_PTR *rgDDKernelHandles) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -264,7 +298,9 @@ IN DWORD dwXOrigin, IN DWORD dwYOrigin) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -277,7 +313,9 @@ CVPConfig::IsVPDecimationAllowed( LPBOOL pbIsDecimationAllowed) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -286,11 +324,11 @@ CVPConfig::SetScalingFactors( LPAMVPSIZE pamvpSize) { - OutputDebugString("UNIMPLEMENTED\n"); - return E_NOTIMPL; -} - - +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif + return E_NOTIMPL; +}
HRESULT @@ -300,7 +338,9 @@ REFIID riid, LPVOID * ppv) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CVPConfig_Constructor\n"); +#endif
CVPConfig * handler = new CVPConfig();
Modified: trunk/reactos/dll/directx/ksproxy/cvpvbiconfig.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/cvpvbic... ============================================================================== --- trunk/reactos/dll/directx/ksproxy/cvpvbiconfig.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/cvpvbiconfig.cpp [iso-8859-1] Wed Mar 24 18:30:43 2010 @@ -98,7 +98,9 @@ STDMETHODCALLTYPE CVPVBIConfig::Stop() { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -106,7 +108,9 @@ STDMETHODCALLTYPE CVPVBIConfig::Pause() { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -115,7 +119,9 @@ CVPVBIConfig::Run( REFERENCE_TIME tStart) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -124,7 +130,9 @@ CVPVBIConfig::SetSyncSource( IReferenceClock *pClock) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -132,7 +140,9 @@ STDMETHODCALLTYPE CVPVBIConfig::NotifyGraphChange() { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -145,7 +155,9 @@ LPDWORD pdwNumConnectInfo, IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -154,7 +166,9 @@ CVPVBIConfig::SetConnectInfo( DWORD dwChosenEntry) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -163,7 +177,9 @@ CVPVBIConfig::GetVPDataInfo( LPAMVPDATAINFO pamvpDataInfo) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -173,7 +189,9 @@ LPAMVPSIZE pamvpSize, OUT LPDWORD pdwMaxPixelsPerSecond) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -183,7 +201,9 @@ DWORD dwNumFormats, IN LPDDPIXELFORMAT pDDPixelFormats) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -193,7 +213,9 @@ LPDWORD pdwNumFormats, IN OUT LPDDPIXELFORMAT pddPixelFormats) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -202,7 +224,9 @@ CVPVBIConfig::SetVideoFormat( DWORD dwChosenEntry) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -210,7 +234,9 @@ STDMETHODCALLTYPE CVPVBIConfig::SetInvertPolarity() { - OutputDebugString("UNIMPLEMENTED\n"); + #ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -219,7 +245,9 @@ CVPVBIConfig::GetOverlaySurface( LPDIRECTDRAWSURFACE* ppddOverlaySurface) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -228,7 +256,9 @@ CVPVBIConfig::SetDirectDrawKernelHandle( ULONG_PTR dwDDKernelHandle) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -237,7 +267,9 @@ CVPVBIConfig::SetVideoPortID( IN DWORD dwVideoPortID) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -248,7 +280,9 @@ DWORD cHandles, IN ULONG_PTR *rgDDKernelHandles) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -260,7 +294,9 @@ IN DWORD dwXOrigin, IN DWORD dwYOrigin) { - OutputDebugString("UNIMPLEMENTED\n"); +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"UNIMPLEMENTED\n"); +#endif return E_NOTIMPL; }
@@ -272,7 +308,9 @@ REFIID riid, LPVOID * ppv) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CVPVBIConfig_Constructor\n"); +#endif
CVPVBIConfig * handler = new CVPVBIConfig();
Modified: trunk/reactos/dll/directx/ksproxy/datatype.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/datatyp... ============================================================================== --- trunk/reactos/dll/directx/ksproxy/datatype.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/datatype.cpp [iso-8859-1] Wed Mar 24 18:30:43 2010 @@ -103,7 +103,9 @@ ULONG Index; HRESULT hr = S_FALSE;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsDataTypeHandler::KsIsMediaTypeInRanges\n"); +#endif
DataList = (PKSMULTIPLE_ITEM)DataRanges; DataRange = (PKSDATARANGE)(DataList + 1); @@ -187,7 +189,9 @@ CKsDataTypeHandler::KsSetMediaType( IN const AM_MEDIA_TYPE* AmMediaType) { +#ifdef KSPROXY_TRACE OutputDebugString("CKsDataTypeHandler::KsSetMediaType\n"); +#endif
if (m_Type) { @@ -228,7 +232,10 @@ REFIID riid, LPVOID * ppv) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsDataTypeHandler_Constructor\n"); +#endif + CKsDataTypeHandler * handler = new CKsDataTypeHandler();
if (!handler)
Modified: trunk/reactos/dll/directx/ksproxy/enum_mediatypes.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/enum_me... ============================================================================== --- trunk/reactos/dll/directx/ksproxy/enum_mediatypes.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/enum_mediatypes.cpp [iso-8859-1] Wed Mar 24 18:30:43 2010 @@ -64,13 +64,6 @@ return NOERROR; }
- WCHAR Buffer[MAX_PATH]; - LPOLESTR lpstr; - StringFromCLSID(refiid, &lpstr); - swprintf(Buffer, L"CEnumMediaTypes::QueryInterface: NoInterface for %s\n", lpstr); - OutputDebugStringW(Buffer); - CoTaskMemFree(lpstr); - return E_NOINTERFACE; }
@@ -171,7 +164,9 @@ CEnumMediaTypes::Clone( IEnumMediaTypes **ppEnum) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CEnumMediaTypes::Clone : NotImplemented\n"); +#endif return E_NOTIMPL; }
@@ -189,7 +184,7 @@ WCHAR Buffer[MAX_PATH]; LPOLESTR lpstr; StringFromCLSID(riid, &lpstr); - swprintf(Buffer, L"CEnumMediaTypes_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown); + swprintf(Buffer, L"CEnumMediaTypes_fnConstructor riid %s\n", lpstr); OutputDebugStringW(Buffer); #endif
Modified: trunk/reactos/dll/directx/ksproxy/enumpins.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/enumpin... ============================================================================== --- trunk/reactos/dll/directx/ksproxy/enumpins.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/enumpins.cpp [iso-8859-1] Wed Mar 24 18:30:43 2010 @@ -132,7 +132,10 @@ CEnumPins::Clone( IEnumPins **ppEnum) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CEnumPins::Clone : NotImplemented\n"); +#endif + return E_NOTIMPL; }
Modified: trunk/reactos/dll/directx/ksproxy/input_pin.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/input_p... ============================================================================== --- trunk/reactos/dll/directx/ksproxy/input_pin.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/input_pin.cpp [iso-8859-1] Wed Mar 24 18:30:43 2010 @@ -356,7 +356,10 @@ IBaseFilter *pSelf, Quality q) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::Notify NotImplemented\n"); +#endif + return E_NOTIMPL; }
@@ -365,7 +368,10 @@ CInputPin::SetSink( IQualityControl *piqc) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::SetSink NotImplemented\n"); +#endif + return E_NOTIMPL; }
@@ -378,7 +384,10 @@ CInputPin::KsAddAggregate( IN REFGUID AggregateClass) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::KsAddAggregate NotImplemented\n"); +#endif + return E_NOTIMPL; }
@@ -387,7 +396,10 @@ CInputPin::KsRemoveAggregate( REFGUID AggregateClass) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::KsRemoveAggregate NotImplemented\n"); +#endif + return E_NOTIMPL; }
@@ -411,7 +423,10 @@ IPin *ppinOut, IGraphBuilder *pGraph) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::Backout\n"); +#endif + return S_OK; }
@@ -424,7 +439,10 @@ CInputPin::KsPinFactory( ULONG* PinFactory) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::KsPinFactory\n"); +#endif + *PinFactory = m_PinId; return S_OK; } @@ -600,7 +618,10 @@ STDMETHODCALLTYPE CInputPin::GetAllocator(IMemAllocator **ppAllocator) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::GetAllocator\n"); +#endif + return VFW_E_NO_ALLOCATOR; }
@@ -608,13 +629,16 @@ STDMETHODCALLTYPE CInputPin::NotifyAllocator(IMemAllocator *pAllocator, BOOL bReadOnly) { - WCHAR Buffer[100]; HRESULT hr; ALLOCATOR_PROPERTIES Properties;
hr = pAllocator->GetProperties(&Properties); + +#ifdef KSPROXY_TRACE + WCHAR Buffer[100]; swprintf(Buffer, L"CInputPin::NotifyAllocator hr %lx bReadOnly, %u cbAlign %u cbBuffer %u cbPrefix %u cBuffers %u\n", hr, bReadOnly, Properties.cbAlign, Properties.cbBuffer, Properties.cbPrefix, Properties.cBuffers); OutputDebugStringW(Buffer); +#endif
if (pAllocator) { @@ -655,9 +679,11 @@ else hr = E_NOTIMPL;
+#ifdef KSPROXY_TRACE WCHAR Buffer[100]; swprintf(Buffer, L"CInputPin::GetAllocatorRequirements hr %lx m_hPin %p cBuffers %u cbBuffer %u cbAlign %u cbPrefix %u\n", hr, m_hPin, pProps->cBuffers, pProps->cbBuffer, pProps->cbAlign, pProps->cbPrefix); OutputDebugStringW(Buffer); +#endif
return hr; } @@ -666,8 +692,11 @@ STDMETHODCALLTYPE CInputPin::Receive(IMediaSample *pSample) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::Receive NotImplemented\n"); DebugBreak(); +#endif + return E_NOTIMPL; }
@@ -675,8 +704,11 @@ STDMETHODCALLTYPE CInputPin::ReceiveMultiple(IMediaSample **pSamples, long nSamples, long *nSamplesProcessed) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::ReceiveMultiple NotImplemented\n"); DebugBreak(); +#endif + return E_NOTIMPL; }
@@ -684,8 +716,11 @@ STDMETHODCALLTYPE CInputPin::ReceiveCanBlock( void) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::ReceiveCanBlock NotImplemented\n"); DebugBreak(); +#endif + return S_FALSE; }
@@ -878,7 +913,10 @@ ULONG Proportion, REFERENCE_TIME TimeDelta) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::KsQualityNotify NotImplemented\n"); +#endif + DebugBreak(); return E_NOTIMPL; } @@ -893,7 +931,9 @@ IMediaSample* Sample, HRESULT hr) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::KsNotifyError NotImplemented\n"); +#endif }
@@ -1066,8 +1106,10 @@ STDMETHODCALLTYPE CInputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::Connect NotImplemented\n"); DebugBreak(); +#endif return NOERROR; }
@@ -1118,7 +1160,10 @@ m_Pin->Release(); m_Pin = NULL;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::Disconnect\n"); +#endif + return S_OK; } HRESULT @@ -1146,8 +1191,11 @@ if (!m_Pin) return VFW_E_NOT_CONNECTED;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::ConnectionMediaType NotImplemented\n"); DebugBreak(); +#endif + return E_NOTIMPL; } HRESULT @@ -1249,35 +1297,45 @@ STDMETHODCALLTYPE CInputPin::QueryInternalConnections(IPin **apPin, ULONG *nPin) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::QueryInternalConnections NotImplemented\n"); +#endif return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CInputPin::EndOfStream( void) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::EndOfStream NotImplemented\n"); +#endif return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CInputPin::BeginFlush( void) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::BeginFlush NotImplemented\n"); +#endif return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CInputPin::EndFlush( void) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::EndFlush NotImplemented\n"); +#endif return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CInputPin::NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::NewSegment NotImplemented\n"); +#endif return E_NOTIMPL; }
@@ -1322,7 +1380,9 @@ { // format is supported CoTaskMemFree(MultipleItem); +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::CheckFormat format OK\n"); +#endif return S_OK; } DataFormat = (PKSDATAFORMAT)((ULONG_PTR)DataFormat + DataFormat->FormatSize); @@ -1389,7 +1449,9 @@ if (FAILED(hr)) { // failed to load interface handler plugin +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::CreatePin failed to load InterfaceHandlerPlugin\n"); +#endif CoTaskMemFree(MediumList); CoTaskMemFree(InterfaceList);
@@ -1401,7 +1463,9 @@ if (FAILED(hr)) { // failed to load interface handler plugin +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::CreatePin failed to initialize InterfaceHandlerPlugin\n"); +#endif InterfaceHandler->Release(); CoTaskMemFree(MediumList); CoTaskMemFree(InterfaceList); @@ -1422,10 +1486,12 @@ } else { +#ifdef KSPROXY_TRACE WCHAR Buffer[100]; swprintf(Buffer, L"CInputPin::CreatePin unexpected communication %u %s\n", m_Communication, m_PinName); OutputDebugStringW(Buffer); DebugBreak(); +#endif hr = E_FAIL; }
@@ -1521,16 +1587,19 @@ CopyMemory(&m_Interface, Interface, sizeof(KSPIN_INTERFACE)); CopyMemory(&m_MediaFormat, pmt, sizeof(AM_MEDIA_TYPE));
+#ifdef KSPROXY_TRACE LPOLESTR pMajor, pSub, pFormat; StringFromIID(m_MediaFormat.majortype, &pMajor); StringFromIID(m_MediaFormat.subtype , &pSub); StringFromIID(m_MediaFormat.formattype, &pFormat); + WCHAR Buffer[200]; swprintf(Buffer, L"CInputPin::CreatePinHandle Major %s SubType %s Format %s pbFormat %p cbFormat %u\n", pMajor, pSub, pFormat, pmt->pbFormat, pmt->cbFormat); CoTaskMemFree(pMajor); CoTaskMemFree(pSub); CoTaskMemFree(pFormat); OutputDebugStringW(Buffer); +#endif
if (pmt->cbFormat) {
Modified: trunk/reactos/dll/directx/ksproxy/interface.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/interfa... ============================================================================== --- trunk/reactos/dll/directx/ksproxy/interface.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/interface.cpp [iso-8859-1] Wed Mar 24 18:30:43 2010 @@ -285,10 +285,11 @@ if (SampleList[Index]->IsSyncPoint() == S_OK) Properties.dwSampleFlags |= AM_SAMPLE_SPLICEPOINT; } - +#ifdef KSPROXY_TRACE WCHAR Buffer[200]; swprintf(Buffer, L"CKsInterfaceHandler::KsProcessMediaSamples PinName %s BufferLength %lu Property Buffer %p ExtendedSize %u lActual %u dwSampleFlags %lx\n", m_PinName, Properties.cbBuffer, Properties.pbBuffer, ExtendedSize, Properties.lActual, Properties.dwSampleFlags); - //OutputDebugStringW(Buffer); + OutputDebugStringW(Buffer); +#endif
CurStreamHeader->Size = sizeof(KSSTREAM_HEADER) + ExtendedSize; CurStreamHeader->PresentationTime.Denominator = 1; @@ -479,7 +480,9 @@ REFIID riid, LPVOID * ppv) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsInterfaceHandler_Constructor\n"); +#endif
CKsInterfaceHandler * handler = new CKsInterfaceHandler();
Modified: trunk/reactos/dll/directx/ksproxy/mediasample.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/mediasa... ============================================================================== --- trunk/reactos/dll/directx/ksproxy/mediasample.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/mediasample.cpp [iso-8859-1] Wed Mar 24 18:30:43 2010 @@ -348,7 +348,9 @@ REFIID riid, LPVOID * ppv) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CMediaSample_Constructor\n"); +#endif
CMediaSample * handler = new CMediaSample(Allocator, pBuffer, BufferSize);
Modified: trunk/reactos/dll/directx/ksproxy/node.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/node.cp... ============================================================================== --- trunk/reactos/dll/directx/ksproxy/node.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/node.cpp [iso-8859-1] Wed Mar 24 18:30:43 2010 @@ -124,7 +124,9 @@ HANDLE handle; KSNODE_CREATE NodeCreate;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsNode_Constructor\n"); +#endif
//setup request NodeCreate.CreateFlags = 0;
Modified: trunk/reactos/dll/directx/ksproxy/output_pin.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/output_... ============================================================================== --- trunk/reactos/dll/directx/ksproxy/output_pin.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/output_pin.cpp [iso-8859-1] Wed Mar 24 18:30:43 2010 @@ -258,7 +258,9 @@ if (IsEqualGUID(refiid, IID_IUnknown) || IsEqualGUID(refiid, IID_IPin)) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::QueryInterface IID_IPin\n"); +#endif *Output = PVOID(this); reinterpret_cast<IUnknown*>(*Output)->AddRef(); return NOERROR; @@ -271,8 +273,9 @@ if (FAILED(hr)) return hr; } - +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::QueryInterface IID_IKsObject\n"); +#endif *Output = (IKsObject*)(this); reinterpret_cast<IKsObject*>(*Output)->AddRef(); return NOERROR; @@ -309,14 +312,18 @@ if (FAILED(hr)) return hr; } +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::QueryInterface IID_IKsPropertySet\n"); +#endif *Output = (IKsPropertySet*)(this); reinterpret_cast<IKsPropertySet*>(*Output)->AddRef(); return NOERROR; } else if (IsEqualGUID(refiid, IID_IKsControl)) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::QueryInterface IID_IKsControl\n"); +#endif *Output = (IKsControl*)(this); reinterpret_cast<IKsControl*>(*Output)->AddRef(); return NOERROR; @@ -331,14 +338,18 @@ #endif else if (IsEqualGUID(refiid, IID_IKsPinFactory)) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::QueryInterface IID_IKsPinFactory\n"); +#endif *Output = (IKsPinFactory*)(this); reinterpret_cast<IKsPinFactory*>(*Output)->AddRef(); return NOERROR; } else if (IsEqualGUID(refiid, IID_ISpecifyPropertyPages)) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::QueryInterface IID_ISpecifyPropertyPages\n"); +#endif *Output = (ISpecifyPropertyPages*)(this); reinterpret_cast<ISpecifyPropertyPages*>(*Output)->AddRef(); return NOERROR; @@ -368,12 +379,14 @@ return NOERROR; }
+#ifdef KSPROXY_TRACE WCHAR Buffer[MAX_PATH]; LPOLESTR lpstr; StringFromCLSID(refiid, &lpstr); swprintf(Buffer, L"COutputPin::QueryInterface: NoInterface for %s PinId %u PinName %s\n", lpstr, m_PinId, m_PinName); OutputDebugStringW(Buffer); CoTaskMemFree(lpstr); +#endif
return E_NOINTERFACE; } @@ -386,7 +399,9 @@ COutputPin::SuggestAllocatorProperties( const ALLOCATOR_PROPERTIES *pprop) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::SuggestAllocatorProperties\n"); +#endif
if (m_Pin) { @@ -403,7 +418,9 @@ COutputPin::GetAllocatorProperties( ALLOCATOR_PROPERTIES *pprop) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::GetAllocatorProperties\n"); +#endif
if (!m_Pin) { @@ -429,7 +446,9 @@ COutputPin::SetFormat( AM_MEDIA_TYPE *pmt) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::SetFormat NotImplemented\n"); +#endif return E_NOTIMPL; }
@@ -437,7 +456,9 @@ STDMETHODCALLTYPE COutputPin::GetFormat(AM_MEDIA_TYPE **ppmt) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::GetFormat NotImplemented\n"); +#endif return E_NOTIMPL; }
@@ -447,7 +468,9 @@ int *piCount, int *piSize) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::GetNumberOfCapabilities NotImplemented\n"); +#endif return E_NOTIMPL; }
@@ -458,7 +481,9 @@ AM_MEDIA_TYPE **ppmt, BYTE *pSCC) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::GetStreamCaps NotImplemented\n"); +#endif return E_NOTIMPL; }
@@ -469,7 +494,9 @@ STDMETHODCALLTYPE COutputPin::NotifyRelease() { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::NotifyRelease\n"); +#endif
// notify thread of new available sample SetEvent(m_hBufferAvailable); @@ -804,7 +831,9 @@ IBaseFilter *pSelf, Quality q) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::Notify NotImplemented\n"); +#endif return E_NOTIMPL; }
@@ -813,7 +842,9 @@ COutputPin::SetSink( IQualityControl *piqc) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::SetSink NotImplemented\n"); +#endif return E_NOTIMPL; }
@@ -826,7 +857,9 @@ COutputPin::KsAddAggregate( IN REFGUID AggregateClass) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::KsAddAggregate NotImplemented\n"); +#endif return E_NOTIMPL; }
@@ -835,7 +868,9 @@ COutputPin::KsRemoveAggregate( REFGUID AggregateClass) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::KsRemoveAggregate NotImplemented\n"); +#endif return E_NOTIMPL; }
@@ -900,7 +935,9 @@ KSPIN_INTERFACE& Interface, KSPIN_MEDIUM& Medium) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::KsCreateSinkPinHandle NotImplemented\n"); +#endif return E_NOTIMPL; }
@@ -943,7 +980,9 @@ ULONG BytesReturned; HRESULT hr;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::KsPropagateAcquire\n"); +#endif
assert(m_hPin != INVALID_HANDLE_VALUE);
@@ -954,6 +993,10 @@ State = KSSTATE_ACQUIRE;
hr = KsProperty(&Property, sizeof(KSPROPERTY), (LPVOID)&State, sizeof(KSSTATE), &BytesReturned); + if (SUCCEEDED(hr)) + { + m_State = State; + }
//TODO //propagate to connected pin on the pipe @@ -1035,7 +1078,9 @@ ULONG Proportion, REFERENCE_TIME TimeDelta) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::KsQualityNotify NotImplemented\n"); +#endif return E_NOTIMPL; }
@@ -1049,7 +1094,9 @@ IMediaSample* Sample, HRESULT hr) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::KsNotifyError NotImplemented\n"); +#endif }
@@ -1206,7 +1253,9 @@ STDMETHODCALLTYPE COutputPin::GetPages(CAUUID *pPages) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::GetPages NotImplemented\n"); +#endif
if (!pPages) return E_POINTER; @@ -1226,7 +1275,10 @@ COutputPin::KsPinFactory( ULONG* PinFactory) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::KsPinFactory\n"); +#endif + *PinFactory = m_PinId; return S_OK; } @@ -1242,7 +1294,9 @@ IPin *ppinOut, IGraphBuilder *pGraph) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::Render\n"); +#endif return S_OK; }
@@ -1252,7 +1306,10 @@ IPin *ppinOut, IGraphBuilder *pGraph) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::Backout\n"); +#endif + return S_OK; } //------------------------------------------------------------------- @@ -1262,7 +1319,10 @@ STDMETHODCALLTYPE COutputPin::KsGetObjectHandle() { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::KsGetObjectHandle\n"); +#endif + assert(m_hPin != INVALID_HANDLE_VALUE); return m_hPin; } @@ -1280,16 +1340,17 @@ ULONG* BytesReturned) { HRESULT hr; + + assert(m_hPin != INVALID_HANDLE_VALUE); + + hr = KsSynchronousDeviceControl(m_hPin, IOCTL_KS_PROPERTY, (PVOID)Property, PropertyLength, (PVOID)PropertyData, DataLength, BytesReturned); +#ifdef KSPROXY_TRACE WCHAR Buffer[100]; LPOLESTR pstr; - - assert(m_hPin != INVALID_HANDLE_VALUE); - - hr = KsSynchronousDeviceControl(m_hPin, IOCTL_KS_PROPERTY, (PVOID)Property, PropertyLength, (PVOID)PropertyData, DataLength, BytesReturned); - StringFromCLSID(Property->Set, &pstr); swprintf(Buffer, L"COutputPin::KsProperty Set %s Id %lu Flags %x hr %x\n", pstr, Property->Id, Property->Flags, hr); OutputDebugStringW(Buffer); +#endif
return hr; } @@ -1304,7 +1365,9 @@ ULONG* BytesReturned) { assert(m_hPin != INVALID_HANDLE_VALUE); +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::KsMethod\n"); +#endif return KsSynchronousDeviceControl(m_hPin, IOCTL_KS_METHOD, (PVOID)Method, MethodLength, (PVOID)MethodData, DataLength, BytesReturned); }
@@ -1319,7 +1382,9 @@ { assert(m_hPin != INVALID_HANDLE_VALUE);
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::KsEvent\n"); +#endif
if (EventLength) return KsSynchronousDeviceControl(m_hPin, IOCTL_KS_ENABLE_EVENT, (PVOID)Event, EventLength, (PVOID)EventData, DataLength, BytesReturned); @@ -1424,7 +1489,9 @@ KSPROPERTY Property; ULONG BytesReturned;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::QuerySupported\n"); +#endif
Property.Set = guidPropSet; Property.Id = dwPropID; @@ -1444,9 +1511,12 @@ HRESULT hr; ALLOCATOR_PROPERTIES Properties; IMemAllocatorCallbackTemp *pMemCallback; + +#ifdef KSPROXY_TRACE WCHAR Buffer[200]; - OutputDebugStringW(L"COutputPin::Connect called\n"); +#endif + if (pmt) { hr = pReceivePin->QueryAccept(pmt); @@ -1467,7 +1537,10 @@ hr = pReceivePin->QueryInterface(IID_IMemInputPin, (void**)&m_MemInputPin); if (FAILED(hr)) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::Connect no IMemInputPin interface\n"); +#endif + DebugBreak(); return hr; } @@ -1503,8 +1576,10 @@ hr = m_MemAllocator->SetProperties(&Properties, &m_Properties); if (FAILED(hr)) { +#ifdef KSPROXY_TRACE swprintf(Buffer, L"COutputPin::Connect IMemAllocator::SetProperties failed with hr %lx\n", hr); OutputDebugStringW(Buffer); +#endif m_MemAllocator->Release(); m_MemInputPin->Release(); return hr; @@ -1515,8 +1590,10 @@ hr = m_MemAllocator->Commit(); if (FAILED(hr)) { +#ifdef KSPROXY_TRACE swprintf(Buffer, L"COutputPin::Connect IMemAllocator::Commit failed with hr %lx\n", hr); OutputDebugStringW(Buffer); +#endif m_MemAllocator->Release(); m_MemInputPin->Release(); return hr; @@ -1526,8 +1603,10 @@ hr = m_MemAllocator->QueryInterface(IID_IMemAllocatorCallbackTemp, (void**)&pMemCallback); if (FAILED(hr)) { +#ifdef KSPROXY_TRACE swprintf(Buffer, L"COutputPin::Connect No IMemAllocatorCallbackTemp interface hr %lx\n", hr); OutputDebugStringW(Buffer); +#endif m_MemAllocator->Release(); m_MemInputPin->Release(); return hr; @@ -1541,8 +1620,10 @@
if (FAILED(hr)) { +#ifdef KSPROXY_TRACE swprintf(Buffer, L"COutputPin::Connect IMemAllocatorNotifyCallbackTemp::SetNotify failed hr %lx\n", hr); OutputDebugStringW(Buffer); +#endif m_MemAllocator->Release(); m_MemInputPin->Release(); return hr; @@ -1552,8 +1633,10 @@ hr = m_MemInputPin->NotifyAllocator(m_MemAllocator, TRUE); if (FAILED(hr)) { +#ifdef KSPROXY_TRACE swprintf(Buffer, L"COutputPin::Connect IMemInputPin::NotifyAllocator failed with hr %lx\n", hr); OutputDebugStringW(Buffer); +#endif m_MemAllocator->Release(); m_MemInputPin->Release(); return hr; @@ -1572,7 +1655,9 @@ // increment reference count pReceivePin->AddRef(); m_Pin = pReceivePin; +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::Connect success\n"); +#endif } else { @@ -1593,7 +1678,9 @@ STDMETHODCALLTYPE COutputPin::Disconnect( void) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::Disconnect\n"); +#endif
if (!m_Pin) { @@ -1612,14 +1699,18 @@ CloseHandle(m_hPin); m_hPin = INVALID_HANDLE_VALUE;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::Disconnect\n"); +#endif return S_OK; } HRESULT STDMETHODCALLTYPE COutputPin::ConnectedTo(IPin **pPin) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::ConnectedTo\n"); +#endif
if (!pPin) return E_POINTER; @@ -1639,7 +1730,10 @@ STDMETHODCALLTYPE COutputPin::ConnectionMediaType(AM_MEDIA_TYPE *pmt) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::ConnectionMediaType called\n"); +#endif + return E_NOTIMPL; } HRESULT @@ -1680,7 +1774,10 @@ STDMETHODCALLTYPE COutputPin::QueryAccept(const AM_MEDIA_TYPE *pmt) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"COutputPin::QueryAccept called\n"); +#endif + return E_NOTIMPL; } HRESULT @@ -1915,10 +2012,13 @@ } else { +#ifdef KSPROXY_TRACE WCHAR Buffer[100]; swprintf(Buffer, L"COutputPin::CreatePin unexpected communication %u %s\n", m_Communication, m_PinName); OutputDebugStringW(Buffer); DebugBreak(); +#endif + hr = E_FAIL; }
@@ -2017,6 +2117,7 @@ CopyMemory(&m_Interface, Interface, sizeof(KSPIN_INTERFACE)); CopyMemory(&m_MediaFormat, pmt, sizeof(AM_MEDIA_TYPE));
+#ifdef KSPROXY_TRACE LPOLESTR pMajor, pSub, pFormat; StringFromIID(m_MediaFormat.majortype, &pMajor); StringFromIID(m_MediaFormat.subtype , &pSub); @@ -2027,6 +2128,7 @@ CoTaskMemFree(pSub); CoTaskMemFree(pFormat); OutputDebugStringW(Buffer); +#endif
if (pmt->cbFormat) { @@ -2082,8 +2184,11 @@ HRESULT hr; PKSSTREAM_SEGMENT StreamSegment; HANDLE hEvent; + IMediaSample * Samples[1]; + +#ifdef KSPROXY_TRACE WCHAR Buffer[200]; - IMediaSample * Samples[1]; +#endif
// first wait for the start event to signal WaitForSingleObject(m_hStartEvent, INFINITE); @@ -2122,8 +2227,10 @@ &StreamSegment); if (FAILED(hr) || !StreamSegment) { +#ifdef KSPROXY_TRACE swprintf(Buffer, L"COutputPin::IoProcessRoutine KsProcessMediaSamples FAILED PinName %s hr %lx\n", m_PinName, hr); OutputDebugStringW(Buffer); +#endif break; }
@@ -2146,10 +2253,14 @@ // now deliver the sample hr = m_MemInputPin->Receive(Sample);
+#ifdef KSPROXY_TRACE swprintf(Buffer, L"COutputPin::IoProcessRoutine PinName %s IMemInputPin::Receive hr %lx Sample %p m_MemAllocator %p\n", m_PinName, hr, Sample, m_MemAllocator); OutputDebugStringW(Buffer); +#endif + if (FAILED(hr)) - DebugBreak(); + break; + Sample = NULL; } }while(TRUE); @@ -2224,10 +2335,12 @@ HRESULT hr = S_OK; KSPROPERTY Property; KSSTATE CurState; + ULONG BytesReturned; + COutputPin * pPin = (COutputPin*)Pin; + +#ifdef KSPROXY_TRACE WCHAR Buffer[200]; - ULONG BytesReturned; - - COutputPin * pPin = (COutputPin*)Pin; +#endif
Property.Set = KSPROPSETID_Connection; Property.Id = KSPROPERTY_CONNECTION_STATE; @@ -2243,15 +2356,20 @@ if (FAILED(hr)) { // failed to initialize I/O thread +#ifdef KSPROXY_TRACE OutputDebugStringW(L"Failed to initialize I/O Thread\n"); +#endif LeaveCriticalSection(&pPin->m_Lock); return hr; } CurState = KSSTATE_ACQUIRE; hr = pPin->KsProperty(&Property, sizeof(KSPROPERTY), &CurState, sizeof(KSSTATE), &BytesReturned);
+#ifdef KSPROXY_TRACE swprintf(Buffer, L"COutputPin_SetState Setting State CurState: KSSTATE_STOP KSSTATE_ACQUIRE PinName %s hr %lx\n", pPin->m_PinName, hr); OutputDebugStringW(Buffer); +#endif + if (FAILED(hr)) { LeaveCriticalSection(&pPin->m_Lock); @@ -2271,8 +2389,11 @@ CurState = KSSTATE_PAUSE; hr = pPin->KsProperty(&Property, sizeof(KSPROPERTY), &CurState, sizeof(KSSTATE), &BytesReturned);
+#ifdef KSPROXY_TRACE swprintf(Buffer, L"COutputPin_SetState Setting State CurState KSSTATE_ACQUIRE KSSTATE_PAUSE PinName %s hr %lx\n", pPin->m_PinName, hr); OutputDebugStringW(Buffer); +#endif + if (FAILED(hr)) { LeaveCriticalSection(&pPin->m_Lock); @@ -2292,8 +2413,10 @@ CurState = KSSTATE_RUN; hr = pPin->KsProperty(&Property, sizeof(KSPROPERTY), &CurState, sizeof(KSSTATE), &BytesReturned);
+#ifdef KSPROXY_TRACE swprintf(Buffer, L"COutputPin_SetState Setting State CurState: KSSTATE_PAUSE KSSTATE_RUN PinName %s hr %lx\n", pPin->m_PinName, hr); OutputDebugStringW(Buffer); +#endif
if (SUCCEEDED(hr)) { @@ -2322,8 +2445,10 @@ CurState = KSSTATE_PAUSE; hr = pPin->KsProperty(&Property, sizeof(KSPROPERTY), &CurState, sizeof(KSSTATE), &BytesReturned);
+#ifdef KSPROXY_TRACE swprintf(Buffer, L"COutputPin_SetState Setting State CurState: KSSTATE_RUN KSSTATE_PAUSE PinName %s hr %lx\n", pPin->m_PinName, hr); OutputDebugStringW(Buffer); +#endif
if (FAILED(hr)) { @@ -2344,8 +2469,10 @@ CurState = KSSTATE_ACQUIRE; hr = pPin->KsProperty(&Property, sizeof(KSPROPERTY), &CurState, sizeof(KSSTATE), &BytesReturned);
+#ifdef KSPROXY_TRACE swprintf(Buffer, L"COutputPin_SetState Setting State CurState: KSSTATE_PAUSE KSSTATE_ACQUIRE PinName %s hr %lx\n", pPin->m_PinName, hr); OutputDebugStringW(Buffer); +#endif
if (FAILED(hr)) { @@ -2374,8 +2501,10 @@ CurState = KSSTATE_STOP; hr = pPin->KsProperty(&Property, sizeof(KSPROPERTY), &CurState, sizeof(KSSTATE), &BytesReturned);
+#ifdef KSPROXY_TRACE swprintf(Buffer, L"COutputPin_SetState Setting State CurState: KSSTATE_ACQUIRE KSSTATE_STOP PinName %s hr %lx\n", pPin->m_PinName, hr); OutputDebugStringW(Buffer); +#endif
if (SUCCEEDED(hr)) {
Modified: trunk/reactos/dll/directx/ksproxy/precomp.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/precomp... ============================================================================== --- trunk/reactos/dll/directx/ksproxy/precomp.h [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/precomp.h [iso-8859-1] Wed Mar 24 18:30:43 2010 @@ -3,6 +3,7 @@ #define _FORCENAMELESSUNION #define BUILDING_KS #define _KSDDK_ +//#define KSPROXY_TRACE #include <dshow.h> //#include <streams.h> #include <ks.h>
Modified: trunk/reactos/dll/directx/ksproxy/proxy.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/proxy.c... ============================================================================== --- trunk/reactos/dll/directx/ksproxy/proxy.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/proxy.cpp [iso-8859-1] Wed Mar 24 18:30:43 2010 @@ -347,24 +347,26 @@ HRESULT hr = m_Plugins[Index]->QueryInterface(refiid, Output); if (SUCCEEDED(hr)) { +#ifdef KSPROXY_TRACE WCHAR Buffer[100]; LPOLESTR lpstr; StringFromCLSID(refiid, &lpstr); swprintf(Buffer, L"CKsProxy::QueryInterface plugin %lu supports interface %s\n", Index, lpstr); OutputDebugStringW(Buffer); CoTaskMemFree(lpstr); +#endif return hr; } } } - +#ifdef KSPROXY_TRACE WCHAR Buffer[MAX_PATH]; LPOLESTR lpstr; StringFromCLSID(refiid, &lpstr); swprintf(Buffer, L"CKsProxy::QueryInterface: NoInterface for %s !!!\n", lpstr); OutputDebugStringW(Buffer); CoTaskMemFree(lpstr); - +#endif
return E_NOINTERFACE; } @@ -377,7 +379,9 @@ STDMETHODCALLTYPE CKsProxy::GetPages(CAUUID *pPages) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::GetPages NotImplemented\n"); +#endif
if (!pPages) return E_POINTER; @@ -493,7 +497,10 @@ CKsProxy::KsGetTime( LONGLONG* Time) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::KsGetTime\n"); +#endif + return PerformClockProperty(KSPROPERTY_CLOCK_TIME, KSPROPERTY_TYPE_GET, (PVOID)Time, sizeof(LONGLONG)); }
@@ -502,7 +509,10 @@ CKsProxy::KsSetTime( LONGLONG Time) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::KsSetTime\n"); +#endif + return PerformClockProperty(KSPROPERTY_CLOCK_TIME, KSPROPERTY_TYPE_SET, (PVOID)&Time, sizeof(LONGLONG)); }
@@ -511,7 +521,10 @@ CKsProxy::KsGetPhysicalTime( LONGLONG* Time) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::KsGetPhysicalTime\n"); +#endif + return PerformClockProperty(KSPROPERTY_CLOCK_PHYSICALTIME, KSPROPERTY_TYPE_GET, (PVOID)Time, sizeof(LONGLONG)); }
@@ -520,7 +533,10 @@ CKsProxy::KsSetPhysicalTime( LONGLONG Time) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::KsSetPhysicalTime\n"); +#endif + return PerformClockProperty(KSPROPERTY_CLOCK_PHYSICALTIME, KSPROPERTY_TYPE_SET, (PVOID)&Time, sizeof(LONGLONG)); }
@@ -529,7 +545,10 @@ CKsProxy::KsGetCorrelatedTime( KSCORRELATED_TIME* CorrelatedTime) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::KsGetCorrelatedTime\n"); +#endif + return PerformClockProperty(KSPROPERTY_CLOCK_CORRELATEDTIME, KSPROPERTY_TYPE_GET, (PVOID)CorrelatedTime, sizeof(KSCORRELATED_TIME)); }
@@ -538,7 +557,9 @@ CKsProxy::KsSetCorrelatedTime( KSCORRELATED_TIME* CorrelatedTime) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::KsSetCorrelatedTime\n"); +#endif return PerformClockProperty(KSPROPERTY_CLOCK_CORRELATEDTIME, KSPROPERTY_TYPE_SET, (PVOID)CorrelatedTime, sizeof(KSCORRELATED_TIME)); }
@@ -547,7 +568,9 @@ CKsProxy::KsGetCorrelatedPhysicalTime( KSCORRELATED_TIME* CorrelatedTime) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::KsGetCorrelatedPhysicalTime\n"); +#endif return PerformClockProperty(KSPROPERTY_CLOCK_CORRELATEDPHYSICALTIME, KSPROPERTY_TYPE_GET, (PVOID)CorrelatedTime, sizeof(KSCORRELATED_TIME)); }
@@ -556,7 +579,10 @@ CKsProxy::KsSetCorrelatedPhysicalTime( KSCORRELATED_TIME* CorrelatedTime) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::KsSetCorrelatedPhysicalTime\n"); +#endif + return PerformClockProperty(KSPROPERTY_CLOCK_CORRELATEDPHYSICALTIME, KSPROPERTY_TYPE_SET, (PVOID)CorrelatedTime, sizeof(KSCORRELATED_TIME)); }
@@ -565,7 +591,9 @@ CKsProxy::KsGetResolution( KSRESOLUTION* Resolution) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::KsGetResolution\n"); +#endif return PerformClockProperty(KSPROPERTY_CLOCK_RESOLUTION, KSPROPERTY_TYPE_GET, (PVOID)Resolution, sizeof(KSRESOLUTION)); }
@@ -574,7 +602,9 @@ CKsProxy::KsGetState( KSSTATE* State) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::KsGetState\n"); +#endif return PerformClockProperty(KSPROPERTY_CLOCK_STATE, KSPROPERTY_TYPE_GET, (PVOID)State, sizeof(KSSTATE)); }
@@ -590,7 +620,9 @@ KSPROPERTY Property; ULONG BytesReturned;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::GetTime\n"); +#endif
if (!pTime) return E_POINTER; @@ -635,7 +667,9 @@ ULONG BytesReturned; PKSEVENT_TIME_MARK Event;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::AdviseTime\n"); +#endif
// //FIXME locks @@ -701,7 +735,9 @@ ULONG BytesReturned; PKSEVENT_TIME_INTERVAL Event;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::AdvisePeriodic\n"); +#endif
// //FIXME locks @@ -763,7 +799,9 @@ HRESULT hr; ULONG BytesReturned;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::Unadvise\n"); +#endif
if (m_hClock) { @@ -801,7 +839,10 @@ Property.Id = KSPROPERTY_MEDIASEEKING_CAPABILITIES; Property.Flags = KSPROPERTY_TYPE_GET;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::GetCapabilities\n"); +#endif +
if (!pCapabilities) return E_POINTER; @@ -851,7 +892,9 @@ DWORD Capabilities; HRESULT hr;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::CheckCapabilities\n"); +#endif
if (!pCapabilities) return E_POINTER; @@ -929,11 +972,13 @@ ULONG Index; HRESULT hr = S_FALSE;
+#ifdef KSPROXY_TRACE WCHAR Buffer[100]; LPOLESTR pstr; StringFromCLSID(*pFormat, &pstr); swprintf(Buffer, L"CKsProxy::IsFormatSupported %s\n",pstr); OutputDebugStringW(Buffer); +#endif
if (!pFormat) return E_POINTER; @@ -942,8 +987,10 @@ hr = GetMediaSeekingFormats(&FormatList); if (SUCCEEDED(hr)) { +#ifdef KSPROXY_TRACE swprintf(Buffer, L"CKsProxy::IsFormatSupported NumFormat %lu\n",FormatList->Count); OutputDebugStringW(Buffer); +#endif
//iterate through format list pGuid = (LPGUID)(FormatList + 1); @@ -976,7 +1023,9 @@ { // plugin does not support interface hr = S_FALSE; +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::IsFormatSupported plugin does not support IMediaSeeking interface\n"); +#endif break; }
@@ -1001,7 +1050,9 @@ HRESULT hr; ULONG Index;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::QueryPreferredFormat\n"); +#endif
if (!pFormat) return E_POINTER; @@ -1061,7 +1112,9 @@ Property.Id = KSPROPERTY_MEDIASEEKING_TIMEFORMAT; Property.Flags = KSPROPERTY_TYPE_GET;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::GetTimeFormat\n"); +#endif
hr = KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSPROPERTY), (PVOID)pFormat, sizeof(GUID), &BytesReturned); if (hr == MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_FOUND) || hr == MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_SET_NOT_FOUND)) @@ -1101,7 +1154,9 @@ { GUID Format;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::IsUsingTimeFormat\n"); +#endif
if (FAILED(QueryPreferredFormat(&Format))) return S_FALSE; @@ -1125,7 +1180,9 @@ Property.Id = KSPROPERTY_MEDIASEEKING_TIMEFORMAT; Property.Flags = KSPROPERTY_TYPE_SET;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::SetTimeFormat\n"); +#endif
hr = KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSPROPERTY), (PVOID)pFormat, sizeof(GUID), &BytesReturned); if (hr == MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_FOUND) || hr == MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_SET_NOT_FOUND)) @@ -1173,7 +1230,9 @@ Property.Id = KSPROPERTY_MEDIASEEKING_DURATION; Property.Flags = KSPROPERTY_TYPE_GET;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::GetDuration\n"); +#endif
hr = KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSPROPERTY), (PVOID)pDuration, sizeof(LONGLONG), &BytesReturned); if (hr == MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_FOUND) || hr == MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_SET_NOT_FOUND)) @@ -1219,7 +1278,9 @@ Property.Id = KSPROPERTY_MEDIASEEKING_STOPPOSITION; Property.Flags = KSPROPERTY_TYPE_GET;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::GetStopPosition\n"); +#endif
hr = KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSPROPERTY), (PVOID)pStop, sizeof(LONGLONG), &BytesReturned); if (hr == MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_FOUND) || hr == MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_SET_NOT_FOUND)) @@ -1265,7 +1326,9 @@ Property.Id = KSPROPERTY_MEDIASEEKING_POSITION; Property.Flags = KSPROPERTY_TYPE_GET;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::GetCurrentPosition\n"); +#endif
hr = KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSPROPERTY), (PVOID)pCurrent, sizeof(LONGLONG), &BytesReturned); if (hr == MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_FOUND) || hr == MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_SET_NOT_FOUND)) @@ -1315,7 +1378,9 @@ Property.Property.Id = KSPROPERTY_MEDIASEEKING_CONVERTTIMEFORMAT; Property.Property.Flags = KSPROPERTY_TYPE_GET;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::ConvertTimeFormat\n"); +#endif
if (!pTargetFormat) { @@ -1398,7 +1463,9 @@ Positions.Stop = *pStop; Positions.StopFlags = (KS_SEEKING_FLAGS)dwStopFlags;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::SetPositions\n"); +#endif
hr = KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSPROPERTY), (PVOID)&Positions, sizeof(KSPROPERTY_POSITIONS), &BytesReturned); if (SUCCEEDED(hr)) @@ -1459,7 +1526,9 @@ { HRESULT hr;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::GetPositions\n"); +#endif
hr = GetCurrentPosition(pCurrent); if (SUCCEEDED(hr)) @@ -1483,7 +1552,9 @@ Property.Id = KSPROPERTY_MEDIASEEKING_AVAILABLE; Property.Flags = KSPROPERTY_TYPE_GET;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::GetAvailable\n"); +#endif
hr = KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSPROPERTY), (PVOID)&Media, sizeof(KSPROPERTY_MEDIAAVAILABLE), &BytesReturned); if (hr == MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_FOUND) || hr == MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_SET_NOT_FOUND)) @@ -1527,7 +1598,9 @@ CKsProxy::SetRate( double dRate) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::SetRate\n"); +#endif return E_NOTIMPL; }
@@ -1536,7 +1609,9 @@ CKsProxy::GetRate( double *pdRate) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::GetRate\n"); +#endif return E_NOTIMPL; }
@@ -1553,7 +1628,9 @@ Property.Id = KSPROPERTY_MEDIASEEKING_PREROLL; Property.Flags = KSPROPERTY_TYPE_GET;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::GetPreroll\n"); +#endif
hr = KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSPROPERTY), (PVOID)pllPreroll, sizeof(LONGLONG), &BytesReturned); if (hr == MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_FOUND) || hr == MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_SET_NOT_FOUND)) @@ -1599,7 +1676,7 @@ HRESULT hr; PIN_DIRECTION PinDirection; KSPIN_COMMUNICATION Communication; - WCHAR Buffer[100]; +
for(Index = 0; Index < m_Pins.size(); Index++) { @@ -1623,8 +1700,12 @@ } }
+#ifdef KSPROXY_TRACE + WCHAR Buffer[100]; swprintf(Buffer, L"CKsProxy::GetMiscFlags stub Flags %x\n", Flags); OutputDebugStringW(Buffer); +#endif + return Flags; }
@@ -1640,8 +1721,11 @@ ULONG DataLength, ULONG* BytesReturned) { +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"CKsProxy::KsProperty\n"); +#endif + assert(m_hDevice != 0); - OutputDebugStringW(L"CKsProxy::KsProperty\n"); return KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_PROPERTY, (PVOID)Property, PropertyLength, (PVOID)PropertyData, DataLength, BytesReturned); }
@@ -1654,8 +1738,11 @@ ULONG DataLength, ULONG* BytesReturned) { +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"CKsProxy::KsMethod\n"); +#endif + assert(m_hDevice != 0); - OutputDebugStringW(L"CKsProxy::KsMethod\n"); return KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_METHOD, (PVOID)Method, MethodLength, (PVOID)MethodData, DataLength, BytesReturned); }
@@ -1668,8 +1755,11 @@ ULONG DataLength, ULONG* BytesReturned) { +#ifdef KSPROXY_TRACE + OutputDebugStringW(L"CKsProxy::KsEvent\n"); +#endif + assert(m_hDevice != 0); - OutputDebugStringW(L"CKsProxy::KsEvent\n"); if (EventLength) return KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_ENABLE_EVENT, (PVOID)Event, EventLength, (PVOID)EventData, DataLength, BytesReturned); else @@ -1692,7 +1782,9 @@ { ULONG BytesReturned;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::Set\n"); +#endif
if (cbInstanceData) { @@ -1736,7 +1828,9 @@ { ULONG BytesReturned;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::Get\n"); +#endif
if (cbInstanceData) { @@ -1777,7 +1871,9 @@ KSPROPERTY Property; ULONG BytesReturned;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::QuerySupported\n"); +#endif
Property.Set = guidPropSet; Property.Id = dwPropID; @@ -1802,7 +1898,9 @@ { HRESULT hr;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::CreateNodeInstance\n"); +#endif
*Interface = NULL;
@@ -1827,7 +1925,9 @@ CKsProxy::KsAddAggregate( IN REFGUID AggregateClass) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::KsAddAggregate NotImplemented\n"); +#endif return E_NOTIMPL; }
@@ -1836,7 +1936,10 @@ CKsProxy::KsRemoveAggregate( REFGUID AggregateClass) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::KsRemoveAggregate NotImplemented\n"); +#endif + return E_NOTIMPL; }
@@ -1849,8 +1952,10 @@ STDMETHODCALLTYPE CKsProxy::IsDirty() { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::IsDirty Notimplemented\n"); DebugBreak(); +#endif return E_NOTIMPL; }
@@ -1868,7 +1973,9 @@ ULONG PinId; LPOLESTR pMajor, pSub, pFormat;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::Load\n"); +#endif
#if 0 ULONG Version = ReadInt(pStm, hr); @@ -1938,7 +2045,10 @@ IStream *pStm, BOOL fClearDirty) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::Save Notimplemented\n"); +#endif + return E_NOTIMPL; }
@@ -1947,8 +2057,11 @@ CKsProxy::GetSizeMax( ULARGE_INTEGER *pcbSize) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::GetSizeMax Notimplemented\n"); DebugBreak(); +#endif + return E_NOTIMPL; }
@@ -1960,8 +2073,9 @@ STDMETHODCALLTYPE CKsProxy::DeviceInfo(CLSID *pclsidInterfaceClass, LPWSTR *pwszSymbolicLink) { - +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::DeviceInfo\n"); +#endif
if (!m_DevicePath) { @@ -1986,7 +2100,9 @@ STDMETHODCALLTYPE CKsProxy::Reassociate(void) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::Reassociate\n"); +#endif
if (!m_DevicePath || m_hDevice) { @@ -2009,7 +2125,9 @@ STDMETHODCALLTYPE CKsProxy::Disassociate(void) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::Disassociate\n"); +#endif
if (!m_hDevice) return E_HANDLE; @@ -2027,7 +2145,10 @@ STDMETHODCALLTYPE CKsProxy::KsGetClockHandle() { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::KsGetClockHandle\n"); +#endif + return m_hClock; }
@@ -2040,7 +2161,10 @@ STDMETHODCALLTYPE CKsProxy::KsGetObjectHandle() { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::KsGetObjectHandle\n"); +#endif + return m_hDevice; }
@@ -2051,7 +2175,10 @@ STDMETHODCALLTYPE CKsProxy::InitNew( void) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::InitNew\n"); +#endif + return S_OK; }
@@ -2338,7 +2465,6 @@ KSPIN_DATAFLOW DataFlow; KSPIN_COMMUNICATION Communication; HRESULT hr; - WCHAR Buffer[100]; LPWSTR PinName; IPin * pPin; ULONG InputPin = 0; @@ -2405,8 +2531,12 @@ // store pins m_Pins.push_back(pPin);
+#ifdef KSPROXY_TRACE + WCHAR Buffer[100]; swprintf(Buffer, L"Index %lu DataFlow %lu Name %s\n", Index, DataFlow, PinName); OutputDebugStringW(Buffer); +#endif + }
return S_OK; @@ -2417,14 +2547,16 @@ CKsProxy::Load(IPropertyBag *pPropBag, IErrorLog *pErrorLog) { HRESULT hr; - WCHAR Buffer[100]; VARIANT varName; LPGUID pGuid; ULONG NumGuids = 0; HDEVINFO hList; SP_DEVICE_INTERFACE_DATA DeviceInterfaceData;
+#ifdef KSPROXY_TRACE + WCHAR Buffer[100]; OutputDebugStringW(L"CKsProxy::Load\n"); +#endif
// read device path varName.vt = VT_BSTR; @@ -2432,14 +2564,18 @@
if (FAILED(hr)) { +#ifdef KSPROXY_TRACE swprintf(Buffer, L"CKsProxy::Load Read %lx\n", hr); OutputDebugStringW(Buffer); +#endif return MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, GetLastError()); }
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"DevicePath: "); OutputDebugStringW(varName.bstrVal); OutputDebugStringW(L"\n"); +#endif
// create device list hList = SetupDiCreateDeviceInfoListExW(NULL, NULL, NULL, NULL); @@ -2468,9 +2604,10 @@ if (m_hDevice == INVALID_HANDLE_VALUE) { // failed to open device +#ifdef KSPROXY_TRACE swprintf(Buffer, L"CKsProxy:: failed to open device with %lx\n", GetLastError()); OutputDebugStringW(Buffer); - +#endif return MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, GetLastError()); }
@@ -2508,7 +2645,9 @@ STDMETHODCALLTYPE CKsProxy::Save(IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::Save\n"); +#endif return E_NOTIMPL; }
@@ -2521,7 +2660,9 @@ CKsProxy::GetClassID( CLSID *pClassID) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::GetClassID\n"); +#endif CopyMemory(pClassID, &CLSID_Proxy, sizeof(GUID));
return S_OK; @@ -2533,7 +2674,9 @@ { HRESULT hr;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::Stop\n"); +#endif
EnterCriticalSection(&m_Lock);
@@ -2552,7 +2695,9 @@ { HRESULT hr = S_OK;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::Pause\n"); +#endif
EnterCriticalSection(&m_Lock);
@@ -2583,7 +2728,9 @@ { HRESULT hr;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::Run\n"); +#endif
EnterCriticalSection(&m_Lock);
@@ -2673,9 +2820,11 @@ // now set state hr = KsSynchronousDeviceControl(hPin, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSPROPERTY), (PVOID)&State, sizeof(KSSTATE), &BytesReturned);
+#ifdef KSPROXY_TRACE WCHAR Buffer[100]; swprintf(Buffer, L"CKsProxy::SetPinState Index %u State %u hr %lx\n", Index, State, hr); OutputDebugStringW(Buffer); +#endif
if (FAILED(hr)) return hr; @@ -2711,8 +2860,9 @@ ULONG BytesReturned; PIN_DIRECTION PinDir;
-// Plug In Distributor: IKsClock +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::SetSyncSource\n"); +#endif
// FIXME // need locks @@ -2806,7 +2956,9 @@ }
m_ReferenceClock = pClock; +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::SetSyncSource done\n"); +#endif return S_OK; }
@@ -2815,7 +2967,9 @@ CKsProxy::GetSyncSource( IReferenceClock **pClock) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::GetSyncSource\n"); +#endif
if (!pClock) return E_POINTER; @@ -2832,7 +2986,10 @@ CKsProxy::EnumPins( IEnumPins **ppEnum) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::EnumPins\n"); +#endif + return CEnumPins_fnConstructor(m_Pins, IID_IEnumPins, (void**)ppEnum); }
@@ -2843,7 +3000,9 @@ { ULONG PinId;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::FindPin\n"); +#endif
if (!ppPin) return E_POINTER; @@ -2879,7 +3038,9 @@ if (!pInfo) return E_POINTER;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::QueryFilterInfo\n"); +#endif
pInfo->achName[0] = L'\0'; pInfo->pGraph = m_pGraph; @@ -2922,7 +3083,9 @@ CKsProxy::QueryVendorInfo( LPWSTR *pVendorInfo) { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::QueryVendorInfo\n"); +#endif return StringFromCLSID(CLSID_Proxy, pVendorInfo); }
@@ -2934,7 +3097,10 @@ STDMETHODCALLTYPE CKsProxy::Register() { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::Register : NotImplemented\n"); +#endif + return E_NOTIMPL; }
@@ -2942,7 +3108,9 @@ STDMETHODCALLTYPE CKsProxy::Unregister() { +#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::Unregister : NotImplemented\n"); +#endif return E_NOTIMPL; }
@@ -2953,11 +3121,13 @@ REFIID riid, LPVOID * ppv) { +#ifdef KSPROXY_TRACE WCHAR Buffer[100]; LPOLESTR pstr; StringFromCLSID(riid, &pstr); swprintf(Buffer, L"CKsProxy_Constructor pUnkOuter %p riid %s\n", pUnkOuter, pstr); OutputDebugStringW(Buffer); +#endif
CKsProxy * handler = new CKsProxy();
Modified: trunk/reactos/dll/directx/ksproxy/qualityforward.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/quality... ============================================================================== --- trunk/reactos/dll/directx/ksproxy/qualityforward.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/qualityforward.cpp [iso-8859-1] Wed Mar 24 18:30:43 2010 @@ -88,7 +88,9 @@ CKsQualityForwarder::KsFlushClient( IN IKsPin *Pin) { +#ifdef KSPROXY_TRACE OutputDebugString("UNIMPLEMENTED\n"); +#endif }
HRESULT @@ -101,14 +103,18 @@ HRESULT hr; HANDLE handle;
+#ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsQualityForwarder_Constructor\n"); +#endif
// open default clock hr = KsOpenDefaultDevice(KSCATEGORY_QUALITY, GENERIC_READ | GENERIC_WRITE, &handle);
if (hr != NOERROR) { +#ifdef KSPROXY_TRACE OutputDebugString("CKsClockForwarder_Constructor failed to open device\n"); +#endif return hr; }