Author: janderwald Date: Fri Apr 2 18:25:18 2010 New Revision: 46684
URL: http://svn.reactos.org/svn/reactos?rev=46684&view=rev Log: [KSPROXY, MSDVBNP] - Remove remaining DebugBreak - Add debug traces
Modified: trunk/reactos/dll/directx/ksproxy/enumpins.cpp trunk/reactos/dll/directx/ksproxy/input_pin.cpp trunk/reactos/dll/directx/ksproxy/mediasample.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/msdvbnp/enumpins.cpp
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] Fri Apr 2 18:25:18 2010 @@ -71,7 +71,6 @@ OutputDebugStringW(Buffer); CoTaskMemFree(lpstr);
-DebugBreak(); return E_NOINTERFACE; }
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] Fri Apr 2 18:25:18 2010 @@ -700,7 +700,6 @@ { #ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::Receive NotImplemented\n"); - DebugBreak(); #endif
return E_NOTIMPL; @@ -712,7 +711,6 @@ { #ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::ReceiveMultiple NotImplemented\n"); - DebugBreak(); #endif
return E_NOTIMPL; @@ -724,7 +722,6 @@ { #ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::ReceiveCanBlock NotImplemented\n"); - DebugBreak(); #endif
return S_FALSE; @@ -923,7 +920,6 @@ OutputDebugStringW(L"CInputPin::KsQualityNotify NotImplemented\n"); #endif
- DebugBreak(); return E_NOTIMPL; }
@@ -1114,7 +1110,6 @@ { #ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::Connect NotImplemented\n"); - DebugBreak(); #endif return NOERROR; } @@ -1199,7 +1194,6 @@
#ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::ConnectionMediaType NotImplemented\n"); - DebugBreak(); #endif
return E_NOTIMPL; @@ -1496,7 +1490,6 @@ WCHAR Buffer[100]; swprintf(Buffer, L"CInputPin::CreatePin unexpected communication %u %s\n", m_Communication, m_PinName); OutputDebugStringW(Buffer); - DebugBreak(); #endif hr = E_FAIL; } @@ -1629,7 +1622,6 @@ { #ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::CreatePinHandle GetSupportedSets failed\n"); - DebugBreak(); #endif return hr; } @@ -1640,7 +1632,6 @@ { #ifdef KSPROXY_TRACE OutputDebugStringW(L"CInputPin::CreatePinHandle LoadProxyPlugins failed\n"); - DebugBreak(); #endif return hr; } @@ -1783,7 +1774,6 @@ { // store plugin m_Plugins.push_back(pUnknown); -DebugBreak(); } // close key RegCloseKey(hSubKey);
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] Fri Apr 2 18:25:18 2010 @@ -21,7 +21,6 @@ STDMETHODIMP_(ULONG) Release() { InterlockedDecrement(&m_Ref); - DebugBreak(); if (!m_Ref) { if (m_Allocator) @@ -280,7 +279,6 @@ CMediaSample::SetMediaType(AM_MEDIA_TYPE *pMediaType) { OutputDebugStringW(L"CMediaSample::SetMediaType NotImplemented\n"); - DebugBreak(); return E_NOTIMPL; }
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] Fri Apr 2 18:25:18 2010 @@ -1548,7 +1548,6 @@ OutputDebugStringW(L"COutputPin::Connect no IMemInputPin interface\n"); #endif
- DebugBreak(); return hr; }
@@ -1946,13 +1945,26 @@ // query for pin medium hr = KsQueryMediums(&MediumList); if (FAILED(hr)) - return hr; + { +#ifdef KSPROXY_TRACE + WCHAR Buffer[100]; + swprintf(Buffer, L"COutputPin::CreatePin KsQueryMediums failed %lx\n", hr); + OutputDebugStringW(Buffer); +#endif + return hr; + }
// query for pin interface hr = KsQueryInterfaces(&InterfaceList); if (FAILED(hr)) { // failed +#ifdef KSPROXY_TRACE + WCHAR Buffer[100]; + swprintf(Buffer, L"COutputPin::CreatePin KsQueryInterfaces failed %lx\n", hr); + OutputDebugStringW(Buffer); +#endif + CoTaskMemFree(MediumList); return hr; } @@ -2003,6 +2015,12 @@ CoTaskMemFree(MediumList); CoTaskMemFree(InterfaceList);
+#ifdef KSPROXY_TRACE + WCHAR Buffer[100]; + swprintf(Buffer, L"COutputPin::CreatePin failed to create interface handler %lx\n", hr); + OutputDebugStringW(Buffer); +#endif + return hr; }
@@ -2010,7 +2028,12 @@ hr = InterfaceHandler->KsSetPin((IKsPin*)this); if (FAILED(hr)) { - // failed to load interface handler plugin + // failed to initialize interface handler plugin +#ifdef KSPROXY_TRACE + WCHAR Buffer[100]; + swprintf(Buffer, L"COutputPin::CreatePin failed to initialize interface handler %lx\n", hr); + OutputDebugStringW(Buffer); +#endif InterfaceHandler->Release(); CoTaskMemFree(MediumList); CoTaskMemFree(InterfaceList); @@ -2027,7 +2050,6 @@ WCHAR Buffer[100]; swprintf(Buffer, L"COutputPin::CreatePin unexpected communication %u %s\n", m_Communication, m_PinName); OutputDebugStringW(Buffer); - DebugBreak(); #endif
hr = E_FAIL; @@ -2036,6 +2058,12 @@ // free medium / interface / dataformat CoTaskMemFree(MediumList); CoTaskMemFree(InterfaceList); + +#ifdef KSPROXY_TRACE + WCHAR Buffer[100]; + swprintf(Buffer, L"COutputPin::CreatePin Result %lx\n", hr); + OutputDebugStringW(Buffer); +#endif
return hr; } @@ -2057,6 +2085,8 @@ //KSALLOCATOR_FRAMING Framing; //KSPROPERTY Property; //ULONG BytesReturned; + + OutputDebugStringW(L"COutputPin::CreatePinHandle\n");
if (m_hPin != INVALID_HANDLE_VALUE) { @@ -2173,7 +2203,6 @@ if (FAILED(InitializeIOThread())) { OutputDebugStringW(L"COutputPin::CreatePinHandle failed to initialize i/o thread\n"); - DebugBreak(); }
LPGUID pGuid; @@ -2184,8 +2213,7 @@ if (FAILED(hr)) { #ifdef KSPROXY_TRACE - OutputDebugStringW(L"CInputPin::CreatePinHandle GetSupportedSets failed\n"); - DebugBreak(); + OutputDebugStringW(L"COutputPin::CreatePinHandle GetSupportedSets failed\n"); #endif return hr; } @@ -2195,8 +2223,7 @@ if (FAILED(hr)) { #ifdef KSPROXY_TRACE - OutputDebugStringW(L"CInputPin::CreatePinHandle LoadProxyPlugins failed\n"); - DebugBreak(); + OutputDebugStringW(L"COutputPin::CreatePinHandle LoadProxyPlugins failed\n"); #endif return hr; } @@ -2338,7 +2365,6 @@ { // store plugin m_Plugins.push_back(pUnknown); -DebugBreak(); } // close key RegCloseKey(hSubKey);
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] Fri Apr 2 18:25:18 2010 @@ -3,7 +3,7 @@ #define _FORCENAMELESSUNION #define BUILDING_KS #define _KSDDK_ -//#define KSPROXY_TRACE +#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] Fri Apr 2 18:25:18 2010 @@ -1954,7 +1954,6 @@ { #ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::IsDirty Notimplemented\n"); - DebugBreak(); #endif return E_NOTIMPL; } @@ -2035,7 +2034,6 @@
}while(Length > 0);
- DebugBreak(); return S_OK; }
@@ -2059,7 +2057,6 @@ { #ifdef KSPROXY_TRACE OutputDebugStringW(L"CKsProxy::GetSizeMax Notimplemented\n"); - DebugBreak(); #endif
return E_NOTIMPL; @@ -2480,23 +2477,50 @@ // query current instance count hr = GetPinInstanceCount(Index, &Instances); if (FAILED(hr)) + { +#ifdef KSPROXY_TRACE + WCHAR Buffer[100]; + swprintf(Buffer, L"CKsProxy::CreatePins GetPinInstanceCount failed with %lx\n", hr); + OutputDebugStringW(Buffer); +#endif continue; + } +
// query pin communication; hr = GetPinCommunication(Index, &Communication); if (FAILED(hr)) + { +#ifdef KSPROXY_TRACE + WCHAR Buffer[100]; + swprintf(Buffer, L"CKsProxy::CreatePins GetPinCommunication failed with %lx\n", hr); + OutputDebugStringW(Buffer); +#endif continue; + }
if (Instances.CurrentCount == Instances.PossibleCount) { // already maximum reached for this pin +#ifdef KSPROXY_TRACE + WCHAR Buffer[100]; + swprintf(Buffer, L"CKsProxy::CreatePins Instances.CurrentCount == Instances.PossibleCount\n"); + OutputDebugStringW(Buffer); +#endif continue; }
// get direction of pin hr = GetPinDataflow(Index, &DataFlow); if (FAILED(hr)) + { +#ifdef KSPROXY_TRACE + WCHAR Buffer[100]; + swprintf(Buffer, L"CKsProxy::CreatePins GetPinDataflow failed with %lx\n", hr); + OutputDebugStringW(Buffer); +#endif continue; + }
if (DataFlow == KSPIN_DATAFLOW_IN) hr = GetPinName(Index, DataFlow, InputPin, &PinName); @@ -2504,7 +2528,14 @@ hr = GetPinName(Index, DataFlow, OutputPin, &PinName);
if (FAILED(hr)) + { +#ifdef KSPROXY_TRACE + WCHAR Buffer[100]; + swprintf(Buffer, L"CKsProxy::CreatePins GetPinName failed with %lx\n", hr); + OutputDebugStringW(Buffer); +#endif continue; + }
// construct the pins if (DataFlow == KSPIN_DATAFLOW_IN) @@ -2512,6 +2543,11 @@ hr = CInputPin_Constructor((IBaseFilter*)this, PinName, m_hDevice, Index, Communication, IID_IPin, (void**)&pPin); if (FAILED(hr)) { +#ifdef KSPROXY_TRACE + WCHAR Buffer[100]; + swprintf(Buffer, L"CKsProxy::CreatePins CInputPin_Constructor failed with %lx\n", hr); + OutputDebugStringW(Buffer); +#endif CoTaskMemFree(PinName); continue; } @@ -2522,6 +2558,11 @@ hr = COutputPin_Constructor((IBaseFilter*)this, PinName, Index, Communication, IID_IPin, (void**)&pPin); if (FAILED(hr)) { +#ifdef KSPROXY_TRACE + WCHAR Buffer[100]; + swprintf(Buffer, L"CKsProxy::CreatePins COutputPin_Constructor failed with %lx\n", hr); + OutputDebugStringW(Buffer); +#endif CoTaskMemFree(PinName); continue; } @@ -2627,9 +2668,12 @@ hr = LoadProxyPlugins(pGuid, NumGuids); if (FAILED(hr)) { +#if 0 //HACK CloseHandle(m_hDevice); m_hDevice = NULL; return hr; +#endif + OutputDebugStringW(L"CKsProxy::LoadProxyPlugins failed!\n"); }
// free sets @@ -2637,6 +2681,14 @@
// now create the input / output pins hr = CreatePins(); + +#ifdef KSPROXY_TRACE + swprintf(Buffer, L"CKsProxy::Load CreatePins %lx\n", hr); + OutputDebugStringW(Buffer); +#endif + + //HACK + hr = S_OK;
return hr; } @@ -2986,10 +3038,6 @@ CKsProxy::EnumPins( IEnumPins **ppEnum) { -#ifdef KSPROXY_TRACE - OutputDebugStringW(L"CKsProxy::EnumPins\n"); -#endif - return CEnumPins_fnConstructor(m_Pins, IID_IEnumPins, (void**)ppEnum); }
Modified: trunk/reactos/dll/directx/msdvbnp/enumpins.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/msdvbnp/enumpin... ============================================================================== --- trunk/reactos/dll/directx/msdvbnp/enumpins.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/msdvbnp/enumpins.cpp [iso-8859-1] Fri Apr 2 18:25:18 2010 @@ -155,14 +155,6 @@ { CEnumPins * handler = new CEnumPins(NumPins, pins);
-#ifdef MSDVBNP_TRACE - WCHAR Buffer[MAX_PATH]; - LPOLESTR lpstr; - StringFromCLSID(riid, &lpstr); - swprintf(Buffer, L"CEnumPins_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown); - OutputDebugStringW(Buffer); -#endif - if (!handler) return E_OUTOFMEMORY;