X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FCECProcessor.cpp;h=9f0274b491c1a29768d6b240757346cda4575e04;hb=765681fcfcf940773e7a255a342c06c00352fb10;hp=9cf771bda124bda87edc00b93e607c398e29cb6d;hpb=b47f66afc453fb3fdbad051aceb44941a49965ba;p=deb_libcec.git diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 9cf771b..9f0274b 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -1476,51 +1476,6 @@ const char *CCECProcessor::ToString(const cec_server_version version) } } -void *CCECBusScan::Process(void) -{ - CCECBusDevice *device(NULL); - uint8_t iCounter(0); - - while (!IsStopped()) - { - if (++iCounter < 10) - { - Sleep(1000); - continue; - } - for (unsigned int iPtr = 0; iPtr <= 11 && !IsStopped(); iPtr++) - { - device = m_processor->m_busDevices[iPtr]; - WaitUntilIdle(); - if (device && device->GetStatus(true) == CEC_DEVICE_STATUS_PRESENT) - { - WaitUntilIdle(); - if (!IsStopped()) - device->GetVendorId(); - - WaitUntilIdle(); - if (!IsStopped()) - device->GetPowerStatus(true); - } - } - } - - return NULL; -} - -void CCECBusScan::WaitUntilIdle(void) -{ - if (IsStopped()) - return; - - int32_t iWaitTime = 3000 - (int32_t)(GetTimeMs() - m_processor->GetLastTransmission()); - while (iWaitTime > 0) - { - Sleep(iWaitTime); - iWaitTime = 3000 - (int32_t)(GetTimeMs() - m_processor->GetLastTransmission()); - } -} - bool CCECProcessor::StartBootloader(const char *strPort /* = NULL */) { if (!m_communication && strPort)