mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
getting ait after starting playback
This commit is contained in:
@@ -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();
|
||||
|
@@ -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();
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user