neutrino: wait a little bit to decode CI channel before starting record

Origin commit data
------------------
Commit: bdcd66db67
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-03-24 (Tue, 24 Mar 2020)

Origin message was:
------------------
- neutrino: wait a little bit to decode CI channel before starting record
This commit is contained in:
vanhofen
2020-03-24 22:25:05 +01:00
parent 537dc811b6
commit 456622f30d
5 changed files with 23 additions and 0 deletions

View File

@@ -4031,7 +4031,26 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
if(g_settings.ci_rec_zapto){
CZapitChannel * ch = CServiceManager::getInstance()->FindChannel(eventinfo->channel_id);
if (ch && ch->bUseCI && (eventinfo->channel_id != live_channel_id))
{
zapTo(eventinfo->channel_id);
CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, LOCALE_CI_TRY_DECODE);
hintBox.paint();
int t = time_monotonic();
while (videoDecoder->getBlank())
{
usleep(100);
if (time_monotonic() - t > 15)
{
// can't decode channel within 15 seconds
break;
}
}
g_RCInput->clearRCMsg();
hintBox.hide();
}
}
if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) {
CRecordManager::getInstance()->Record(eventinfo);