Author: janderwald
Date: Fri Mar 26 12:43:52 2010
New Revision: 46464
URL:
http://svn.reactos.org/svn/reactos?rev=46464&view=rev
Log:
[BDAPLGIN]
- Perform property request by passing the request through IKsPropertySet interface. This
is necessary as the pin handle might not have been created at the time the proxy plugin
has been loaded
- Set Reserved of KSP_NODE request to zero as required by the documentation
Modified:
trunk/reactos/dll/directx/bdaplgin/controlnode.cpp
trunk/reactos/dll/directx/bdaplgin/digitaldemo.cpp
trunk/reactos/dll/directx/bdaplgin/frequencyfilter.cpp
trunk/reactos/dll/directx/bdaplgin/lnbinfo.cpp
trunk/reactos/dll/directx/bdaplgin/pincontrol.cpp
trunk/reactos/dll/directx/bdaplgin/precomp.h
trunk/reactos/dll/directx/bdaplgin/signalstatistics.cpp
Modified: trunk/reactos/dll/directx/bdaplgin/controlnode.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/bdaplgin/contr…
==============================================================================
--- trunk/reactos/dll/directx/bdaplgin/controlnode.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/bdaplgin/controlnode.cpp [iso-8859-1] Fri Mar 26 12:43:52
2010
@@ -34,12 +34,12 @@
return m_Ref;
}
- CControlNode(HANDLE hFile, ULONG NodeType, ULONG PinId) : m_Ref(0), m_hFile(hFile),
m_NodeType(NodeType), m_PinId(PinId){};
+ CControlNode(IKsPropertySet * pProperty, ULONG NodeType, ULONG PinId) : m_Ref(0),
m_pKsProperty(pProperty), m_NodeType(NodeType), m_PinId(PinId){};
virtual ~CControlNode(){};
protected:
LONG m_Ref;
- HANDLE m_hFile;
+ IKsPropertySet * m_pKsProperty;
ULONG m_NodeType;
ULONG m_PinId;
};
@@ -60,19 +60,19 @@
}
else if(IsEqualGUID(refiid, IID_IBDA_FrequencyFilter))
{
- return CBDAFrequencyFilter_fnConstructor(m_hFile, m_NodeType, refiid, Output);
+ return CBDAFrequencyFilter_fnConstructor(m_pKsProperty, m_NodeType, refiid,
Output);
}
else if(IsEqualGUID(refiid, IID_IBDA_SignalStatistics))
{
- return CBDASignalStatistics_fnConstructor(m_hFile, m_NodeType, refiid, Output);
+ return CBDASignalStatistics_fnConstructor(m_pKsProperty, m_NodeType, refiid,
Output);
}
else if(IsEqualGUID(refiid, IID_IBDA_LNBInfo))
{
- return CBDALNBInfo_fnConstructor(m_hFile, m_NodeType, refiid, Output);
+ return CBDALNBInfo_fnConstructor(m_pKsProperty, m_NodeType, refiid, Output);
}
else if(IsEqualGUID(refiid, IID_IBDA_DigitalDemodulator))
{
- return CBDADigitalDemodulator_fnConstructor(m_hFile, m_NodeType, refiid,
Output);
+ return CBDADigitalDemodulator_fnConstructor(m_pKsProperty, m_NodeType, refiid,
Output);
}
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[MAX_PATH];
@@ -99,8 +99,7 @@
WCHAR Buffer[100];
HRESULT hr;
IPin * pPin = NULL;
- IKsObject * pObject = NULL;
- HANDLE hFile = INVALID_HANDLE_VALUE;
+ IKsPropertySet * pProperty;
// store pin id
swprintf(Buffer, L"%u", PinId);
@@ -117,26 +116,21 @@
return hr;
}
- // query IKsObject interface
- hr = pPin->QueryInterface(IID_IKsObject, (void**)&pObject);
+ // query for IKsPropertySet interface
+ hr = pPin->QueryInterface(IID_IKsPropertySet, (void**)&pProperty);
+ if (FAILED(hr))
+ return hr;
#ifdef BDAPLGIN_TRACE
swprintf(Buffer, L"CControlNode_fnConstructor get IID_IKsObject status
%lx\n", hr);
OutputDebugStringW(Buffer);
#endif
- if (SUCCEEDED(hr))
- {
- // get pin handle
- hFile = pObject->KsGetObjectHandle();
- // release IKsObject interface
- pObject->Release();
- }
// release IPin interface
pPin->Release();
// construct device control
- CControlNode * handler = new CControlNode(hFile, NodeType, PinId);
+ CControlNode * handler = new CControlNode(pProperty, NodeType, PinId);
#ifdef BDAPLGIN_TRACE
OutputDebugStringW(L"CControlNode_fnConstructor\n");
Modified: trunk/reactos/dll/directx/bdaplgin/digitaldemo.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/bdaplgin/digit…
==============================================================================
--- trunk/reactos/dll/directx/bdaplgin/digitaldemo.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/bdaplgin/digitaldemo.cpp [iso-8859-1] Fri Mar 26 12:43:52
2010
@@ -50,12 +50,12 @@
HRESULT STDMETHODCALLTYPE put_SpectralInversion(SpectralInversion
*pSpectralInversion);
HRESULT STDMETHODCALLTYPE get_SpectralInversion(SpectralInversion
*pSpectralInversion);
- CBDADigitalDemodulator(HANDLE hFile, ULONG NodeId) : m_Ref(0), m_hFile(hFile),
m_NodeId(NodeId){};
+ CBDADigitalDemodulator(IKsPropertySet * pProperty, ULONG NodeId) : m_Ref(0),
m_pProperty(pProperty), m_NodeId(NodeId){};
~CBDADigitalDemodulator(){};
protected:
LONG m_Ref;
- HANDLE m_hFile;
+ IKsPropertySet * m_pProperty;
ULONG m_NodeId;
};
@@ -88,6 +88,7 @@
swprintf(Buffer, L"CBDADigitalDemodulator::QueryInterface: NoInterface for
%s", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
+DebugBreak();
#endif
return E_NOINTERFACE;
@@ -100,20 +101,17 @@
KSP_NODE Node;
HRESULT hr;
- ULONG BytesReturned;
-
- // setup request
- Node.Property.Set = KSPROPSETID_BdaDigitalDemodulator;
- Node.Property.Id = KSPROPERTY_BDA_MODULATION_TYPE;
- Node.Property.Flags = KSPROPERTY_TYPE_TOPOLOGY | KSPROPERTY_TYPE_SET;
- Node.NodeId = m_NodeId;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), pModulationType, sizeof(ModulationType), &BytesReturned);
-
-#ifdef BDAPLGIN_TRACE
- WCHAR Buffer[100];
- swprintf(Buffer, L"CBDADigitalDemodulator::put_ModulationType: hr %lx,
BytesReturned %lu\n", hr, BytesReturned);
+ // setup request
+ Node.NodeId = m_NodeId;
+ Node.Reserved = 0;
+
+ // perform request
+ hr = m_pProperty->Set(KSPROPSETID_BdaDigitalDemodulator,
KSPROPERTY_BDA_MODULATION_TYPE, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY),
pModulationType, sizeof(ModulationType));
+
+
+#ifdef BDAPLGIN_TRACE
+ WCHAR Buffer[100];
+ swprintf(Buffer, L"CBDADigitalDemodulator::put_ModulationType: hr %lx\n",
hr);
OutputDebugStringW(Buffer);
#endif
@@ -133,20 +131,18 @@
{
KSP_NODE Node;
HRESULT hr;
- ULONG BytesReturned;
-
- // setup request
- Node.Property.Set = KSPROPSETID_BdaDigitalDemodulator;
- Node.Property.Id = KSPROPERTY_BDA_INNER_FEC_TYPE;
- Node.Property.Flags = KSPROPERTY_TYPE_TOPOLOGY | KSPROPERTY_TYPE_SET;
- Node.NodeId = m_NodeId;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), pFECMethod, sizeof(FECMethod), &BytesReturned);
-
-#ifdef BDAPLGIN_TRACE
- WCHAR Buffer[100];
- swprintf(Buffer, L"CBDADigitalDemodulator::put_InnerFECMethod: hr %lx,
BytesReturned %lu\n", hr, BytesReturned);
+
+ // setup request
+ Node.NodeId = m_NodeId;
+ Node.Reserved = 0;
+
+ // perform request
+ hr = m_pProperty->Set(KSPROPSETID_BdaDigitalDemodulator,
KSPROPERTY_BDA_INNER_FEC_TYPE, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY),
pFECMethod, sizeof(FECMethod));
+
+
+#ifdef BDAPLGIN_TRACE
+ WCHAR Buffer[100];
+ swprintf(Buffer, L"CBDADigitalDemodulator::put_InnerFECMethod: hr %lx\n",
hr);
OutputDebugStringW(Buffer);
#endif
@@ -167,20 +163,16 @@
KSP_NODE Node;
HRESULT hr;
- ULONG BytesReturned;
-
- // setup request
- Node.Property.Set = KSPROPSETID_BdaDigitalDemodulator;
- Node.Property.Id = KSPROPERTY_BDA_INNER_FEC_RATE;
- Node.Property.Flags = KSPROPERTY_TYPE_TOPOLOGY | KSPROPERTY_TYPE_SET;
- Node.NodeId = m_NodeId;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), pFECRate, sizeof(BinaryConvolutionCodeRate), &BytesReturned);
-
-#ifdef BDAPLGIN_TRACE
- WCHAR Buffer[100];
- swprintf(Buffer, L"CBDADigitalDemodulator::put_InnerFECRate: hr %lx,
BytesReturned %lu\n", hr, BytesReturned);
+ // setup request
+ Node.NodeId = m_NodeId;
+ Node.Reserved = 0;
+
+ // perform request
+ hr = m_pProperty->Set(KSPROPSETID_BdaDigitalDemodulator,
KSPROPERTY_BDA_INNER_FEC_RATE, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY),
pFECRate, sizeof(BinaryConvolutionCodeRate));
+
+#ifdef BDAPLGIN_TRACE
+ WCHAR Buffer[100];
+ swprintf(Buffer, L"CBDADigitalDemodulator::put_InnerFECRate: hr %lx\n",
hr);
OutputDebugStringW(Buffer);
#endif
@@ -200,20 +192,17 @@
{
KSP_NODE Node;
HRESULT hr;
- ULONG BytesReturned;
-
- // setup request
- Node.Property.Set = KSPROPSETID_BdaDigitalDemodulator;
- Node.Property.Id = KSPROPERTY_BDA_OUTER_FEC_TYPE;
- Node.Property.Flags = KSPROPERTY_TYPE_TOPOLOGY | KSPROPERTY_TYPE_SET;
- Node.NodeId = m_NodeId;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), pFECMethod, sizeof(FECMethod), &BytesReturned);
-
-#ifdef BDAPLGIN_TRACE
- WCHAR Buffer[100];
- swprintf(Buffer, L"CBDADigitalDemodulator::put_OuterFECMethod: hr %lx,
BytesReturned %lu\n", hr, BytesReturned);
+
+ // setup request
+ Node.NodeId = m_NodeId;
+ Node.Reserved = 0;
+
+ // perform request
+ hr = m_pProperty->Set(KSPROPSETID_BdaDigitalDemodulator,
KSPROPERTY_BDA_OUTER_FEC_TYPE, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY),
pFECMethod, sizeof(FECMethod));
+
+#ifdef BDAPLGIN_TRACE
+ WCHAR Buffer[100];
+ swprintf(Buffer, L"CBDADigitalDemodulator::put_OuterFECMethod: hr %lx\n",
hr);
OutputDebugStringW(Buffer);
#endif
@@ -234,20 +223,16 @@
KSP_NODE Node;
HRESULT hr;
- ULONG BytesReturned;
-
- // setup request
- Node.Property.Set = KSPROPSETID_BdaDigitalDemodulator;
- Node.Property.Id = KSPROPERTY_BDA_OUTER_FEC_RATE;
- Node.Property.Flags = KSPROPERTY_TYPE_TOPOLOGY | KSPROPERTY_TYPE_SET;
- Node.NodeId = m_NodeId;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), pFECRate, sizeof(BinaryConvolutionCodeRate), &BytesReturned);
-
-#ifdef BDAPLGIN_TRACE
- WCHAR Buffer[100];
- swprintf(Buffer, L"CBDADigitalDemodulator::put_OuterFECRate: hr %lx,
BytesReturned %lu\n", hr, BytesReturned);
+ // setup request
+ Node.NodeId = m_NodeId;
+ Node.Reserved = 0;
+
+ // perform request
+ hr = m_pProperty->Set(KSPROPSETID_BdaDigitalDemodulator,
KSPROPERTY_BDA_OUTER_FEC_RATE, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY),
pFECRate, sizeof(BinaryConvolutionCodeRate));
+
+#ifdef BDAPLGIN_TRACE
+ WCHAR Buffer[100];
+ swprintf(Buffer, L"CBDADigitalDemodulator::put_OuterFECRate: hr %lx\n",
hr);
OutputDebugStringW(Buffer);
#endif
@@ -267,20 +252,17 @@
{
KSP_NODE Node;
HRESULT hr;
- ULONG BytesReturned;
-
- // setup request
- Node.Property.Set = KSPROPSETID_BdaDigitalDemodulator;
- Node.Property.Id = KSPROPERTY_BDA_SYMBOL_RATE;
- Node.Property.Flags = KSPROPERTY_TYPE_TOPOLOGY | KSPROPERTY_TYPE_SET;
- Node.NodeId = m_NodeId;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), pSymbolRate, sizeof(ULONG), &BytesReturned);
-
-#ifdef BDAPLGIN_TRACE
- WCHAR Buffer[100];
- swprintf(Buffer, L"CBDADigitalDemodulator::put_SymbolRate: hr %lx, BytesReturned
%lu\n", hr, BytesReturned);
+
+ // setup request
+ Node.NodeId = m_NodeId;
+ Node.Reserved = 0;
+
+ // perform request
+ hr = m_pProperty->Set(KSPROPSETID_BdaDigitalDemodulator,
KSPROPERTY_BDA_SYMBOL_RATE, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY),
pSymbolRate, sizeof(ULONG));
+
+#ifdef BDAPLGIN_TRACE
+ WCHAR Buffer[100];
+ swprintf(Buffer, L"CBDADigitalDemodulator::put_SymbolRate: hr %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
@@ -300,20 +282,17 @@
{
KSP_NODE Node;
HRESULT hr;
- ULONG BytesReturned;
-
- // setup request
- Node.Property.Set = KSPROPSETID_BdaDigitalDemodulator;
- Node.Property.Id = KSPROPERTY_BDA_SPECTRAL_INVERSION;
- Node.Property.Flags = KSPROPERTY_TYPE_TOPOLOGY | KSPROPERTY_TYPE_SET;
- Node.NodeId = m_NodeId;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), pSpectralInversion, sizeof(SpectralInversion), &BytesReturned);
-
-#ifdef BDAPLGIN_TRACE
- WCHAR Buffer[100];
- swprintf(Buffer, L"CBDADigitalDemodulator::put_SpectralInversion: hr %lx,
BytesReturned %lu\n", hr, BytesReturned);
+
+ // setup request
+ Node.NodeId = m_NodeId;
+ Node.Reserved = 0;
+
+ // perform request
+ hr = m_pProperty->Set(KSPROPSETID_BdaDigitalDemodulator,
KSPROPERTY_BDA_SPECTRAL_INVERSION, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY),
pSpectralInversion, sizeof(SpectralInversion));
+
+#ifdef BDAPLGIN_TRACE
+ WCHAR Buffer[100];
+ swprintf(Buffer, L"CBDADigitalDemodulator::put_SpectralInversion: hr
%lx\n", hr);
OutputDebugStringW(Buffer);
#endif
@@ -331,13 +310,13 @@
HRESULT
WINAPI
CBDADigitalDemodulator_fnConstructor(
- HANDLE hFile,
+ IKsPropertySet * pProperty,
ULONG NodeId,
REFIID riid,
LPVOID * ppv)
{
// construct device control
- CBDADigitalDemodulator * handler = new CBDADigitalDemodulator(hFile, NodeId);
+ CBDADigitalDemodulator * handler = new CBDADigitalDemodulator(pProperty, NodeId);
#ifdef BDAPLGIN_TRACE
OutputDebugStringW(L"CBDADigitalDemodulator_fnConstructor\n");
Modified: trunk/reactos/dll/directx/bdaplgin/frequencyfilter.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/bdaplgin/frequ…
==============================================================================
--- trunk/reactos/dll/directx/bdaplgin/frequencyfilter.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/bdaplgin/frequencyfilter.cpp [iso-8859-1] Fri Mar 26
12:43:52 2010
@@ -48,12 +48,12 @@
HRESULT STDMETHODCALLTYPE put_FrequencyMultiplier(ULONG ulMultiplier);
HRESULT STDMETHODCALLTYPE get_FrequencyMultiplier(ULONG *pulMultiplier);
- CBDAFrequencyFilter(HANDLE hFile, ULONG NodeId) : m_Ref(0), m_hFile(hFile),
m_NodeId(NodeId){};
+ CBDAFrequencyFilter(IKsPropertySet * pProperty, ULONG NodeId) : m_Ref(0),
m_pProperty(pProperty), m_NodeId(NodeId){};
virtual ~CBDAFrequencyFilter(){};
protected:
LONG m_Ref;
- HANDLE m_hFile;
+ IKsPropertySet * m_pProperty;
ULONG m_NodeId;
};
@@ -86,6 +86,7 @@
swprintf(Buffer, L"CControlNode::QueryInterface: NoInterface for %s",
lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
+DebugBreak();
#endif
return E_NOINTERFACE;
@@ -112,20 +113,16 @@
KSP_NODE Node;
HRESULT hr;
- ULONG BytesReturned;
-
- // setup request
- Node.Property.Set = KSPROPSETID_BdaFrequencyFilter;
- Node.Property.Id = KSPROPERTY_BDA_RF_TUNER_FREQUENCY;
- Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
- Node.NodeId = m_NodeId;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), &ulFrequency, sizeof(ULONG), &BytesReturned);
-
-#ifdef BDAPLGIN_TRACE
- WCHAR Buffer[100];
- swprintf(Buffer, L"CBDAFrequencyFilter::put_Frequency: m_NodeId %lu hr %lx,
BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+ // setup request
+ Node.NodeId = m_NodeId;
+ Node.Reserved = 0;
+
+ // perform request
+ hr = m_pProperty->Set(KSPROPSETID_BdaFrequencyFilter,
KSPROPERTY_BDA_RF_TUNER_FREQUENCY, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY),
&ulFrequency, sizeof(ULONG));
+
+#ifdef BDAPLGIN_TRACE
+ WCHAR Buffer[100];
+ swprintf(Buffer, L"CBDAFrequencyFilter::put_Frequency: m_NodeId %lu hr
%lx\n", m_NodeId, hr);
OutputDebugStringW(Buffer);
#endif
@@ -145,20 +142,17 @@
{
KSP_NODE Node;
HRESULT hr;
- ULONG BytesReturned;
-
- // setup request
- Node.Property.Set = KSPROPSETID_BdaFrequencyFilter;
- Node.Property.Id = KSPROPERTY_BDA_RF_TUNER_POLARITY;
- Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
- Node.NodeId = m_NodeId;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), &Polarity, sizeof(Polarisation), &BytesReturned);
-
-#ifdef BDAPLGIN_TRACE
- WCHAR Buffer[100];
- swprintf(Buffer, L"CBDAFrequencyFilter::put_Polarity: m_NodeId %lu hr %lx,
BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+
+ // setup request
+ Node.NodeId = m_NodeId;
+ Node.Reserved = 0;
+
+ // perform request
+ hr = m_pProperty->Set(KSPROPSETID_BdaFrequencyFilter,
KSPROPERTY_BDA_RF_TUNER_POLARITY, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY),
&Polarity, sizeof(Polarisation));
+
+#ifdef BDAPLGIN_TRACE
+ WCHAR Buffer[100];
+ swprintf(Buffer, L"CBDAFrequencyFilter::put_Polarity: m_NodeId %lu hr
%lx\n", m_NodeId, hr);
OutputDebugStringW(Buffer);
#endif
@@ -178,20 +172,17 @@
{
KSP_NODE Node;
HRESULT hr;
- ULONG BytesReturned;
-
- // setup request
- Node.Property.Set = KSPROPSETID_BdaFrequencyFilter;
- Node.Property.Id = KSPROPERTY_BDA_RF_TUNER_RANGE;
- Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
- Node.NodeId = m_NodeId;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), &ulRange, sizeof(ULONG), &BytesReturned);
-
-#ifdef BDAPLGIN_TRACE
- WCHAR Buffer[100];
- swprintf(Buffer, L"CBDAFrequencyFilter::put_Polarity: m_NodeId %lu hr %lx,
BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+
+ // setup request
+ Node.NodeId = m_NodeId;
+ Node.Reserved = 0;
+
+ // perform request
+ hr = m_pProperty->Set(KSPROPSETID_BdaFrequencyFilter,
KSPROPERTY_BDA_RF_TUNER_RANGE, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY),
&ulRange, sizeof(ULONG));
+
+#ifdef BDAPLGIN_TRACE
+ WCHAR Buffer[100];
+ swprintf(Buffer, L"CBDAFrequencyFilter::put_Polarity: m_NodeId %lu hr
%lx\n", m_NodeId, hr);
OutputDebugStringW(Buffer);
#endif
@@ -211,20 +202,17 @@
{
KSP_NODE Node;
HRESULT hr;
- ULONG BytesReturned;
-
- // setup request
- Node.Property.Set = KSPROPSETID_BdaFrequencyFilter;
- Node.Property.Id = KSPROPERTY_BDA_RF_TUNER_BANDWIDTH;
- Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
- Node.NodeId = m_NodeId;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), &ulBandwidth, sizeof(ULONG), &BytesReturned);
-
-#ifdef BDAPLGIN_TRACE
- WCHAR Buffer[100];
- swprintf(Buffer, L"CBDAFrequencyFilter::put_Bandwidth: m_NodeId %lu hr %lx,
BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+
+ // setup request
+ Node.NodeId = m_NodeId;
+ Node.Reserved = 0;
+
+ // perform request
+ hr = m_pProperty->Set(KSPROPSETID_BdaFrequencyFilter,
KSPROPERTY_BDA_RF_TUNER_BANDWIDTH, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY),
&ulBandwidth, sizeof(ULONG));
+
+#ifdef BDAPLGIN_TRACE
+ WCHAR Buffer[100];
+ swprintf(Buffer, L"CBDAFrequencyFilter::put_Bandwidth: m_NodeId %lu hr
%lx\n", m_NodeId, hr);
OutputDebugStringW(Buffer);
#endif
@@ -243,20 +231,17 @@
{
KSP_NODE Node;
HRESULT hr;
- ULONG BytesReturned;
-
- // setup request
- Node.Property.Set = KSPROPSETID_BdaFrequencyFilter;
- Node.Property.Id = KSPROPERTY_BDA_RF_TUNER_FREQUENCY_MULTIPLIER;
- Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
- Node.NodeId = m_NodeId;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), &ulMultiplier, sizeof(ULONG), &BytesReturned);
-
-#ifdef BDAPLGIN_TRACE
- WCHAR Buffer[100];
- swprintf(Buffer, L"CBDAFrequencyFilter::put_FrequencyMultiplier: m_NodeId %lu hr
%lx, BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+
+ // setup request
+ Node.NodeId = m_NodeId;
+ Node.Reserved = 0;
+
+ // perform request
+ hr = m_pProperty->Set(KSPROPSETID_BdaFrequencyFilter,
KSPROPERTY_BDA_RF_TUNER_FREQUENCY_MULTIPLIER, &Node.NodeId,
sizeof(KSP_NODE)-sizeof(KSPROPERTY), &ulMultiplier, sizeof(ULONG));
+
+#ifdef BDAPLGIN_TRACE
+ WCHAR Buffer[100];
+ swprintf(Buffer, L"CBDAFrequencyFilter::put_FrequencyMultiplier: m_NodeId %lu hr
%lx\n", m_NodeId, hr);
OutputDebugStringW(Buffer);
#endif
@@ -273,13 +258,13 @@
HRESULT
WINAPI
CBDAFrequencyFilter_fnConstructor(
- HANDLE hFile,
+ IKsPropertySet* pProperty,
ULONG NodeId,
REFIID riid,
LPVOID * ppv)
{
// construct device control
- CBDAFrequencyFilter * handler = new CBDAFrequencyFilter(hFile, NodeId);
+ CBDAFrequencyFilter * handler = new CBDAFrequencyFilter(pProperty, NodeId);
#ifdef BDAPLGIN_TRACE
OutputDebugStringW(L"CBDAFrequencyFilter_fnConstructor\n");
Modified: trunk/reactos/dll/directx/bdaplgin/lnbinfo.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/bdaplgin/lnbin…
==============================================================================
--- trunk/reactos/dll/directx/bdaplgin/lnbinfo.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/bdaplgin/lnbinfo.cpp [iso-8859-1] Fri Mar 26 12:43:52 2010
@@ -43,12 +43,12 @@
HRESULT STDMETHODCALLTYPE put_HighLowSwitchFrequency(ULONG ulSwitchFrequency);
HRESULT STDMETHODCALLTYPE get_HighLowSwitchFrequency(ULONG *pulSwitchFrequency);
- CBDALNBInfo(HANDLE hFile, ULONG NodeId) : m_Ref(0), m_hFile(hFile),
m_NodeId(NodeId){};
+ CBDALNBInfo(IKsPropertySet *pProperty, ULONG NodeId) : m_Ref(0),
m_pProperty(pProperty), m_NodeId(NodeId){};
~CBDALNBInfo(){};
protected:
LONG m_Ref;
- HANDLE m_hFile;
+ IKsPropertySet * m_pProperty;
ULONG m_NodeId;
};
@@ -92,20 +92,17 @@
{
KSP_NODE Node;
HRESULT hr;
- ULONG BytesReturned;
// setup request
- Node.Property.Set = KSPROPSETID_BdaLNBInfo;
- Node.Property.Id = KSPROPERTY_BDA_LNB_LOF_LOW_BAND;
- Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
Node.NodeId = m_NodeId;
+ Node.Reserved = 0;
// perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), &ulLOFLow, sizeof(ULONG), &BytesReturned);
-
-#ifdef BDAPLGIN_TRACE
- WCHAR Buffer[100];
- swprintf(Buffer, L"CBDALNBInfo::put_LocalOscilatorFrequencyLowBand: m_NodeId %lu
hr %lx, BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+ hr = m_pProperty->Set(KSPROPSETID_BdaLNBInfo, KSPROPERTY_BDA_LNB_LOF_LOW_BAND,
&Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), &ulLOFLow, sizeof(LONG));
+
+#ifdef BDAPLGIN_TRACE
+ WCHAR Buffer[100];
+ swprintf(Buffer, L"CBDALNBInfo::put_LocalOscilatorFrequencyLowBand: m_NodeId %lu
hr %lx\n", m_NodeId, hr);
OutputDebugStringW(Buffer);
#endif
@@ -125,20 +122,17 @@
{
KSP_NODE Node;
HRESULT hr;
- ULONG BytesReturned;
// setup request
- Node.Property.Set = KSPROPSETID_BdaLNBInfo;
- Node.Property.Id = KSPROPERTY_BDA_LNB_LOF_HIGH_BAND;
- Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
Node.NodeId = m_NodeId;
+ Node.Reserved = 0;
// perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), &ulLOFHigh, sizeof(ULONG), &BytesReturned);
-
-#ifdef BDAPLGIN_TRACE
- WCHAR Buffer[100];
- swprintf(Buffer, L"CBDALNBInfo::put_LocalOscilatorFrequencyHighBand: m_NodeId
%lu hr %lx, BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+ hr = m_pProperty->Set(KSPROPSETID_BdaLNBInfo, KSPROPERTY_BDA_LNB_LOF_HIGH_BAND,
&Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), &ulLOFHigh, sizeof(ULONG));
+
+#ifdef BDAPLGIN_TRACE
+ WCHAR Buffer[100];
+ swprintf(Buffer, L"CBDALNBInfo::put_LocalOscilatorFrequencyHighBand: m_NodeId
%lu hr %lx\n", m_NodeId, hr);
OutputDebugStringW(Buffer);
#endif
@@ -158,20 +152,17 @@
{
KSP_NODE Node;
HRESULT hr;
- ULONG BytesReturned;
// setup request
- Node.Property.Set = KSPROPSETID_BdaLNBInfo;
- Node.Property.Id = KSPROPERTY_BDA_LNB_SWITCH_FREQUENCY;
- Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
Node.NodeId = m_NodeId;
+ Node.Reserved = 0;
// perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), &ulSwitchFrequency, sizeof(ULONG), &BytesReturned);
-
-#ifdef BDAPLGIN_TRACE
- WCHAR Buffer[100];
- swprintf(Buffer, L"CBDALNBInfo::put_HighLowSwitchFrequency: m_NodeId %lu hr %lx,
BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+ hr = m_pProperty->Set(KSPROPSETID_BdaLNBInfo, KSPROPERTY_BDA_LNB_SWITCH_FREQUENCY,
&Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), &ulSwitchFrequency,
sizeof(ULONG));
+
+#ifdef BDAPLGIN_TRACE
+ WCHAR Buffer[100];
+ swprintf(Buffer, L"CBDALNBInfo::put_HighLowSwitchFrequency: m_NodeId %lu hr
%lx\n", m_NodeId, hr);
OutputDebugStringW(Buffer);
#endif
@@ -188,13 +179,13 @@
HRESULT
WINAPI
CBDALNBInfo_fnConstructor(
- HANDLE hFile,
+ IKsPropertySet *pProperty,
ULONG NodeId,
REFIID riid,
LPVOID * ppv)
{
// construct device control
- CBDALNBInfo * handler = new CBDALNBInfo(hFile, NodeId);
+ CBDALNBInfo * handler = new CBDALNBInfo(pProperty, NodeId);
#ifdef BDAPLGIN_TRACE
OutputDebugStringW(L"CBDALNBInfo_fnConstructor\n");
Modified: trunk/reactos/dll/directx/bdaplgin/pincontrol.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/bdaplgin/pinco…
==============================================================================
--- trunk/reactos/dll/directx/bdaplgin/pincontrol.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/bdaplgin/pincontrol.cpp [iso-8859-1] Fri Mar 26 12:43:52
2010
@@ -76,7 +76,7 @@
reinterpret_cast<IBDA_PinControl*>(*Output)->AddRef();
return NOERROR;
}
-
+DebugBreak();
return E_NOINTERFACE;
}
//-------------------------------------------------------------------
@@ -251,6 +251,9 @@
if (!pUnkOuter)
return E_POINTER;
+
+ OutputDebugStringW(L"CBDAPinControl_fnConstructor\n");
+ //DebugBreak();
// query for IKsObject interface
hr = pUnkOuter->QueryInterface(IID_IKsObject, (void**)&pObject);
@@ -353,6 +356,13 @@
hr = E_UNEXPECTED;
}
}
+ else
+ {
+ WCHAR Buffer[100];
+ swprintf(Buffer, L"CBDAPinControl_fnConstructor failed to
register filter with %lx\n", hr);
+ OutputDebugStringW(Buffer);
+ DebugBreak();
+ }
}
}
}
Modified: trunk/reactos/dll/directx/bdaplgin/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/bdaplgin/preco…
==============================================================================
--- trunk/reactos/dll/directx/bdaplgin/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/bdaplgin/precomp.h [iso-8859-1] Fri Mar 26 12:43:52 2010
@@ -1,7 +1,7 @@
#ifndef PRECOMP_H__
#define PRECOMP_H__
-//#define BDAPLGIN_TRACE
+#define BDAPLGIN_TRACE
#define BUILDING_KS
#define _KSDDK_
#include <dshow.h>
@@ -67,7 +67,7 @@
HRESULT
WINAPI
CBDAFrequencyFilter_fnConstructor(
- HANDLE hFile,
+ IKsPropertySet * pProperty,
ULONG NodeId,
REFIID riid,
LPVOID * ppv);
@@ -77,7 +77,7 @@
HRESULT
WINAPI
CBDASignalStatistics_fnConstructor(
- HANDLE hFile,
+ IKsPropertySet * pProperty,
ULONG NodeId,
REFIID riid,
LPVOID * ppv);
@@ -87,7 +87,7 @@
HRESULT
WINAPI
CBDALNBInfo_fnConstructor(
- HANDLE hFile,
+ IKsPropertySet * pProperty,
ULONG NodeId,
REFIID riid,
LPVOID * ppv);
@@ -96,7 +96,7 @@
HRESULT
WINAPI
CBDADigitalDemodulator_fnConstructor(
- HANDLE hFile,
+ IKsPropertySet * pProperty,
ULONG NodeId,
REFIID riid,
LPVOID * ppv);
Modified: trunk/reactos/dll/directx/bdaplgin/signalstatistics.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/bdaplgin/signa…
==============================================================================
--- trunk/reactos/dll/directx/bdaplgin/signalstatistics.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/bdaplgin/signalstatistics.cpp [iso-8859-1] Fri Mar 26
12:43:52 2010
@@ -47,12 +47,12 @@
HRESULT STDMETHODCALLTYPE put_SampleTime(LONG lmsSampleTime);
HRESULT STDMETHODCALLTYPE get_SampleTime(LONG *plmsSampleTime);
- CBDASignalStatistics(HANDLE hFile, ULONG NodeId) : m_Ref(0), m_hFile(hFile),
m_NodeId(NodeId){};
+ CBDASignalStatistics(IKsPropertySet * pProperty, ULONG NodeId) : m_Ref(0),
m_pProperty(pProperty), m_NodeId(NodeId){};
~CBDASignalStatistics(){};
protected:
LONG m_Ref;
- HANDLE m_hFile;
+ IKsPropertySet * m_pProperty;
ULONG m_NodeId;
};
@@ -77,7 +77,6 @@
reinterpret_cast<IBDA_SignalStatistics*>(*Output)->AddRef();
return NOERROR;
}
-
return E_NOINTERFACE;
}
@@ -97,13 +96,13 @@
ULONG BytesReturned;
// setup request
- Node.Property.Set = KSPROPSETID_BdaSignalStats;
- Node.Property.Id = KSPROPERTY_BDA_SIGNAL_STRENGTH;
- Node.Property.Flags = KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_TOPOLOGY;
- Node.NodeId = (ULONG)-1;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), plDbStrength, sizeof(LONG), &BytesReturned);
+ Node.NodeId = (ULONG)-1;
+ Node.Reserved = 0;
+
+ assert(m_pProperty);
+
+ hr = m_pProperty->Get(KSPROPSETID_BdaSignalStats, KSPROPERTY_BDA_SIGNAL_STRENGTH,
&Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), plDbStrength, sizeof(LONG),
&BytesReturned);
+
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
@@ -130,13 +129,11 @@
ULONG BytesReturned;
// setup request
- Node.Property.Set = KSPROPSETID_BdaSignalStats;
- Node.Property.Id = KSPROPERTY_BDA_SIGNAL_QUALITY;
- Node.Property.Flags = KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_TOPOLOGY;
- Node.NodeId = (ULONG)-1;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), plPercentQuality, sizeof(LONG), &BytesReturned);
+ Node.NodeId = (ULONG)-1;
+ Node.Reserved = 0;
+
+ // perform request
+ hr = m_pProperty->Get(KSPROPSETID_BdaSignalStats, KSPROPERTY_BDA_SIGNAL_QUALITY,
&Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), plPercentQuality, sizeof(LONG),
&BytesReturned);
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
@@ -164,13 +161,12 @@
ULONG BytesReturned;
// setup request
- Node.Property.Set = KSPROPSETID_BdaSignalStats;
- Node.Property.Id = KSPROPERTY_BDA_SIGNAL_PRESENT;
- Node.Property.Flags = KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_TOPOLOGY;
- Node.NodeId = (ULONG)-1;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), &Present, sizeof(ULONG), &BytesReturned);
+ Node.NodeId = (ULONG)-1;
+ Node.Reserved = 0;
+
+ // perform request
+ hr = m_pProperty->Get(KSPROPSETID_BdaSignalStats, KSPROPERTY_BDA_SIGNAL_PRESENT,
&Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), &Present, sizeof(ULONG),
&BytesReturned);
+
// store result
*pfPresent = Present;
@@ -200,13 +196,12 @@
ULONG BytesReturned;
// setup request
- Node.Property.Set = KSPROPSETID_BdaSignalStats;
- Node.Property.Id = KSPROPERTY_BDA_SIGNAL_LOCKED;
- Node.Property.Flags = KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_TOPOLOGY;
- Node.NodeId = (ULONG)-1;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), &Locked, sizeof(ULONG), &BytesReturned);
+ Node.NodeId = (ULONG)-1;
+ Node.Reserved = 0;
+
+ // perform request
+ hr = m_pProperty->Get(KSPROPSETID_BdaSignalStats, KSPROPERTY_BDA_SIGNAL_LOCKED,
&Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), &Locked, sizeof(ULONG),
&BytesReturned);
+
*pfLocked = Locked;
#ifdef BDAPLGIN_TRACE
@@ -224,20 +219,17 @@
{
KSP_NODE Node;
HRESULT hr;
- ULONG BytesReturned;
-
- // setup request
- Node.Property.Set = KSPROPSETID_BdaSignalStats;
- Node.Property.Id = KSPROPERTY_BDA_SAMPLE_TIME;
- Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
- Node.NodeId = (ULONG)-1;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), &lmsSampleTime, sizeof(LONG), &BytesReturned);
-
-#ifdef BDAPLGIN_TRACE
- WCHAR Buffer[100];
- swprintf(Buffer, L"CBDASignalStatistics::put_SampleTime: m_NodeId %lu hr %lx,
BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+
+ // setup request
+ Node.NodeId = (ULONG)-1;
+ Node.Reserved = 0;
+
+ // perform request
+ hr = m_pProperty->Set(KSPROPSETID_BdaSignalStats, KSPROPERTY_BDA_SAMPLE_TIME,
&Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), &lmsSampleTime, sizeof(LONG));
+
+#ifdef BDAPLGIN_TRACE
+ WCHAR Buffer[100];
+ swprintf(Buffer, L"CBDASignalStatistics::put_SampleTime: m_NodeId %lu hr
%lx\n", m_NodeId, hr);
OutputDebugStringW(Buffer);
#endif
@@ -253,13 +245,11 @@
ULONG BytesReturned;
// setup request
- Node.Property.Set = KSPROPSETID_BdaSignalStats;
- Node.Property.Id = KSPROPERTY_BDA_SAMPLE_TIME;
- Node.Property.Flags = KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_TOPOLOGY;
- Node.NodeId = (ULONG)-1;
-
- // perform request
- hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), plmsSampleTime, sizeof(LONG), &BytesReturned);
+ Node.NodeId = (ULONG)-1;
+ Node.Reserved = 0;
+
+ // perform request
+ hr = m_pProperty->Get(KSPROPSETID_BdaSignalStats, KSPROPERTY_BDA_SAMPLE_TIME,
&Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), plmsSampleTime, sizeof(LONG),
&BytesReturned);
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
@@ -273,13 +263,13 @@
HRESULT
WINAPI
CBDASignalStatistics_fnConstructor(
- HANDLE hFile,
+ IKsPropertySet * pProperty,
ULONG NodeId,
REFIID riid,
LPVOID * ppv)
{
// construct device control
- CBDASignalStatistics * handler = new CBDASignalStatistics(hFile, NodeId);
+ CBDASignalStatistics * handler = new CBDASignalStatistics(pProperty, NodeId);
#ifdef BDAPLGIN_TRACE
OutputDebugStringW(L"CBDASignalStatistics_fnConstructor\n");