mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[KSPROXY]
- Silent traces svn path=/trunk/; revision=46399
This commit is contained in:
parent
4dffda6162
commit
015687d53a
16 changed files with 607 additions and 72 deletions
|
@ -140,7 +140,10 @@ CKsAllocator::SetProperties(
|
|||
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 @@ CKsAllocator::Commit()
|
|||
//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 @@ CKsAllocator::Decommit()
|
|||
{
|
||||
EnterCriticalSection(&m_CriticalSection);
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsAllocator::Decommit\n");
|
||||
#endif
|
||||
|
||||
if (m_Mode == KsAllocatorMode_Kernel)
|
||||
{
|
||||
|
@ -392,7 +399,9 @@ CKsAllocator::ReleaseBuffer(
|
|||
{
|
||||
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 @@ CKsAllocator::SetNotify(
|
|||
IMemAllocatorNotifyCallbackTemp *pNotify)
|
||||
{
|
||||
EnterCriticalSection(&m_CriticalSection);
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsAllocator::SetNotify\n");
|
||||
#endif
|
||||
|
||||
if (pNotify)
|
||||
pNotify->AddRef();
|
||||
|
@ -521,7 +533,9 @@ CKsAllocator::KsCreateAllocatorAndGetHandle(
|
|||
KSALLOCATOR_FRAMING AllocatorFraming;
|
||||
HANDLE hPin;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsAllocator::KsCreateAllocatorAndGetHandle\n");
|
||||
#endif
|
||||
|
||||
if (m_hAllocator)
|
||||
{
|
||||
|
@ -590,7 +604,9 @@ CKsAllocator_Constructor(
|
|||
REFIID riid,
|
||||
LPVOID * ppv)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsAllocator_Constructor\n");
|
||||
#endif
|
||||
|
||||
CKsAllocator * handler = new CKsAllocator();
|
||||
|
||||
|
|
|
@ -97,7 +97,9 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CKsBasicAudio::Stop()
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -105,7 +107,10 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CKsBasicAudio::Pause()
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -114,7 +119,10 @@ STDMETHODCALLTYPE
|
|||
CKsBasicAudio::Run(
|
||||
REFERENCE_TIME tStart)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -123,7 +131,9 @@ STDMETHODCALLTYPE
|
|||
CKsBasicAudio::SetSyncSource(
|
||||
IReferenceClock *pClock)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -131,7 +141,10 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CKsBasicAudio::NotifyGraphChange()
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -144,7 +157,10 @@ STDMETHODCALLTYPE
|
|||
CKsBasicAudio::GetTypeInfoCount(
|
||||
UINT *pctinfo)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -155,7 +171,9 @@ CKsBasicAudio::GetTypeInfo(
|
|||
LCID lcid,
|
||||
ITypeInfo **ppTInfo)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -168,7 +186,10 @@ CKsBasicAudio::GetIDsOfNames(
|
|||
LCID lcid,
|
||||
DISPID *rgDispId)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -184,7 +205,10 @@ CKsBasicAudio::Invoke(
|
|||
EXCEPINFO *pExcepInfo,
|
||||
UINT *puArgErr)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -197,7 +221,10 @@ STDMETHODCALLTYPE
|
|||
CKsBasicAudio::put_Volume(
|
||||
long lVolume)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -207,7 +234,10 @@ STDMETHODCALLTYPE
|
|||
CKsBasicAudio::get_Volume(
|
||||
long *plVolume)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -217,7 +247,10 @@ STDMETHODCALLTYPE
|
|||
CKsBasicAudio::put_Balance(
|
||||
long lBalance)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -227,7 +260,10 @@ STDMETHODCALLTYPE
|
|||
CKsBasicAudio::get_Balance(
|
||||
long *plBalance)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -238,7 +274,9 @@ CKsBasicAudio_Constructor(
|
|||
REFIID riid,
|
||||
LPVOID * ppv)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsBasicAudio_Constructor\n");
|
||||
#endif
|
||||
|
||||
CKsBasicAudio * handler = new CKsBasicAudio();
|
||||
|
||||
|
|
|
@ -120,10 +120,11 @@ HRESULT
|
|||
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 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CKsClockForwarder::Pause()
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugString("CKsClockForwarder::Pause\n");
|
||||
#endif
|
||||
|
||||
if (!m_hEvent)
|
||||
{
|
||||
|
@ -204,7 +207,9 @@ STDMETHODCALLTYPE
|
|||
CKsClockForwarder::Run(
|
||||
REFERENCE_TIME tStart)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugString("CKsClockForwarder::Run\n");
|
||||
#endif
|
||||
|
||||
m_Time = tStart;
|
||||
|
||||
|
@ -231,7 +236,9 @@ STDMETHODCALLTYPE
|
|||
CKsClockForwarder::SetSyncSource(
|
||||
IReferenceClock *pClock)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugString("CKsClockForwarder::SetSyncSource\n");
|
||||
#endif
|
||||
|
||||
if (pClock)
|
||||
pClock->AddRef();
|
||||
|
@ -248,7 +255,10 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CKsClockForwarder::NotifyGraphChange()
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugString("CKsClockForwarder::NotifyGraphChange\n");
|
||||
#endif
|
||||
|
||||
return NOERROR;
|
||||
}
|
||||
|
||||
|
@ -279,9 +289,11 @@ CKsClockForwarder::SetClockState(KSSTATE State)
|
|||
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 @@ CKsClockForwarder_Constructor(
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,9 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CVPConfig::Stop()
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -110,7 +112,9 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CVPConfig::Pause()
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -119,7 +123,9 @@ STDMETHODCALLTYPE
|
|||
CVPConfig::Run(
|
||||
REFERENCE_TIME tStart)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -128,7 +134,9 @@ STDMETHODCALLTYPE
|
|||
CVPConfig::SetSyncSource(
|
||||
IReferenceClock *pClock)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -136,7 +144,9 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CVPConfig::NotifyGraphChange()
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -149,7 +159,9 @@ CVPConfig::GetConnectInfo(
|
|||
LPDWORD pdwNumConnectInfo,
|
||||
IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -158,7 +170,9 @@ STDMETHODCALLTYPE
|
|||
CVPConfig::SetConnectInfo(
|
||||
DWORD dwChosenEntry)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -167,7 +181,9 @@ STDMETHODCALLTYPE
|
|||
CVPConfig::GetVPDataInfo(
|
||||
LPAMVPDATAINFO pamvpDataInfo)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -177,7 +193,9 @@ CVPConfig::GetMaxPixelRate(
|
|||
LPAMVPSIZE pamvpSize,
|
||||
OUT LPDWORD pdwMaxPixelsPerSecond)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -187,7 +205,9 @@ CVPConfig::InformVPInputFormats(
|
|||
DWORD dwNumFormats,
|
||||
IN LPDDPIXELFORMAT pDDPixelFormats)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -197,7 +217,9 @@ CVPConfig::GetVideoFormats(
|
|||
LPDWORD pdwNumFormats,
|
||||
IN OUT LPDDPIXELFORMAT pddPixelFormats)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -206,7 +228,9 @@ STDMETHODCALLTYPE
|
|||
CVPConfig::SetVideoFormat(
|
||||
DWORD dwChosenEntry)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -214,7 +238,9 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CVPConfig::SetInvertPolarity()
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -223,7 +249,9 @@ STDMETHODCALLTYPE
|
|||
CVPConfig::GetOverlaySurface(
|
||||
LPDIRECTDRAWSURFACE* ppddOverlaySurface)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -232,7 +260,9 @@ STDMETHODCALLTYPE
|
|||
CVPConfig::SetDirectDrawKernelHandle(
|
||||
ULONG_PTR dwDDKernelHandle)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -241,7 +271,9 @@ STDMETHODCALLTYPE
|
|||
CVPConfig::SetVideoPortID(
|
||||
IN DWORD dwVideoPortID)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -252,7 +284,9 @@ CVPConfig::SetDDSurfaceKernelHandles(
|
|||
DWORD cHandles,
|
||||
IN ULONG_PTR *rgDDKernelHandles)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -264,7 +298,9 @@ CVPConfig::SetSurfaceParameters(
|
|||
IN DWORD dwXOrigin,
|
||||
IN DWORD dwYOrigin)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -277,7 +313,9 @@ STDMETHODCALLTYPE
|
|||
CVPConfig::IsVPDecimationAllowed(
|
||||
LPBOOL pbIsDecimationAllowed)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -286,13 +324,13 @@ STDMETHODCALLTYPE
|
|||
CVPConfig::SetScalingFactors(
|
||||
LPAMVPSIZE pamvpSize)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
HRESULT
|
||||
WINAPI
|
||||
CVPConfig_Constructor(
|
||||
|
@ -300,7 +338,9 @@ CVPConfig_Constructor(
|
|||
REFIID riid,
|
||||
LPVOID * ppv)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CVPConfig_Constructor\n");
|
||||
#endif
|
||||
|
||||
CVPConfig * handler = new CVPConfig();
|
||||
|
||||
|
|
|
@ -98,7 +98,9 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CVPVBIConfig::Stop()
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -106,7 +108,9 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CVPVBIConfig::Pause()
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -115,7 +119,9 @@ STDMETHODCALLTYPE
|
|||
CVPVBIConfig::Run(
|
||||
REFERENCE_TIME tStart)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -124,7 +130,9 @@ STDMETHODCALLTYPE
|
|||
CVPVBIConfig::SetSyncSource(
|
||||
IReferenceClock *pClock)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -132,7 +140,9 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CVPVBIConfig::NotifyGraphChange()
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -145,7 +155,9 @@ CVPVBIConfig::GetConnectInfo(
|
|||
LPDWORD pdwNumConnectInfo,
|
||||
IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -154,7 +166,9 @@ STDMETHODCALLTYPE
|
|||
CVPVBIConfig::SetConnectInfo(
|
||||
DWORD dwChosenEntry)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -163,7 +177,9 @@ STDMETHODCALLTYPE
|
|||
CVPVBIConfig::GetVPDataInfo(
|
||||
LPAMVPDATAINFO pamvpDataInfo)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -173,7 +189,9 @@ CVPVBIConfig::GetMaxPixelRate(
|
|||
LPAMVPSIZE pamvpSize,
|
||||
OUT LPDWORD pdwMaxPixelsPerSecond)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -183,7 +201,9 @@ CVPVBIConfig::InformVPInputFormats(
|
|||
DWORD dwNumFormats,
|
||||
IN LPDDPIXELFORMAT pDDPixelFormats)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -193,7 +213,9 @@ CVPVBIConfig::GetVideoFormats(
|
|||
LPDWORD pdwNumFormats,
|
||||
IN OUT LPDDPIXELFORMAT pddPixelFormats)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -202,7 +224,9 @@ STDMETHODCALLTYPE
|
|||
CVPVBIConfig::SetVideoFormat(
|
||||
DWORD dwChosenEntry)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -210,7 +234,9 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CVPVBIConfig::SetInvertPolarity()
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -219,7 +245,9 @@ STDMETHODCALLTYPE
|
|||
CVPVBIConfig::GetOverlaySurface(
|
||||
LPDIRECTDRAWSURFACE* ppddOverlaySurface)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -228,7 +256,9 @@ STDMETHODCALLTYPE
|
|||
CVPVBIConfig::SetDirectDrawKernelHandle(
|
||||
ULONG_PTR dwDDKernelHandle)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -237,7 +267,9 @@ STDMETHODCALLTYPE
|
|||
CVPVBIConfig::SetVideoPortID(
|
||||
IN DWORD dwVideoPortID)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -248,7 +280,9 @@ CVPVBIConfig::SetDDSurfaceKernelHandles(
|
|||
DWORD cHandles,
|
||||
IN ULONG_PTR *rgDDKernelHandles)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -260,7 +294,9 @@ CVPVBIConfig::SetSurfaceParameters(
|
|||
IN DWORD dwXOrigin,
|
||||
IN DWORD dwYOrigin)
|
||||
{
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"UNIMPLEMENTED\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -272,7 +308,9 @@ CVPVBIConfig_Constructor(
|
|||
REFIID riid,
|
||||
LPVOID * ppv)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CVPVBIConfig_Constructor\n");
|
||||
#endif
|
||||
|
||||
CVPVBIConfig * handler = new CVPVBIConfig();
|
||||
|
||||
|
|
|
@ -103,7 +103,9 @@ CKsDataTypeHandler::KsIsMediaTypeInRanges(
|
|||
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 @@ STDMETHODCALLTYPE
|
|||
CKsDataTypeHandler::KsSetMediaType(
|
||||
IN const AM_MEDIA_TYPE* AmMediaType)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugString("CKsDataTypeHandler::KsSetMediaType\n");
|
||||
#endif
|
||||
|
||||
if (m_Type)
|
||||
{
|
||||
|
@ -228,7 +232,10 @@ CKsDataTypeHandler_Constructor (
|
|||
REFIID riid,
|
||||
LPVOID * ppv)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsDataTypeHandler_Constructor\n");
|
||||
#endif
|
||||
|
||||
CKsDataTypeHandler * handler = new CKsDataTypeHandler();
|
||||
|
||||
if (!handler)
|
||||
|
|
|
@ -64,13 +64,6 @@ CEnumMediaTypes::QueryInterface(
|
|||
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 @@ STDMETHODCALLTYPE
|
|||
CEnumMediaTypes::Clone(
|
||||
IEnumMediaTypes **ppEnum)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CEnumMediaTypes::Clone : NotImplemented\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -189,7 +184,7 @@ CEnumMediaTypes_fnConstructor(
|
|||
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
|
||||
|
||||
|
|
|
@ -132,7 +132,10 @@ STDMETHODCALLTYPE
|
|||
CEnumPins::Clone(
|
||||
IEnumPins **ppEnum)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CEnumPins::Clone : NotImplemented\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
|
|
@ -356,7 +356,10 @@ CInputPin::Notify(
|
|||
IBaseFilter *pSelf,
|
||||
Quality q)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::Notify NotImplemented\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -365,7 +368,10 @@ STDMETHODCALLTYPE
|
|||
CInputPin::SetSink(
|
||||
IQualityControl *piqc)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::SetSink NotImplemented\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -378,7 +384,10 @@ STDMETHODCALLTYPE
|
|||
CInputPin::KsAddAggregate(
|
||||
IN REFGUID AggregateClass)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::KsAddAggregate NotImplemented\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -387,7 +396,10 @@ STDMETHODCALLTYPE
|
|||
CInputPin::KsRemoveAggregate(
|
||||
REFGUID AggregateClass)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::KsRemoveAggregate NotImplemented\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -411,7 +423,10 @@ CInputPin::Backout(
|
|||
IPin *ppinOut,
|
||||
IGraphBuilder *pGraph)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::Backout\n");
|
||||
#endif
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -424,7 +439,10 @@ STDMETHODCALLTYPE
|
|||
CInputPin::KsPinFactory(
|
||||
ULONG* PinFactory)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::KsPinFactory\n");
|
||||
#endif
|
||||
|
||||
*PinFactory = m_PinId;
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -600,7 +618,10 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CInputPin::GetAllocator(IMemAllocator **ppAllocator)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::GetAllocator\n");
|
||||
#endif
|
||||
|
||||
return VFW_E_NO_ALLOCATOR;
|
||||
}
|
||||
|
||||
|
@ -608,13 +629,16 @@ HRESULT
|
|||
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 @@ CInputPin::GetAllocatorRequirements(ALLOCATOR_PROPERTIES *pProps)
|
|||
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 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CInputPin::Receive(IMediaSample *pSample)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::Receive NotImplemented\n");
|
||||
DebugBreak();
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -675,8 +704,11 @@ HRESULT
|
|||
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 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CInputPin::ReceiveCanBlock( void)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::ReceiveCanBlock NotImplemented\n");
|
||||
DebugBreak();
|
||||
#endif
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
|
@ -878,7 +913,10 @@ CInputPin::KsQualityNotify(
|
|||
ULONG Proportion,
|
||||
REFERENCE_TIME TimeDelta)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::KsQualityNotify NotImplemented\n");
|
||||
#endif
|
||||
|
||||
DebugBreak();
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
@ -893,7 +931,9 @@ CInputPin::KsNotifyError(
|
|||
IMediaSample* Sample,
|
||||
HRESULT hr)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::KsNotifyError NotImplemented\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1066,8 +1106,10 @@ HRESULT
|
|||
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 @@ CInputPin::Disconnect( void)
|
|||
m_Pin->Release();
|
||||
m_Pin = NULL;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::Disconnect\n");
|
||||
#endif
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT
|
||||
|
@ -1146,8 +1191,11 @@ CInputPin::ConnectionMediaType(AM_MEDIA_TYPE *pmt)
|
|||
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 @@ HRESULT
|
|||
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 @@ CInputPin::CheckFormat(
|
|||
{
|
||||
// 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 @@ CInputPin::CreatePin(
|
|||
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 @@ CInputPin::CreatePin(
|
|||
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 @@ CInputPin::CreatePin(
|
|||
}
|
||||
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 @@ CInputPin::CreatePinHandle(
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -285,10 +285,11 @@ CKsInterfaceHandler::KsProcessMediaSamples(
|
|||
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 @@ CKsInterfaceHandler_Constructor(
|
|||
REFIID riid,
|
||||
LPVOID * ppv)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsInterfaceHandler_Constructor\n");
|
||||
#endif
|
||||
|
||||
CKsInterfaceHandler * handler = new CKsInterfaceHandler();
|
||||
|
||||
|
|
|
@ -348,7 +348,9 @@ CMediaSample_Constructor(
|
|||
REFIID riid,
|
||||
LPVOID * ppv)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CMediaSample_Constructor\n");
|
||||
#endif
|
||||
|
||||
CMediaSample * handler = new CMediaSample(Allocator, pBuffer, BufferSize);
|
||||
|
||||
|
|
|
@ -124,7 +124,9 @@ CKsNode_Constructor(
|
|||
HANDLE handle;
|
||||
KSNODE_CREATE NodeCreate;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsNode_Constructor\n");
|
||||
#endif
|
||||
|
||||
//setup request
|
||||
NodeCreate.CreateFlags = 0;
|
||||
|
|
|
@ -258,7 +258,9 @@ COutputPin::QueryInterface(
|
|||
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 @@ COutputPin::QueryInterface(
|
|||
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 @@ COutputPin::QueryInterface(
|
|||
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 @@ COutputPin::QueryInterface(
|
|||
#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 @@ COutputPin::QueryInterface(
|
|||
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 @@ STDMETHODCALLTYPE
|
|||
COutputPin::SuggestAllocatorProperties(
|
||||
const ALLOCATOR_PROPERTIES *pprop)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::SuggestAllocatorProperties\n");
|
||||
#endif
|
||||
|
||||
if (m_Pin)
|
||||
{
|
||||
|
@ -403,7 +418,9 @@ STDMETHODCALLTYPE
|
|||
COutputPin::GetAllocatorProperties(
|
||||
ALLOCATOR_PROPERTIES *pprop)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::GetAllocatorProperties\n");
|
||||
#endif
|
||||
|
||||
if (!m_Pin)
|
||||
{
|
||||
|
@ -429,7 +446,9 @@ STDMETHODCALLTYPE
|
|||
COutputPin::SetFormat(
|
||||
AM_MEDIA_TYPE *pmt)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::SetFormat NotImplemented\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -437,7 +456,9 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
COutputPin::GetFormat(AM_MEDIA_TYPE **ppmt)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::GetFormat NotImplemented\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -447,7 +468,9 @@ COutputPin::GetNumberOfCapabilities(
|
|||
int *piCount,
|
||||
int *piSize)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::GetNumberOfCapabilities NotImplemented\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -458,7 +481,9 @@ COutputPin::GetStreamCaps(
|
|||
AM_MEDIA_TYPE **ppmt,
|
||||
BYTE *pSCC)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::GetStreamCaps NotImplemented\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -469,7 +494,9 @@ HRESULT
|
|||
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 @@ COutputPin::Notify(
|
|||
IBaseFilter *pSelf,
|
||||
Quality q)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::Notify NotImplemented\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -813,7 +842,9 @@ STDMETHODCALLTYPE
|
|||
COutputPin::SetSink(
|
||||
IQualityControl *piqc)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::SetSink NotImplemented\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -826,7 +857,9 @@ STDMETHODCALLTYPE
|
|||
COutputPin::KsAddAggregate(
|
||||
IN REFGUID AggregateClass)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::KsAddAggregate NotImplemented\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -835,7 +868,9 @@ STDMETHODCALLTYPE
|
|||
COutputPin::KsRemoveAggregate(
|
||||
REFGUID AggregateClass)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::KsRemoveAggregate NotImplemented\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -900,7 +935,9 @@ COutputPin::KsCreateSinkPinHandle(
|
|||
KSPIN_INTERFACE& Interface,
|
||||
KSPIN_MEDIUM& Medium)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::KsCreateSinkPinHandle NotImplemented\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -943,7 +980,9 @@ COutputPin::KsPropagateAcquire()
|
|||
ULONG BytesReturned;
|
||||
HRESULT hr;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::KsPropagateAcquire\n");
|
||||
#endif
|
||||
|
||||
assert(m_hPin != INVALID_HANDLE_VALUE);
|
||||
|
||||
|
@ -954,6 +993,10 @@ COutputPin::KsPropagateAcquire()
|
|||
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 @@ COutputPin::KsQualityNotify(
|
|||
ULONG Proportion,
|
||||
REFERENCE_TIME TimeDelta)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::KsQualityNotify NotImplemented\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -1049,7 +1094,9 @@ COutputPin::KsNotifyError(
|
|||
IMediaSample* Sample,
|
||||
HRESULT hr)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::KsNotifyError NotImplemented\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1206,7 +1253,9 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
COutputPin::GetPages(CAUUID *pPages)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::GetPages NotImplemented\n");
|
||||
#endif
|
||||
|
||||
if (!pPages)
|
||||
return E_POINTER;
|
||||
|
@ -1226,7 +1275,10 @@ STDMETHODCALLTYPE
|
|||
COutputPin::KsPinFactory(
|
||||
ULONG* PinFactory)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::KsPinFactory\n");
|
||||
#endif
|
||||
|
||||
*PinFactory = m_PinId;
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -1242,7 +1294,9 @@ COutputPin::Render(
|
|||
IPin *ppinOut,
|
||||
IGraphBuilder *pGraph)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::Render\n");
|
||||
#endif
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -1252,7 +1306,10 @@ COutputPin::Backout(
|
|||
IPin *ppinOut,
|
||||
IGraphBuilder *pGraph)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::Backout\n");
|
||||
#endif
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
|
@ -1262,7 +1319,10 @@ HANDLE
|
|||
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 @@ COutputPin::KsProperty(
|
|||
ULONG* BytesReturned)
|
||||
{
|
||||
HRESULT hr;
|
||||
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);
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
WCHAR Buffer[100];
|
||||
LPOLESTR pstr;
|
||||
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 @@ COutputPin::KsMethod(
|
|||
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 @@ COutputPin::KsEvent(
|
|||
{
|
||||
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 @@ COutputPin::QuerySupported(
|
|||
KSPROPERTY Property;
|
||||
ULONG BytesReturned;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::QuerySupported\n");
|
||||
#endif
|
||||
|
||||
Property.Set = guidPropSet;
|
||||
Property.Id = dwPropID;
|
||||
|
@ -1444,9 +1511,12 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
|
|||
HRESULT hr;
|
||||
ALLOCATOR_PROPERTIES Properties;
|
||||
IMemAllocatorCallbackTemp *pMemCallback;
|
||||
WCHAR Buffer[200];
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
WCHAR Buffer[200];
|
||||
OutputDebugStringW(L"COutputPin::Connect called\n");
|
||||
#endif
|
||||
|
||||
if (pmt)
|
||||
{
|
||||
hr = pReceivePin->QueryAccept(pmt);
|
||||
|
@ -1467,7 +1537,10 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
|
|||
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 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
|
|||
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 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
|
|||
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 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
|
|||
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 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
|
|||
|
||||
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 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
|
|||
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 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
|
|||
// increment reference count
|
||||
pReceivePin->AddRef();
|
||||
m_Pin = pReceivePin;
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::Connect success\n");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1593,7 +1678,9 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
COutputPin::Disconnect( void)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::Disconnect\n");
|
||||
#endif
|
||||
|
||||
if (!m_Pin)
|
||||
{
|
||||
|
@ -1612,14 +1699,18 @@ COutputPin::Disconnect( void)
|
|||
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 @@ HRESULT
|
|||
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 @@ HRESULT
|
|||
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 @@ COutputPin::CreatePin(
|
|||
}
|
||||
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 @@ COutputPin::CreatePinHandle(
|
|||
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 @@ COutputPin::CreatePinHandle(
|
|||
CoTaskMemFree(pSub);
|
||||
CoTaskMemFree(pFormat);
|
||||
OutputDebugStringW(Buffer);
|
||||
#endif
|
||||
|
||||
if (pmt->cbFormat)
|
||||
{
|
||||
|
@ -2082,9 +2184,12 @@ COutputPin::IoProcessRoutine()
|
|||
HRESULT hr;
|
||||
PKSSTREAM_SEGMENT StreamSegment;
|
||||
HANDLE hEvent;
|
||||
WCHAR Buffer[200];
|
||||
IMediaSample * Samples[1];
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
WCHAR Buffer[200];
|
||||
#endif
|
||||
|
||||
// first wait for the start event to signal
|
||||
WaitForSingleObject(m_hStartEvent, INFINITE);
|
||||
|
||||
|
@ -2122,8 +2227,10 @@ COutputPin::IoProcessRoutine()
|
|||
&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 @@ COutputPin::IoProcessRoutine()
|
|||
// 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,11 +2335,13 @@ COutputPin_SetState(
|
|||
HRESULT hr = S_OK;
|
||||
KSPROPERTY Property;
|
||||
KSSTATE CurState;
|
||||
WCHAR Buffer[200];
|
||||
ULONG BytesReturned;
|
||||
|
||||
COutputPin * pPin = (COutputPin*)Pin;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
WCHAR Buffer[200];
|
||||
#endif
|
||||
|
||||
Property.Set = KSPROPSETID_Connection;
|
||||
Property.Id = KSPROPERTY_CONNECTION_STATE;
|
||||
Property.Flags = KSPROPERTY_TYPE_SET;
|
||||
|
@ -2243,15 +2356,20 @@ COutputPin_SetState(
|
|||
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 @@ COutputPin_SetState(
|
|||
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 @@ COutputPin_SetState(
|
|||
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 @@ COutputPin_SetState(
|
|||
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 @@ COutputPin_SetState(
|
|||
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 @@ COutputPin_SetState(
|
|||
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))
|
||||
{
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#define _FORCENAMELESSUNION
|
||||
#define BUILDING_KS
|
||||
#define _KSDDK_
|
||||
//#define KSPROXY_TRACE
|
||||
#include <dshow.h>
|
||||
//#include <streams.h>
|
||||
#include <ks.h>
|
||||
|
|
|
@ -347,24 +347,26 @@ CKsProxy::QueryInterface(
|
|||
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 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CKsProxy::GetPages(CAUUID *pPages)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::GetPages NotImplemented\n");
|
||||
#endif
|
||||
|
||||
if (!pPages)
|
||||
return E_POINTER;
|
||||
|
@ -493,7 +497,10 @@ STDMETHODCALLTYPE
|
|||
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 @@ STDMETHODCALLTYPE
|
|||
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 @@ STDMETHODCALLTYPE
|
|||
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 @@ STDMETHODCALLTYPE
|
|||
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 @@ STDMETHODCALLTYPE
|
|||
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 @@ STDMETHODCALLTYPE
|
|||
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 @@ STDMETHODCALLTYPE
|
|||
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 @@ STDMETHODCALLTYPE
|
|||
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 @@ STDMETHODCALLTYPE
|
|||
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 @@ STDMETHODCALLTYPE
|
|||
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 @@ CKsProxy::GetTime(
|
|||
KSPROPERTY Property;
|
||||
ULONG BytesReturned;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::GetTime\n");
|
||||
#endif
|
||||
|
||||
if (!pTime)
|
||||
return E_POINTER;
|
||||
|
@ -635,7 +667,9 @@ CKsProxy::AdviseTime(
|
|||
ULONG BytesReturned;
|
||||
PKSEVENT_TIME_MARK Event;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::AdviseTime\n");
|
||||
#endif
|
||||
|
||||
//
|
||||
//FIXME locks
|
||||
|
@ -701,7 +735,9 @@ CKsProxy::AdvisePeriodic(
|
|||
ULONG BytesReturned;
|
||||
PKSEVENT_TIME_INTERVAL Event;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::AdvisePeriodic\n");
|
||||
#endif
|
||||
|
||||
//
|
||||
//FIXME locks
|
||||
|
@ -763,7 +799,9 @@ CKsProxy::Unadvise(
|
|||
HRESULT hr;
|
||||
ULONG BytesReturned;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::Unadvise\n");
|
||||
#endif
|
||||
|
||||
if (m_hClock)
|
||||
{
|
||||
|
@ -801,7 +839,10 @@ CKsProxy::GetCapabilities(
|
|||
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 @@ CKsProxy::CheckCapabilities(
|
|||
DWORD Capabilities;
|
||||
HRESULT hr;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::CheckCapabilities\n");
|
||||
#endif
|
||||
|
||||
if (!pCapabilities)
|
||||
return E_POINTER;
|
||||
|
@ -929,11 +972,13 @@ CKsProxy::IsFormatSupported(
|
|||
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 @@ CKsProxy::IsFormatSupported(
|
|||
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 @@ CKsProxy::IsFormatSupported(
|
|||
{
|
||||
// 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 @@ CKsProxy::QueryPreferredFormat(
|
|||
HRESULT hr;
|
||||
ULONG Index;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::QueryPreferredFormat\n");
|
||||
#endif
|
||||
|
||||
if (!pFormat)
|
||||
return E_POINTER;
|
||||
|
@ -1061,7 +1112,9 @@ CKsProxy::GetTimeFormat(
|
|||
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 @@ CKsProxy::IsUsingTimeFormat(
|
|||
{
|
||||
GUID Format;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::IsUsingTimeFormat\n");
|
||||
#endif
|
||||
|
||||
if (FAILED(QueryPreferredFormat(&Format)))
|
||||
return S_FALSE;
|
||||
|
@ -1125,7 +1180,9 @@ CKsProxy::SetTimeFormat(
|
|||
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 @@ CKsProxy::GetDuration(
|
|||
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 @@ CKsProxy::GetStopPosition(
|
|||
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 @@ CKsProxy::GetCurrentPosition(
|
|||
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 @@ CKsProxy::ConvertTimeFormat(
|
|||
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 @@ CKsProxy::SetPositions(
|
|||
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 @@ CKsProxy::GetPositions(
|
|||
{
|
||||
HRESULT hr;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::GetPositions\n");
|
||||
#endif
|
||||
|
||||
hr = GetCurrentPosition(pCurrent);
|
||||
if (SUCCEEDED(hr))
|
||||
|
@ -1483,7 +1552,9 @@ CKsProxy::GetAvailable(
|
|||
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 @@ STDMETHODCALLTYPE
|
|||
CKsProxy::SetRate(
|
||||
double dRate)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::SetRate\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -1536,7 +1609,9 @@ STDMETHODCALLTYPE
|
|||
CKsProxy::GetRate(
|
||||
double *pdRate)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::GetRate\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -1553,7 +1628,9 @@ CKsProxy::GetPreroll(
|
|||
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 @@ CKsProxy::GetMiscFlags()
|
|||
HRESULT hr;
|
||||
PIN_DIRECTION PinDirection;
|
||||
KSPIN_COMMUNICATION Communication;
|
||||
WCHAR Buffer[100];
|
||||
|
||||
|
||||
for(Index = 0; Index < m_Pins.size(); Index++)
|
||||
{
|
||||
|
@ -1623,8 +1700,12 @@ CKsProxy::GetMiscFlags()
|
|||
}
|
||||
}
|
||||
|
||||
#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 @@ CKsProxy::KsProperty(
|
|||
ULONG DataLength,
|
||||
ULONG* BytesReturned)
|
||||
{
|
||||
assert(m_hDevice != 0);
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::KsProperty\n");
|
||||
#endif
|
||||
|
||||
assert(m_hDevice != 0);
|
||||
return KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_PROPERTY, (PVOID)Property, PropertyLength, (PVOID)PropertyData, DataLength, BytesReturned);
|
||||
}
|
||||
|
||||
|
@ -1654,8 +1738,11 @@ CKsProxy::KsMethod(
|
|||
ULONG DataLength,
|
||||
ULONG* BytesReturned)
|
||||
{
|
||||
assert(m_hDevice != 0);
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::KsMethod\n");
|
||||
#endif
|
||||
|
||||
assert(m_hDevice != 0);
|
||||
return KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_METHOD, (PVOID)Method, MethodLength, (PVOID)MethodData, DataLength, BytesReturned);
|
||||
}
|
||||
|
||||
|
@ -1668,8 +1755,11 @@ CKsProxy::KsEvent(
|
|||
ULONG DataLength,
|
||||
ULONG* BytesReturned)
|
||||
{
|
||||
assert(m_hDevice != 0);
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::KsEvent\n");
|
||||
#endif
|
||||
|
||||
assert(m_hDevice != 0);
|
||||
if (EventLength)
|
||||
return KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_ENABLE_EVENT, (PVOID)Event, EventLength, (PVOID)EventData, DataLength, BytesReturned);
|
||||
else
|
||||
|
@ -1692,7 +1782,9 @@ CKsProxy::Set(
|
|||
{
|
||||
ULONG BytesReturned;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::Set\n");
|
||||
#endif
|
||||
|
||||
if (cbInstanceData)
|
||||
{
|
||||
|
@ -1736,7 +1828,9 @@ CKsProxy::Get(
|
|||
{
|
||||
ULONG BytesReturned;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::Get\n");
|
||||
#endif
|
||||
|
||||
if (cbInstanceData)
|
||||
{
|
||||
|
@ -1777,7 +1871,9 @@ CKsProxy::QuerySupported(
|
|||
KSPROPERTY Property;
|
||||
ULONG BytesReturned;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::QuerySupported\n");
|
||||
#endif
|
||||
|
||||
Property.Set = guidPropSet;
|
||||
Property.Id = dwPropID;
|
||||
|
@ -1802,7 +1898,9 @@ CKsProxy::CreateNodeInstance(
|
|||
{
|
||||
HRESULT hr;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::CreateNodeInstance\n");
|
||||
#endif
|
||||
|
||||
*Interface = NULL;
|
||||
|
||||
|
@ -1827,7 +1925,9 @@ STDMETHODCALLTYPE
|
|||
CKsProxy::KsAddAggregate(
|
||||
IN REFGUID AggregateClass)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::KsAddAggregate NotImplemented\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -1836,7 +1936,10 @@ STDMETHODCALLTYPE
|
|||
CKsProxy::KsRemoveAggregate(
|
||||
REFGUID AggregateClass)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::KsRemoveAggregate NotImplemented\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -1849,8 +1952,10 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CKsProxy::IsDirty()
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::IsDirty Notimplemented\n");
|
||||
DebugBreak();
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -1868,7 +1973,9 @@ CKsProxy::Load(
|
|||
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 @@ CKsProxy::Save(
|
|||
IStream *pStm,
|
||||
BOOL fClearDirty)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::Save Notimplemented\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -1947,8 +2057,11 @@ STDMETHODCALLTYPE
|
|||
CKsProxy::GetSizeMax(
|
||||
ULARGE_INTEGER *pcbSize)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::GetSizeMax Notimplemented\n");
|
||||
DebugBreak();
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -1960,8 +2073,9 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CKsProxy::DeviceInfo(CLSID *pclsidInterfaceClass, LPWSTR *pwszSymbolicLink)
|
||||
{
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::DeviceInfo\n");
|
||||
#endif
|
||||
|
||||
if (!m_DevicePath)
|
||||
{
|
||||
|
@ -1986,7 +2100,9 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CKsProxy::Reassociate(void)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::Reassociate\n");
|
||||
#endif
|
||||
|
||||
if (!m_DevicePath || m_hDevice)
|
||||
{
|
||||
|
@ -2009,7 +2125,9 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CKsProxy::Disassociate(void)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::Disassociate\n");
|
||||
#endif
|
||||
|
||||
if (!m_hDevice)
|
||||
return E_HANDLE;
|
||||
|
@ -2027,7 +2145,10 @@ HANDLE
|
|||
STDMETHODCALLTYPE
|
||||
CKsProxy::KsGetClockHandle()
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::KsGetClockHandle\n");
|
||||
#endif
|
||||
|
||||
return m_hClock;
|
||||
}
|
||||
|
||||
|
@ -2040,7 +2161,10 @@ HANDLE
|
|||
STDMETHODCALLTYPE
|
||||
CKsProxy::KsGetObjectHandle()
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::KsGetObjectHandle\n");
|
||||
#endif
|
||||
|
||||
return m_hDevice;
|
||||
}
|
||||
|
||||
|
@ -2051,7 +2175,10 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CKsProxy::InitNew( void)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::InitNew\n");
|
||||
#endif
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -2338,7 +2465,6 @@ CKsProxy::CreatePins()
|
|||
KSPIN_DATAFLOW DataFlow;
|
||||
KSPIN_COMMUNICATION Communication;
|
||||
HRESULT hr;
|
||||
WCHAR Buffer[100];
|
||||
LPWSTR PinName;
|
||||
IPin * pPin;
|
||||
ULONG InputPin = 0;
|
||||
|
@ -2405,8 +2531,12 @@ CKsProxy::CreatePins()
|
|||
// 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 @@ STDMETHODCALLTYPE
|
|||
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 @@ CKsProxy::Load(IPropertyBag *pPropBag, IErrorLog *pErrorLog)
|
|||
|
||||
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 @@ CKsProxy::Load(IPropertyBag *pPropBag, IErrorLog *pErrorLog)
|
|||
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 @@ HRESULT
|
|||
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 @@ STDMETHODCALLTYPE
|
|||
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 @@ CKsProxy::Stop()
|
|||
{
|
||||
HRESULT hr;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::Stop\n");
|
||||
#endif
|
||||
|
||||
EnterCriticalSection(&m_Lock);
|
||||
|
||||
|
@ -2552,7 +2695,9 @@ CKsProxy::Pause()
|
|||
{
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::Pause\n");
|
||||
#endif
|
||||
|
||||
EnterCriticalSection(&m_Lock);
|
||||
|
||||
|
@ -2583,7 +2728,9 @@ CKsProxy::Run(
|
|||
{
|
||||
HRESULT hr;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::Run\n");
|
||||
#endif
|
||||
|
||||
EnterCriticalSection(&m_Lock);
|
||||
|
||||
|
@ -2673,9 +2820,11 @@ CKsProxy::SetPinState(
|
|||
// 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 @@ CKsProxy::SetSyncSource(
|
|||
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 @@ CKsProxy::SetSyncSource(
|
|||
}
|
||||
|
||||
m_ReferenceClock = pClock;
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::SetSyncSource done\n");
|
||||
#endif
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -2815,7 +2967,9 @@ STDMETHODCALLTYPE
|
|||
CKsProxy::GetSyncSource(
|
||||
IReferenceClock **pClock)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::GetSyncSource\n");
|
||||
#endif
|
||||
|
||||
if (!pClock)
|
||||
return E_POINTER;
|
||||
|
@ -2832,7 +2986,10 @@ STDMETHODCALLTYPE
|
|||
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 @@ CKsProxy::FindPin(
|
|||
{
|
||||
ULONG PinId;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::FindPin\n");
|
||||
#endif
|
||||
|
||||
if (!ppPin)
|
||||
return E_POINTER;
|
||||
|
@ -2879,7 +3038,9 @@ CKsProxy::QueryFilterInfo(
|
|||
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 @@ STDMETHODCALLTYPE
|
|||
CKsProxy::QueryVendorInfo(
|
||||
LPWSTR *pVendorInfo)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::QueryVendorInfo\n");
|
||||
#endif
|
||||
return StringFromCLSID(CLSID_Proxy, pVendorInfo);
|
||||
}
|
||||
|
||||
|
@ -2934,7 +3097,10 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CKsProxy::Register()
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::Register : NotImplemented\n");
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -2942,7 +3108,9 @@ HRESULT
|
|||
STDMETHODCALLTYPE
|
||||
CKsProxy::Unregister()
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::Unregister : NotImplemented\n");
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -2953,11 +3121,13 @@ CKsProxy_Constructor(
|
|||
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();
|
||||
|
||||
|
|
|
@ -88,7 +88,9 @@ STDMETHODCALLTYPE
|
|||
CKsQualityForwarder::KsFlushClient(
|
||||
IN IKsPin *Pin)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugString("UNIMPLEMENTED\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
HRESULT
|
||||
|
@ -101,14 +103,18 @@ CKsQualityForwarder_Constructor(
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue