mirror of
https://github.com/reactos/reactos.git
synced 2024-08-02 09:30:55 +00:00
[MSDVBNP]
- Remove DebugBreak - Implement IPin::Connect, IPin::ReceiveConnection, IPin::Disconnect, IPin::ConnectedTo - Remove spaces - DVBT Network Provider can now connect tv tuner in ReactOS svn path=/trunk/; revision=46646
This commit is contained in:
parent
3ab04b5faa
commit
b021015c8f
|
@ -201,7 +201,6 @@ CNetworkProvider::QueryInterface(
|
||||||
swprintf(Buffer, L"CNetworkProvider::QueryInterface: NoInterface for %s !!!\n", lpstr);
|
swprintf(Buffer, L"CNetworkProvider::QueryInterface: NoInterface for %s !!!\n", lpstr);
|
||||||
OutputDebugStringW(Buffer);
|
OutputDebugStringW(Buffer);
|
||||||
CoTaskMemFree(lpstr);
|
CoTaskMemFree(lpstr);
|
||||||
DebugBreak();
|
|
||||||
|
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ public:
|
||||||
HRESULT STDMETHODCALLTYPE EndFlush();
|
HRESULT STDMETHODCALLTYPE EndFlush();
|
||||||
HRESULT STDMETHODCALLTYPE NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
|
HRESULT STDMETHODCALLTYPE NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
|
||||||
|
|
||||||
CPin(IBaseFilter * ParentFilter) : m_Ref(0), m_ParentFilter(ParentFilter){};
|
CPin(IBaseFilter * ParentFilter);
|
||||||
virtual ~CPin(){};
|
virtual ~CPin(){};
|
||||||
|
|
||||||
static LPCWSTR PIN_ID;
|
static LPCWSTR PIN_ID;
|
||||||
|
@ -59,11 +59,31 @@ public:
|
||||||
protected:
|
protected:
|
||||||
LONG m_Ref;
|
LONG m_Ref;
|
||||||
IBaseFilter * m_ParentFilter;
|
IBaseFilter * m_ParentFilter;
|
||||||
|
AM_MEDIA_TYPE m_MediaType;
|
||||||
|
IPin * m_Pin;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
LPCWSTR CPin::PIN_ID = L"Antenna Out";
|
LPCWSTR CPin::PIN_ID = L"Antenna Out";
|
||||||
|
|
||||||
|
|
||||||
|
CPin::CPin(
|
||||||
|
IBaseFilter * ParentFilter) : m_Ref(0),
|
||||||
|
m_ParentFilter(ParentFilter),
|
||||||
|
m_Pin(0)
|
||||||
|
{
|
||||||
|
m_MediaType.majortype = KSDATAFORMAT_TYPE_BDA_ANTENNA;
|
||||||
|
m_MediaType.subtype = MEDIASUBTYPE_None;
|
||||||
|
m_MediaType.formattype = FORMAT_None;
|
||||||
|
m_MediaType.bFixedSizeSamples = true;
|
||||||
|
m_MediaType.bTemporalCompression = false;
|
||||||
|
m_MediaType.lSampleSize = sizeof(CHAR);
|
||||||
|
m_MediaType.pUnk = NULL;
|
||||||
|
m_MediaType.cbFormat = 0;
|
||||||
|
m_MediaType.pbFormat = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
HRESULT
|
HRESULT
|
||||||
STDMETHODCALLTYPE
|
STDMETHODCALLTYPE
|
||||||
CPin::QueryInterface(
|
CPin::QueryInterface(
|
||||||
|
@ -100,36 +120,97 @@ HRESULT
|
||||||
STDMETHODCALLTYPE
|
STDMETHODCALLTYPE
|
||||||
CPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
|
CPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
|
||||||
{
|
{
|
||||||
|
HRESULT hr;
|
||||||
OutputDebugStringW(L"CPin::Connect called\n");
|
OutputDebugStringW(L"CPin::Connect called\n");
|
||||||
return E_NOTIMPL;
|
|
||||||
|
if (pmt)
|
||||||
|
{
|
||||||
|
hr = pReceivePin->QueryAccept(pmt);
|
||||||
|
if (FAILED(hr))
|
||||||
|
{
|
||||||
|
OutputDebugStringW(L"CPin::Connect QueryAccept failed\n");
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// query accept
|
||||||
|
hr = pReceivePin->QueryAccept(&m_MediaType);
|
||||||
|
if (FAILED(hr))
|
||||||
|
{
|
||||||
|
OutputDebugStringW(L"CPin::Connect QueryAccept pmt default failed\n");
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
pmt = &m_MediaType;
|
||||||
|
}
|
||||||
|
|
||||||
|
// receive connection;
|
||||||
|
hr = pReceivePin->ReceiveConnection((IPin*)this, pmt);
|
||||||
|
if (SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
// increment reference count
|
||||||
|
pReceivePin->AddRef();
|
||||||
|
m_Pin = pReceivePin;
|
||||||
|
OutputDebugStringW(L"CPin::Connect success\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT
|
HRESULT
|
||||||
STDMETHODCALLTYPE
|
STDMETHODCALLTYPE
|
||||||
CPin::ReceiveConnection(IPin *pConnector, const AM_MEDIA_TYPE *pmt)
|
CPin::ReceiveConnection(IPin *pConnector, const AM_MEDIA_TYPE *pmt)
|
||||||
{
|
{
|
||||||
OutputDebugStringW(L"CPin::ReceiveConnection called\n");
|
return E_UNEXPECTED;
|
||||||
return E_NOTIMPL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT
|
HRESULT
|
||||||
STDMETHODCALLTYPE
|
STDMETHODCALLTYPE
|
||||||
CPin::Disconnect( void)
|
CPin::Disconnect( void)
|
||||||
{
|
{
|
||||||
OutputDebugStringW(L"CPin::Disconnect called\n");
|
#ifdef MSDVBNP_TRACE
|
||||||
return E_NOTIMPL;
|
OutputDebugStringW(L"CPin::Disconnect\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (!m_Pin)
|
||||||
|
{
|
||||||
|
// pin was not connected
|
||||||
|
return S_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_Pin->Release();
|
||||||
|
m_Pin = NULL;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
HRESULT
|
HRESULT
|
||||||
STDMETHODCALLTYPE
|
STDMETHODCALLTYPE
|
||||||
CPin::ConnectedTo(IPin **pPin)
|
CPin::ConnectedTo(IPin **pPin)
|
||||||
{
|
{
|
||||||
OutputDebugStringW(L"CPin::ConnectedTo called\n");
|
#ifdef MSDVBNP_TRACE
|
||||||
|
OutputDebugStringW(L"CPin::ConnectedTo\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (!pPin)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
|
if (m_Pin)
|
||||||
|
{
|
||||||
|
// increment reference count
|
||||||
|
m_Pin->AddRef();
|
||||||
|
*pPin = m_Pin;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
*pPin = NULL;
|
||||||
return VFW_E_NOT_CONNECTED;
|
return VFW_E_NOT_CONNECTED;
|
||||||
}
|
}
|
||||||
HRESULT
|
HRESULT
|
||||||
STDMETHODCALLTYPE
|
STDMETHODCALLTYPE
|
||||||
CPin::ConnectionMediaType(AM_MEDIA_TYPE *pmt)
|
CPin::ConnectionMediaType(AM_MEDIA_TYPE *pmt)
|
||||||
{
|
{
|
||||||
OutputDebugStringW(L"CPin::ConnectionMediaType called\n");
|
OutputDebugStringW(L"CPin::ConnectionMediaType NotImplemented\n");
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
HRESULT
|
HRESULT
|
||||||
|
@ -170,7 +251,7 @@ HRESULT
|
||||||
STDMETHODCALLTYPE
|
STDMETHODCALLTYPE
|
||||||
CPin::QueryAccept(const AM_MEDIA_TYPE *pmt)
|
CPin::QueryAccept(const AM_MEDIA_TYPE *pmt)
|
||||||
{
|
{
|
||||||
OutputDebugStringW(L"CPin::QueryAccept called\n");
|
OutputDebugStringW(L"CPin::QueryAccept NotImplemented\n");
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
HRESULT
|
HRESULT
|
||||||
|
@ -200,35 +281,35 @@ HRESULT
|
||||||
STDMETHODCALLTYPE
|
STDMETHODCALLTYPE
|
||||||
CPin::QueryInternalConnections(IPin **apPin, ULONG *nPin)
|
CPin::QueryInternalConnections(IPin **apPin, ULONG *nPin)
|
||||||
{
|
{
|
||||||
OutputDebugStringW(L"CPin::QueryInternalConnections called\n");
|
OutputDebugStringW(L"CPin::QueryInternalConnections NotImplemented\n");
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
HRESULT
|
HRESULT
|
||||||
STDMETHODCALLTYPE
|
STDMETHODCALLTYPE
|
||||||
CPin::EndOfStream( void)
|
CPin::EndOfStream( void)
|
||||||
{
|
{
|
||||||
OutputDebugStringW(L"CPin::EndOfStream called\n");
|
OutputDebugStringW(L"CPin::EndOfStream NotImplemented\n");
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
HRESULT
|
HRESULT
|
||||||
STDMETHODCALLTYPE
|
STDMETHODCALLTYPE
|
||||||
CPin::BeginFlush( void)
|
CPin::BeginFlush( void)
|
||||||
{
|
{
|
||||||
OutputDebugStringW(L"CPin::BeginFlush called\n");
|
OutputDebugStringW(L"CPin::BeginFlush NotImplemented\n");
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
HRESULT
|
HRESULT
|
||||||
STDMETHODCALLTYPE
|
STDMETHODCALLTYPE
|
||||||
CPin::EndFlush( void)
|
CPin::EndFlush( void)
|
||||||
{
|
{
|
||||||
OutputDebugStringW(L"CPin::EndFlush called\n");
|
OutputDebugStringW(L"CPin::EndFlush NotImplemented\n");
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
HRESULT
|
HRESULT
|
||||||
STDMETHODCALLTYPE
|
STDMETHODCALLTYPE
|
||||||
CPin::NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
|
CPin::NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
|
||||||
{
|
{
|
||||||
OutputDebugStringW(L"CPin::NewSegment called\n");
|
OutputDebugStringW(L"CPin::NewSegment NotImplemented\n");
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue