getting ait after starting playback

This commit is contained in:
TangoCash
2021-09-25 19:39:22 +02:00
committed by Thilo Graf
parent 7b4a536f62
commit 4009bd2a68
4 changed files with 17 additions and 13 deletions

View File

@@ -50,8 +50,9 @@ private:
bool Read();
public:
CAit(int dnum = 0);
CAit();
~CAit();
void setDemux(int dnum = 0);
bool Start();
bool Stop();
bool Parse();

View File

@@ -19,6 +19,7 @@
#include <zapit/bouquets.h>
#include <zapit/femanager.h>
#include <zapit/fastscan.h>
#include <zapit/scanait.h>
#define PAL 0
#define NTSC 1
@@ -167,7 +168,7 @@ class CZapit : public OpenThreads::Thread
t_channel_id lastChannelTV;
int abort_zapit;
int pmt_update_fd;
CAit *ait;
//void LoadAudioMap();
void SaveAudioMap();
void SaveVolumeMap();

View File

@@ -37,10 +37,15 @@
#define DEBUG_AIT_UNUSED
#define DEBUG_LCN
CAit::CAit(int dnum)
CAit::CAit()
{
dmxnum = 0;
pid = 0;
}
void CAit::setDemux(int dnum)
{
dmxnum = dnum;
pid = 0;
}
bool CAit::Start()
@@ -222,6 +227,7 @@ bool CAit::Parse()
}
if (pFile)
fclose(pFile);
sections.clear();
return true;
}
@@ -232,8 +238,7 @@ bool CAit::Parse(CZapitChannel * const channel)
unlink("/tmp/ait.txt");
if(pid > 0)
{
Parse();
return true;
return Start();
}
return false;
}

View File

@@ -45,7 +45,6 @@
#include <zapit/getservices.h>
#include <zapit/pat.h>
#include <zapit/scanpmt.h>
#include <zapit/scanait.h>
#include <zapit/scan.h>
//#include <zapit/fastscan.h>
#include <zapit/scansdt.h>
@@ -142,6 +141,7 @@ CZapit::CZapit()
pip_channel_id = 0;
lock_channel_id = 0;
pip_fe = NULL;
ait = new CAit();
}
CZapit::~CZapit()
@@ -490,7 +490,6 @@ bool CZapit::ParsePatPmt(CZapitChannel * channel)
CPat pat(channel->getRecordDemux());
CPmt pmt(channel->getRecordDemux());
CAit ait(channel->getRecordDemux());
DBG("looking up pids for channel_id " PRINTF_CHANNEL_ID_TYPE "\n", channel->getChannelID());
if(!pat.Parse(channel)) {
@@ -501,11 +500,6 @@ bool CZapit::ParsePatPmt(CZapitChannel * channel)
printf("[zapit] pmt parsing failed\n");
return false;
}
if (channel == current_channel)
if(!ait.Parse(channel)) {
printf("[zapit] ait parsing failed\n");
}
return true;
}
@@ -670,6 +664,9 @@ bool CZapit::ZapIt(const t_channel_id channel_id, bool forupdate, bool startplay
if (update_pmt)
pmt_set_update_filter(current_channel, &pmt_update_fd);
ait->setDemux(current_channel->getRecordDemux());
ait->Parse(current_channel);
return true;
}