ReactOS  0.4.15-dev-1386-g5cb9f87
CScanningTunner Class Reference
Inheritance diagram for CScanningTunner:
Collaboration diagram for CScanningTunner:

Public Member Functions

STDMETHODIMP QueryInterface (REFIID InterfaceId, PVOID *Interface)
 
 STDMETHODIMP_ (ULONG) AddRef()
 
 STDMETHODIMP_ (ULONG) Release()
 
HRESULT STDMETHODCALLTYPE get_TuningSpace (ITuningSpace **TuningSpace)
 
HRESULT STDMETHODCALLTYPE put_TuningSpace (ITuningSpace *TuningSpace)
 
HRESULT STDMETHODCALLTYPE EnumTuningSpaces (IEnumTuningSpaces **ppEnum)
 
HRESULT STDMETHODCALLTYPE get_TuneRequest (ITuneRequest **TuneRequest)
 
HRESULT STDMETHODCALLTYPE put_TuneRequest (ITuneRequest *TuneRequest)
 
HRESULT STDMETHODCALLTYPE Validate (ITuneRequest *TuneRequest)
 
HRESULT STDMETHODCALLTYPE get_PreferredComponentTypes (IComponentTypes **ComponentTypes)
 
HRESULT STDMETHODCALLTYPE put_PreferredComponentTypes (IComponentTypes *ComponentTypes)
 
HRESULT STDMETHODCALLTYPE get_SignalStrength (long *Strength)
 
HRESULT STDMETHODCALLTYPE TriggerSignalEvents (long Interval)
 
HRESULT STDMETHODCALLTYPE SeekUp ()
 
HRESULT STDMETHODCALLTYPE SeekDown ()
 
HRESULT STDMETHODCALLTYPE ScanUp (long MillisecondsPause)
 
HRESULT STDMETHODCALLTYPE ScanDown (long MillisecondsPause)
 
HRESULT STDMETHODCALLTYPE AutoProgram ()
 
 CScanningTunner (std::vector< IUnknown * > &DeviceFilters)
 
virtual ~CScanningTunner ()
 
HRESULT STDMETHODCALLTYPE StartChanges ()
 
HRESULT STDMETHODCALLTYPE CommitChanges ()
 
HRESULT STDMETHODCALLTYPE CheckChanges ()
 
HRESULT STDMETHODCALLTYPE SetLnbInfo (IBDA_LNBInfo *pLnbInfo, ULONG ulLOFLow, ULONG ulLOFHigh, ULONG ulSwitchFrequency)
 
HRESULT STDMETHODCALLTYPE SetDigitalDemodulator (IBDA_DigitalDemodulator *pDigitalDemo, ModulationType ModType, FECMethod InnerFEC, BinaryConvolutionCodeRate InnerFECRate, FECMethod OuterFEC, BinaryConvolutionCodeRate OuterFECRate, ULONG SymbolRate)
 
HRESULT SetFrequency (IBDA_FrequencyFilter *pFrequency, ULONG FrequencyMultiplier, ULONG Frequency, Polarisation Polarity, ULONG Range, ULONG Bandwidth)
 
HRESULT STDMETHODCALLTYPE performDVBTTune (IDVBTuneRequest *pDVBTRequest, IDVBTLocator *pDVBTLocator)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Protected Attributes

LONG m_Ref
 
ITuningSpacem_TuningSpace
 
std::vector< IUnknown * > & m_DeviceFilters
 

Additional Inherited Members

- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 

Detailed Description

Definition at line 11 of file scanningtuner.cpp.

Constructor & Destructor Documentation

◆ CScanningTunner()

CScanningTunner::CScanningTunner ( std::vector< IUnknown * > &  DeviceFilters)
inline

Definition at line 51 of file scanningtuner.cpp.

51 : m_Ref(0), m_TuningSpace(0), m_DeviceFilters(DeviceFilters){};
std::vector< IUnknown * > & m_DeviceFilters
ITuningSpace * m_TuningSpace

◆ ~CScanningTunner()

virtual CScanningTunner::~CScanningTunner ( )
inlinevirtual

Definition at line 52 of file scanningtuner.cpp.

52 {};

Member Function Documentation

◆ AutoProgram()

HRESULT STDMETHODCALLTYPE CScanningTunner::AutoProgram ( )

Implements IScanningTuner.

Definition at line 277 of file scanningtuner.cpp.

278 {
279  OutputDebugStringW(L"CScanningTunner::AutoProgram : NotImplemented\n");
280  return E_NOTIMPL;
281 }
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
static const WCHAR L[]
Definition: oid.c:1250
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ CheckChanges()

HRESULT STDMETHODCALLTYPE CScanningTunner::CheckChanges ( void  )

Definition at line 421 of file scanningtuner.cpp.

422 {
423  ULONG Index;
424  HRESULT hResult = NOERROR;
425  IBDA_DeviceControl * pDeviceControl;
426 
427  for(Index = 0; Index < m_DeviceFilters.size(); Index++)
428  {
429  // get filter
430  IUnknown * pFilter = m_DeviceFilters[Index];
431 
432  if (!pFilter)
433  continue;
434 
435  // query for IBDA_DeviceControl interface
436  hResult = pFilter->QueryInterface(IID_IBDA_DeviceControl, (void**)&pDeviceControl);
437 
438  // sanity check
439  assert(hResult == NOERROR);
440 
441  //start changes
442  hResult = pDeviceControl->CheckChanges();
443 
444  // fix for unimplemented
445  if (hResult == E_NOTIMPL)
446  hResult = NOERROR;
447 
448  // release interface
449  pDeviceControl->Release();
450 
451  if (FAILED(hResult))
452  {
453  //shouldnt happen
454  break;
455  }
456  }
457  // done
458  return hResult;
459 }
#define NOERROR
Definition: winerror.h:2354
#define assert(x)
Definition: debug.h:53
std::vector< IUnknown * > & m_DeviceFilters
LONG HRESULT
Definition: typedefs.h:79
_In_ WDFCOLLECTION _In_ ULONG Index
nsrefcnt Release()
const GUID IID_IBDA_DeviceControl
#define E_NOTIMPL
Definition: ddrawi.h:99
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
unsigned int ULONG
Definition: retypes.h:1

Referenced by put_TuneRequest().

◆ CommitChanges()

HRESULT STDMETHODCALLTYPE CScanningTunner::CommitChanges ( void  )

Definition at line 463 of file scanningtuner.cpp.

464 {
465  ULONG Index;
466  HRESULT hResult = NOERROR;
467  IBDA_DeviceControl * pDeviceControl;
468 
469  for(Index = 0; Index < m_DeviceFilters.size(); Index++)
470  {
471  // get filter
472  IUnknown * pFilter = m_DeviceFilters[Index];
473 
474  if (!pFilter)
475  continue;
476 
477  // query for IBDA_DeviceControl interface
478  HRESULT hr = pFilter->QueryInterface(IID_IBDA_DeviceControl, (void**)&pDeviceControl);
479 
480  // sanity check
481  assert(hr == NOERROR);
482 
483  //start changes
484  hr = pDeviceControl->CommitChanges();
485 
486  // fix for unimplemented
487  if (hr == E_NOTIMPL)
488  hr = NOERROR;
489 
490  if (FAILED(hr))
491  {
492  pDeviceControl->StartChanges();
493  pDeviceControl->CommitChanges();
494  hResult = E_UNEXPECTED;
495  }
496 
497  // release interface
498  pDeviceControl->Release();
499 
500  }
501 
502  //done
503  return hResult;
504 }
HRESULT hr
Definition: shlfolder.c:183
#define NOERROR
Definition: winerror.h:2354
#define assert(x)
Definition: debug.h:53
std::vector< IUnknown * > & m_DeviceFilters
LONG HRESULT
Definition: typedefs.h:79
_In_ WDFCOLLECTION _In_ ULONG Index
nsrefcnt Release()
const GUID IID_IBDA_DeviceControl
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_UNEXPECTED
Definition: winerror.h:2456
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
unsigned int ULONG
Definition: retypes.h:1

Referenced by put_TuneRequest().

◆ EnumTuningSpaces()

HRESULT STDMETHODCALLTYPE CScanningTunner::EnumTuningSpaces ( IEnumTuningSpaces **  ppEnum)

Implements ITuner.

Definition at line 129 of file scanningtuner.cpp.

131 {
132  OutputDebugStringW(L"CScanningTunner::EnumTuningSpaces : NotImplemented\n");
133  return E_NOTIMPL;
134 }
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
static const WCHAR L[]
Definition: oid.c:1250
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ get_PreferredComponentTypes()

HRESULT STDMETHODCALLTYPE CScanningTunner::get_PreferredComponentTypes ( IComponentTypes **  ComponentTypes)

Implements ITuner.

Definition at line 205 of file scanningtuner.cpp.

207 {
208  OutputDebugStringW(L"CScanningTunner::get_PreferredComponentTypes : NotImplemented\n");
209  return E_NOTIMPL;
210 }
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
static const WCHAR L[]
Definition: oid.c:1250
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ get_SignalStrength()

HRESULT STDMETHODCALLTYPE CScanningTunner::get_SignalStrength ( long Strength)

Implements ITuner.

Definition at line 223 of file scanningtuner.cpp.

225 {
226  OutputDebugStringW(L"CScanningTunner::get_SignalStrength : NotImplemented\n");
227  return E_NOTIMPL;
228 }
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
static const WCHAR L[]
Definition: oid.c:1250
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ get_TuneRequest()

HRESULT STDMETHODCALLTYPE CScanningTunner::get_TuneRequest ( ITuneRequest **  TuneRequest)

Implements ITuner.

Definition at line 138 of file scanningtuner.cpp.

140 {
141  OutputDebugStringW(L"CScanningTunner::get_TuneRequest : NotImplemented\n");
142  return E_NOTIMPL;
143 }
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
static const WCHAR L[]
Definition: oid.c:1250
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ get_TuningSpace()

HRESULT STDMETHODCALLTYPE CScanningTunner::get_TuningSpace ( ITuningSpace **  TuningSpace)

Implements ITuner.

Definition at line 108 of file scanningtuner.cpp.

110 {
111  OutputDebugStringW(L"CScanningTunner::get_TuningSpace\n");
112 
113  *TuningSpace = m_TuningSpace;
114  return S_OK;
115 }
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
static const WCHAR L[]
Definition: oid.c:1250
ITuningSpace * m_TuningSpace
#define S_OK
Definition: intsafe.h:51

◆ performDVBTTune()

HRESULT STDMETHODCALLTYPE CScanningTunner::performDVBTTune ( IDVBTuneRequest pDVBTRequest,
IDVBTLocator pDVBTLocator 
)

Definition at line 286 of file scanningtuner.cpp.

289 {
290  HRESULT hr = S_OK;
291  ULONG Index;
292  IBDA_Topology *pTopo;
293  IUnknown *pNode;
294  IBDA_FrequencyFilter * pFrequency;
295  IBDA_LNBInfo * pLnbInfo;
296  IBDA_DigitalDemodulator *pDigitalDemo;
297  LONG BandWidth;
298  LONG Frequency;
299  LONG SymbolRate;
300  FECMethod InnerFEC, OuterFEC;
301  BinaryConvolutionCodeRate InnerFECRate, OuterFECRate;
302  ModulationType Modulation;
303 
304  pDVBTLocator->get_Bandwidth(&BandWidth);
305  pDVBTLocator->get_CarrierFrequency(&Frequency);
306  pDVBTLocator->get_InnerFEC(&InnerFEC);
307  pDVBTLocator->get_InnerFECRate(&InnerFECRate);
308  pDVBTLocator->get_Modulation(&Modulation);
309  pDVBTLocator->get_OuterFEC(&OuterFEC);
310  pDVBTLocator->get_OuterFECRate(&OuterFECRate);
311  pDVBTLocator->get_SymbolRate(&SymbolRate);
312 
313 
314  WCHAR Buffer[1000];
315  swprintf(Buffer, L"BandWidth %lu Frequency %lu Rate %lu InnerFEC %ld OuterFEC %ld InnerFECRate %ld OuterFECRate %ld Modulation %lu\n",
316  BandWidth, Frequency, SymbolRate, InnerFEC, OuterFEC, InnerFECRate, OuterFECRate, Modulation);
317 
319 
320 
321 
322  for(Index = 0; Index < m_DeviceFilters.size(); Index++)
323  {
324  // get device filter
325  IUnknown * pFilter = m_DeviceFilters[Index];
326 
327  if (!pFilter)
328  continue;
329 
330  hr = pFilter->QueryInterface(IID_IBDA_Topology, (void**)&pTopo);
331  // sanity check
332  assert(hr == NOERROR);
333 
334  pNode = NULL;
335  hr = pTopo->GetControlNode(0, 1, 0, &pNode); //HACK
336 
337  WCHAR Buffer[100];
338  swprintf(Buffer, L"CScanningTunner::performDVBTTune GetControlNode %lx\n", hr);
340 
341  if (FAILED(hr))
342  continue;
343 
344  // sanity check
345  assert(hr == NOERROR);
346  assert(pNode);
347 
348  hr = pNode->QueryInterface(IID_IBDA_FrequencyFilter, (void**)&pFrequency);
349 
350  swprintf(Buffer, L"CScanningTunner::performDVBTTune IID_IBDA_FrequencyFilter hr %lx\n", hr);
352 
353  // sanity check
354  assert(hr == NOERROR);
355 
356  hr = SetFrequency(pFrequency, 1000 /* FIXME */, Frequency, BDA_POLARISATION_NOT_DEFINED /* FIXME */, BDA_RANGE_NOT_SET /* FIXME */, BandWidth);
357 
358  swprintf(Buffer, L"CScanningTunner::performDVBTTune SetFrequency hr %lx\n", hr);
360 
361  //sanity check
362  assert(hr == NOERROR);
363 
364  // release interface
365  pFrequency->Release();
366 
367 
368  hr = pNode->QueryInterface(IID_IBDA_LNBInfo, (void**)&pLnbInfo);
369 
370  swprintf(Buffer, L"CScanningTunner::performDVBTTune IID_IBDA_LNBInfo hr %lx\n", hr);
372 
373  // sanity check
374  assert(hr == NOERROR);
375 
376  hr = SetLnbInfo(pLnbInfo, ULONG_MAX /* FIXME */, ULONG_MAX /* FIXME*/, ULONG_MAX /*FIXME*/);
377 
378 
379  swprintf(Buffer, L"CScanningTunner::performDVBTTune SetLnbInfo hr %lx\n", hr);
381 
382  // sanity check
383  assert(hr == NOERROR);
384 
385  // release interface
386  pLnbInfo->Release();
387 
388  hr = pNode->QueryInterface(IID_IBDA_DigitalDemodulator, (void**)&pDigitalDemo);
389 
390  swprintf(Buffer, L"CScanningTunner::performDVBTTune IID_IBDA_DigitalDemodulator hr %lx\n", hr);
392 
393  // sanity check
394  assert(hr == NOERROR);
395 
396  hr = SetDigitalDemodulator(pDigitalDemo, Modulation, InnerFEC, InnerFECRate, OuterFEC, OuterFECRate, SymbolRate);
397 
398  swprintf(Buffer, L"CScanningTunner::performDVBTTune SetDigitalDemodulator hr %lx\n", hr);
400 
401  // sanity check
402  assert(hr == NOERROR);
403 
404  // release interface
405  pDigitalDemo->Release();
406 
407  // release control node
408  pNode->Release();
409 
410  // release IBDA_Topology;
411  pTopo->Release();
412 
413  }
414  return hr;
415 }
#define BDA_RANGE_NOT_SET
Definition: bdatypes.h:31
FECMethod
Definition: bdatypes.h:253
HRESULT hr
Definition: shlfolder.c:183
#define NOERROR
Definition: winerror.h:2354
HRESULT get_InnerFEC([out] FECMethod *FEC)
#define assert(x)
Definition: debug.h:53
HRESULT get_InnerFECRate([out] BinaryConvolutionCodeRate *FEC)
HRESULT get_OuterFECRate([out] BinaryConvolutionCodeRate *FEC)
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
long LONG
Definition: pedump.c:60
HRESULT get_Modulation([out] ModulationType *Modulation)
HRESULT get_CarrierFrequency([out] long *Frequency)
ULONG Release()
std::vector< IUnknown * > & m_DeviceFilters
Definition: bufpool.h:45
HRESULT get_SymbolRate([out] long *Rate)
const GUID IID_IBDA_DigitalDemodulator
Definition: digitaldemo.cpp:13
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
_In_ WDFCOLLECTION _In_ ULONG Index
#define swprintf(buf, format,...)
Definition: sprintf.c:56
nsrefcnt Release()
static const WCHAR L[]
Definition: oid.c:1250
HRESULT STDMETHODCALLTYPE SetDigitalDemodulator(IBDA_DigitalDemodulator *pDigitalDemo, ModulationType ModType, FECMethod InnerFEC, BinaryConvolutionCodeRate InnerFECRate, FECMethod OuterFEC, BinaryConvolutionCodeRate OuterFECRate, ULONG SymbolRate)
BinaryConvolutionCodeRate
Definition: bdatypes.h:230
const GUID IID_IBDA_LNBInfo
Definition: lnbinfo.cpp:13
const GUID IID_IBDA_FrequencyFilter
ModulationType
Definition: bdatypes.h:261
#define S_OK
Definition: intsafe.h:51
HRESULT STDMETHODCALLTYPE SetLnbInfo(IBDA_LNBInfo *pLnbInfo, ULONG ulLOFLow, ULONG ulLOFHigh, ULONG ulSwitchFrequency)
#define NULL
Definition: types.h:112
static LARGE_INTEGER Frequency
Definition: clock.c:41
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
unsigned int ULONG
Definition: retypes.h:1
HRESULT get_OuterFEC([out] FECMethod *FEC)
HRESULT get_Bandwidth([out] long *BandWidthVal)
const GUID IID_IBDA_Topology
HRESULT SetFrequency(IBDA_FrequencyFilter *pFrequency, ULONG FrequencyMultiplier, ULONG Frequency, Polarisation Polarity, ULONG Range, ULONG Bandwidth)
#define ULONG_MAX
Definition: limits.h:44

Referenced by put_TuneRequest().

◆ put_PreferredComponentTypes()

HRESULT STDMETHODCALLTYPE CScanningTunner::put_PreferredComponentTypes ( IComponentTypes ComponentTypes)

Implements ITuner.

Definition at line 214 of file scanningtuner.cpp.

216 {
217  OutputDebugStringW(L"CScanningTunner::put_PreferredComponentTypes : NotImplemented\n");
218  return E_NOTIMPL;
219 }
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
static const WCHAR L[]
Definition: oid.c:1250
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ put_TuneRequest()

HRESULT STDMETHODCALLTYPE CScanningTunner::put_TuneRequest ( ITuneRequest TuneRequest)

Implements ITuner.

Definition at line 147 of file scanningtuner.cpp.

149 {
150  IDVBTuneRequest * pDVBTRequest;
151  ILocator *pLocator;
152  IDVBTLocator *pDVBTLocator;
153  HRESULT hr;
154 
155 
156  OutputDebugStringW(L"CScanningTunner::put_TuneRequest\n");
157 
158  // query for IDVBTuneRequest interface
159  hr = TuneRequest->QueryInterface(IID_IDVBTuneRequest, (void**)&pDVBTRequest);
160 
161  // sanity check
162  assert(hr == NOERROR);
163 
164  // get the IDVBTLocator
165  hr = pDVBTRequest->get_Locator((ILocator**)&pLocator);
166 
167  // sanity check
168  assert(hr == NOERROR);
169  assert(pLocator);
170 
171  hr = pLocator->QueryInterface(IID_ILocator, (void**)&pDVBTLocator);
172 
173  // sanity check
174  assert(hr == NOERROR);
175 
176 
177  StartChanges();
178  CommitChanges();
179  StartChanges();
180 
181  hr = performDVBTTune(pDVBTRequest, pDVBTLocator);
182 
183 
184  pDVBTLocator->Release();
185  pDVBTRequest->Release();
186 
187  CheckChanges();
188  CommitChanges();
189  StartChanges();
190 
191  return NOERROR;
192 }
HRESULT hr
Definition: shlfolder.c:183
#define NOERROR
Definition: winerror.h:2354
HRESULT STDMETHODCALLTYPE performDVBTTune(IDVBTuneRequest *pDVBTRequest, IDVBTLocator *pDVBTLocator)
#define assert(x)
Definition: debug.h:53
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
LONG HRESULT
Definition: typedefs.h:79
HRESULT STDMETHODCALLTYPE CheckChanges()
nsrefcnt Release()
static const WCHAR L[]
Definition: oid.c:1250
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
HRESULT STDMETHODCALLTYPE StartChanges()
HRESULT STDMETHODCALLTYPE CommitChanges()

◆ put_TuningSpace()

HRESULT STDMETHODCALLTYPE CScanningTunner::put_TuningSpace ( ITuningSpace TuningSpace)

Implements ITuner.

Definition at line 119 of file scanningtuner.cpp.

121 {
122  OutputDebugStringW(L"CScanningTunner::put_TuningSpace\n");
123  m_TuningSpace = TuningSpace;
124  return S_OK;
125 }
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
static const WCHAR L[]
Definition: oid.c:1250
ITuningSpace * m_TuningSpace
#define S_OK
Definition: intsafe.h:51

◆ QueryInterface()

HRESULT STDMETHODCALLTYPE CScanningTunner::QueryInterface ( REFIID  InterfaceId,
PVOID Interface 
)

Definition at line 68 of file scanningtuner.cpp.

71 {
72  if (IsEqualGUID(refiid, IID_IUnknown))
73  {
74  *Output = PVOID(this);
75  reinterpret_cast<IUnknown*>(*Output)->AddRef();
76  return NOERROR;
77  }
78  if (IsEqualGUID(refiid, IID_ITuner))
79  {
80  *Output = (ITuner*)(this);
81  reinterpret_cast<ITuner*>(*Output)->AddRef();
82  return NOERROR;
83  }
84 
85  if (IsEqualGUID(refiid, IID_IScanningTuner))
86  {
87  *Output = (IScanningTuner*)(this);
88  reinterpret_cast<IScanningTuner*>(*Output)->AddRef();
89  return NOERROR;
90  }
91 
94  StringFromCLSID(refiid, &lpstr);
95  swprintf(Buffer, L"CScanningTunner::QueryInterface: NoInterface for %s\n", lpstr);
98 
99 
100  return E_NOINTERFACE;
101 }
#define E_NOINTERFACE
Definition: winerror.h:2364
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
#define NOERROR
Definition: winerror.h:2354
static LPOLESTR
Definition: stg_prop.c:27
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
Definition: bufpool.h:45
void * PVOID
Definition: retypes.h:9
__wchar_t WCHAR
Definition: xmlstorage.h:180
const GUID IID_IUnknown
#define MAX_PATH
Definition: compat.h:34
#define swprintf(buf, format,...)
Definition: sprintf.c:56
static const WCHAR L[]
Definition: oid.c:1250
Definition: arc.h:85
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
static LPCSTR lpstr
Definition: font.c:51
HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
Definition: compobj.c:2412

◆ ScanDown()

HRESULT STDMETHODCALLTYPE CScanningTunner::ScanDown ( long  MillisecondsPause)

Implements IScanningTuner.

Definition at line 268 of file scanningtuner.cpp.

270 {
271  OutputDebugStringW(L"CScanningTunner::ScanDown : NotImplemented\n");
272  return E_NOTIMPL;
273 }
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
static const WCHAR L[]
Definition: oid.c:1250
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ScanUp()

HRESULT STDMETHODCALLTYPE CScanningTunner::ScanUp ( long  MillisecondsPause)

Implements IScanningTuner.

Definition at line 259 of file scanningtuner.cpp.

261 {
262  OutputDebugStringW(L"CScanningTunner::ScanUp : NotImplemented\n");
263  return E_NOTIMPL;
264 }
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
static const WCHAR L[]
Definition: oid.c:1250
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SeekDown()

HRESULT STDMETHODCALLTYPE CScanningTunner::SeekDown ( )

Implements IScanningTuner.

Definition at line 251 of file scanningtuner.cpp.

252 {
253  OutputDebugStringW(L"CScanningTunner::SeekDown : NotImplemented\n");
254  return E_NOTIMPL;
255 }
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
static const WCHAR L[]
Definition: oid.c:1250
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SeekUp()

HRESULT STDMETHODCALLTYPE CScanningTunner::SeekUp ( )

Implements IScanningTuner.

Definition at line 243 of file scanningtuner.cpp.

244 {
245  OutputDebugStringW(L"CScanningTunner::SeekUp : NotImplemented\n");
246  return E_NOTIMPL;
247 }
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
static const WCHAR L[]
Definition: oid.c:1250
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SetDigitalDemodulator()

HRESULT STDMETHODCALLTYPE CScanningTunner::SetDigitalDemodulator ( IBDA_DigitalDemodulator *  pDigitalDemo,
ModulationType  ModType,
FECMethod  InnerFEC,
BinaryConvolutionCodeRate  InnerFECRate,
FECMethod  OuterFEC,
BinaryConvolutionCodeRate  OuterFECRate,
ULONG  SymbolRate 
)

Definition at line 637 of file scanningtuner.cpp.

645 {
646  HRESULT hr;
647 
648  hr = pDigitalDemo->put_ModulationType(&ModType);
650  hr = NOERROR;
651 
652  if (FAILED(hr))
653  return hr;
654 
655  hr = pDigitalDemo->put_InnerFECMethod(&InnerFEC);
657  hr = NOERROR;
658  if (FAILED(hr))
659  return hr;
660 
661  hr = pDigitalDemo->put_InnerFECRate(&InnerFECRate);
663  hr = NOERROR;
664  if (FAILED(hr))
665  return hr;
666 
667  hr = pDigitalDemo->put_OuterFECMethod(&OuterFEC);
669  hr = NOERROR;
670  if (FAILED(hr))
671  return hr;
672 
673  hr = pDigitalDemo->put_OuterFECRate(&OuterFECRate);
675  hr = NOERROR;
676  if (FAILED(hr))
677  return hr;
678 
679  hr = pDigitalDemo->put_SymbolRate(&SymbolRate);
681  hr = NOERROR;
682  if (FAILED(hr))
683  return hr;
684 
686  hr = pDigitalDemo->put_SpectralInversion(&Inversion);
688  hr = NOERROR;
689 
690  return hr;
691 }
HRESULT hr
Definition: shlfolder.c:183
#define NOERROR
Definition: winerror.h:2354
#define MAKE_HRESULT(sev, fac, code)
Definition: dmerror.h:30
LONG HRESULT
Definition: typedefs.h:79
#define SEVERITY_ERROR
Definition: winerror.h:65
#define FACILITY_WIN32
Definition: winerror.h:27
#define ERROR_NOT_FOUND
Definition: winerror.h:690
SpectralInversion
Definition: bdatypes.h:244
#define ERROR_SET_NOT_FOUND
Definition: winerror.h:692

Referenced by performDVBTTune().

◆ SetFrequency()

HRESULT CScanningTunner::SetFrequency ( IBDA_FrequencyFilter pFrequency,
ULONG  FrequencyMultiplier,
ULONG  Frequency,
Polarisation  Polarity,
ULONG  Range,
ULONG  Bandwidth 
)

Definition at line 599 of file scanningtuner.cpp.

606 {
607  HRESULT hr;
608 
609  hr = pFrequency->put_FrequencyMultiplier(FrequencyMultiplier);
610  if (FAILED(hr))
611  return hr;
612 
613  hr = pFrequency->put_Frequency(Frequency);
614  if (FAILED(hr))
615  return hr;
616 
617  hr = pFrequency->put_Polarity(Polarity);
619  hr = NOERROR;
620 
621  if (FAILED(hr))
622  return hr;
623 
624  hr = pFrequency->put_Range(Range);
626  hr = NOERROR;
627 
628  if (FAILED(hr))
629  return hr;
630 
631  hr = pFrequency->put_Bandwidth(Bandwidth);
632  return hr;
633 }
HRESULT hr
Definition: shlfolder.c:183
HRESULT put_Bandwidth([in] ULONG ulBandwidth)
#define NOERROR
Definition: winerror.h:2354
HRESULT put_FrequencyMultiplier([in] ULONG ulMultiplier)
#define MAKE_HRESULT(sev, fac, code)
Definition: dmerror.h:30
LONG HRESULT
Definition: typedefs.h:79
#define SEVERITY_ERROR
Definition: winerror.h:65
HRESULT put_Polarity([in] Polarisation Polarity)
HRESULT put_Range([in] ULONG ulRange)
Definition: range.c:39
#define FACILITY_WIN32
Definition: winerror.h:27
#define ERROR_NOT_FOUND
Definition: winerror.h:690
static LARGE_INTEGER Frequency
Definition: clock.c:41
HRESULT put_Frequency([in] ULONG ulFrequency)

Referenced by performDVBTTune().

◆ SetLnbInfo()

HRESULT STDMETHODCALLTYPE CScanningTunner::SetLnbInfo ( IBDA_LNBInfo pLnbInfo,
ULONG  ulLOFLow,
ULONG  ulLOFHigh,
ULONG  ulSwitchFrequency 
)

Definition at line 569 of file scanningtuner.cpp.

574 {
575  HRESULT hr;
576 
577  hr = pLnbInfo->put_LocalOscillatorFrequencyLowBand(ulLOFLow);
579  hr = NOERROR;
580 
581  if (FAILED(hr))
582  return hr;
583 
584  hr = pLnbInfo->put_LocalOscillatorFrequencyHighBand(ulLOFHigh);
586  hr = NOERROR;
587 
588  if (FAILED(hr))
589  return hr;
590 
591  hr = pLnbInfo->put_HighLowSwitchFrequency(ulSwitchFrequency);
593  hr = NOERROR;
594 
595  return hr;
596 }
HRESULT hr
Definition: shlfolder.c:183
#define NOERROR
Definition: winerror.h:2354
#define MAKE_HRESULT(sev, fac, code)
Definition: dmerror.h:30
LONG HRESULT
Definition: typedefs.h:79
#define SEVERITY_ERROR
Definition: winerror.h:65
#define FACILITY_WIN32
Definition: winerror.h:27
#define ERROR_NOT_FOUND
Definition: winerror.h:690
#define ERROR_SET_NOT_FOUND
Definition: winerror.h:692
HRESULT put_HighLowSwitchFrequency([in] ULONG ulSwitchFrequency)

Referenced by performDVBTTune().

◆ StartChanges()

HRESULT STDMETHODCALLTYPE CScanningTunner::StartChanges ( void  )

Definition at line 508 of file scanningtuner.cpp.

509 {
510  ULONG Index;
511  IBDA_DeviceControl * pDeviceControl;
512 
513  for(Index = 0; Index < m_DeviceFilters.size(); Index++)
514  {
515  // get filter
516  IUnknown * pFilter = m_DeviceFilters[Index];
517 
518  if (!pFilter)
519  continue;
520 
521  // query for IBDA_DeviceControl interface
522  HRESULT hr = pFilter->QueryInterface(IID_IBDA_DeviceControl, (void**)&pDeviceControl);
523 
524  // sanity check
525  assert(hr == NOERROR);
526 
527  //start changes
528  hr = pDeviceControl->StartChanges();
529 
530  // release interface
531  pDeviceControl->Release();
532 
533  // fix for unimplemented
534  if (hr == E_NOTIMPL)
535  hr = NOERROR;
536 
537  if (FAILED(hr))
538  return hr;
539 
540  }
541 
542  // now commit the changes
543  for(Index = 0; Index < m_DeviceFilters.size(); Index++)
544  {
545  // get filter
546  IUnknown * pFilter = m_DeviceFilters[Index];
547 
548  if (!pFilter)
549  continue;
550 
551  // query for IBDA_DeviceControl interface
552  HRESULT hr = pFilter->QueryInterface(IID_IBDA_DeviceControl, (void**)&pDeviceControl);
553 
554  // sanity check
555  assert(hr == NOERROR);
556 
557  hr = pDeviceControl->CommitChanges();
558 
559  // release interface
560  pDeviceControl->Release();
561  }
562 
563  // done
564  return NOERROR;
565 }
HRESULT hr
Definition: shlfolder.c:183
#define NOERROR
Definition: winerror.h:2354
#define assert(x)
Definition: debug.h:53
std::vector< IUnknown * > & m_DeviceFilters
LONG HRESULT
Definition: typedefs.h:79
_In_ WDFCOLLECTION _In_ ULONG Index
nsrefcnt Release()
const GUID IID_IBDA_DeviceControl
#define E_NOTIMPL
Definition: ddrawi.h:99
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
unsigned int ULONG
Definition: retypes.h:1

Referenced by put_TuneRequest().

◆ STDMETHODIMP_() [1/2]

CScanningTunner::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 16 of file scanningtuner.cpp.

17  {
19  return m_Ref;
20  }
#define InterlockedIncrement
Definition: armddk.h:53

◆ STDMETHODIMP_() [2/2]

CScanningTunner::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 21 of file scanningtuner.cpp.

22  {
24  if (!m_Ref)
25  {
26  delete this;
27  return 0;
28  }
29  return m_Ref;
30  }
#define InterlockedDecrement
Definition: armddk.h:52

◆ TriggerSignalEvents()

HRESULT STDMETHODCALLTYPE CScanningTunner::TriggerSignalEvents ( long  Interval)

Implements ITuner.

Definition at line 232 of file scanningtuner.cpp.

234 {
235  OutputDebugStringW(L"CScanningTunner::TriggerSignalEvents : NotImplemented\n");
236  return E_NOTIMPL;
237 }
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
static const WCHAR L[]
Definition: oid.c:1250
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Validate()

HRESULT STDMETHODCALLTYPE CScanningTunner::Validate ( ITuneRequest TuneRequest)

Implements ITuner.

Definition at line 196 of file scanningtuner.cpp.

198 {
199  OutputDebugStringW(L"CScanningTunner::Validate : NotImplemented\n");
200  return E_NOTIMPL;
201 }
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
static const WCHAR L[]
Definition: oid.c:1250
#define E_NOTIMPL
Definition: ddrawi.h:99

Member Data Documentation

◆ m_DeviceFilters

std::vector<IUnknown*>& CScanningTunner::m_DeviceFilters
protected

Definition at line 63 of file scanningtuner.cpp.

Referenced by CheckChanges(), CommitChanges(), performDVBTTune(), and StartChanges().

◆ m_Ref

LONG CScanningTunner::m_Ref
protected

Definition at line 61 of file scanningtuner.cpp.

Referenced by STDMETHODIMP_().

◆ m_TuningSpace

ITuningSpace* CScanningTunner::m_TuningSpace
protected

Definition at line 62 of file scanningtuner.cpp.

Referenced by get_TuningSpace(), and put_TuningSpace().


The documentation for this class was generated from the following file: