Help - Search - Members - Calendar
Full Version: How to check if tuner is locked?
DVB Owners Discussion Forum - dvbowners.com > Technical & Development Forums > BDA Driver Development
chrosciu
Hello

I have next problem with my 'lovely' EasyWatch. After tune attempt I have to check if tuner is locked. Unfortunately BDA Sample doesn't provide functionality to do this so I used a piece of code (found somewhere in Web). It looks like this :

HRESULT CFGraph::CheckLock(BOOLEAN *Locked)
{

HRESULT hr;
CComPtr <IBDA_SignalStatistics> m_pSignalStatistics;
CComPtr <IBDA_Topology> m_pTopology;
CComPtr <IUnknown> m_pUnknown;

hr=m_pTunerDevice->QueryInterface(IID_IBDA_Topology, (void **) &m_pTopology);
if(FAILED(hr))
{

return hr;
}
hr=m_pTopology->GetControlNode(0, 1, 1, &m_pUnknown);
if(FAILED(hr))
{

return hr;
}
hr=m_pUnknown->QueryInterface(IID_IBDA_SignalStatistics,(void**) &m_pSignalStatistics);
if(FAILED(hr))
{

return hr;
}


hr=m_pSignalStatistics->get_SignalLocked(Locked);

return hr;
}

Function always returns S_OK but it also ALWAYS sets Locked variable to FALSE (which isn't true). How should I do to make it work correctly?
Thanks in advance for your answers

Chrosciu
nate
Unfortunatly not all drivers return proper signal values, but if you want to see how i've done it take a look at the ScanChannelsBDA source.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.