Bug #1634 » format-filter.patch
eepg.c | ||
---|---|---|
bool EndChannels, EndThemes; //only used for ??
|
||
int MHWStartTime; //only used for MHW1
|
||
bool ChannelsOk;
|
||
//int Format; //the format that this filter currently is processing
|
||
int Format; //the format that this filter currently is processing
|
||
std::map < int, int >ChannelSeq; // ChannelSeq[ChannelId] returns the recordnumber of the channel
|
||
Summary_t *Summaries[MAX_TITLES];
|
||
... | ... | |
void NextPmt (void);
|
||
void ProccessContinuous(u_short Pid, u_char Tid, int Length, const u_char *Data);
|
||
bool load_sky_file (const char *filename);
|
||
int sky_huffman_decode (const u_char * Data, int Length, unsigned char *DecodeText);
|
||
protected:
|
||
virtual void Process (u_short Pid, u_char Tid, const u_char * Data, int Length);
|
||
virtual void AddFilter (u_short Pid, u_char Tid);
|
||
... | ... | |
if (!On) {
|
||
FreeSummaries ();
|
||
FreeTitles ();
|
||
//Format = 0;
|
||
Format = 0;
|
||
ChannelsOk = false;
|
||
NumberOfTables = 0;
|
||
} else {
|
||
... | ... | |
* \param filename - Filename to load
|
||
* \return Success of operation
|
||
*/
|
||
static bool load_sky_file (const char *filename)
|
||
bool cFilterEEPG::load_sky_file (const char *filename)
|
||
{
|
||
FILE *FileDict;
|
||
char *Line;
|
||
... | ... | |
return NULL;
|
||
}
|
||
int sky_huffman_decode (const u_char * Data, int Length, unsigned char *DecodeText)
|
||
int cFilterEEPG::sky_huffman_decode (const u_char * Data, int Length, unsigned char *DecodeText)
|
||
{
|
||
sNodeH *nH, H=(Format==SKY_IT)?*sky_tables[0]:*sky_tables[1];
|
||
int i;
|
||
... | ... | |
* \brief Initialize the Huffman dictionaries if they are not already initialized.
|
||
*
|
||
*/
|
||
static cMutex InitDictionary_mutex;
|
||
bool cFilterEEPG::InitDictionary (void)
|
||
{
|
||
// This function must be serialised because it updates sky_tables and tables
|
||
// which are both globals.
|
||
cMutexLock MutexLock(&InitDictionary_mutex);
|
||
string FileName = cSetupEEPG::getInstance()->getConfDir();
|
||
switch (Format) {
|
||
case SKY_IT:
|
eit2.c | ||
---|---|---|
channel->SetLinkChannels (LinkChannels);
|
||
}
|
||
cEIT2::cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Data, bool isEITPid, bool OnlyRunningStatus)
|
||
cEIT2::cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Data, int Format_, bool isEITPid, bool OnlyRunningStatus)
|
||
: SI::EIT (Data, false)
|
||
, OnlyRunningStatus(OnlyRunningStatus)
|
||
, Schedules(Schedules)
|
||
, Format(Format_)
|
||
{
|
||
//LogD(2, prep("cEIT2::cEIT2"));
|
||
... | ... | |
}
|
||
//end of cEIT2
|
||
cEIT2::cEIT2 (cSchedule * Schedule)
|
||
cEIT2::cEIT2 (cSchedule * Schedule, int Format_)
|
||
: Empty(true)
|
||
, Modified(false)
|
||
, OnlyRunningStatus(false)
|
||
, SegmentStart(0)
|
||
, SegmentEnd(0)
|
||
, Schedules(NULL)
|
||
, Format(Format_)
|
||
{
|
||
//LogD(2, prep("cEIT2::cEIT2"));
|
||
// if (Tid > 0 && (Format == DISH_BEV || (SetupPE->ProcessEIT && isEITPid))) Tid--;
|
eit2.h | ||
---|---|---|
class cEIT2:public SI::EIT
|
||
{
|
||
public:
|
||
cEIT2(cSchedules * Schedules, int Source, u_char Tid, const u_char * Data, bool isEITPid = false,
|
||
cEIT2(cSchedules * Schedules, int Source, u_char Tid, const u_char * Data,
|
||
int Format_, bool isEITPid = false,
|
||
bool OnlyRunningStatus = false);
|
||
cEIT2 (cSchedule * Schedule);
|
||
cEIT2 (cSchedule * Schedule, int Format_);
|
||
//protected:
|
||
// void updateEquivalent(cSchedules * Schedules, tChannelID channelID, cEvent *pEvent);
|
||
cEvent* ProcessEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version);
|
||
... | ... | |
bool OnlyRunningStatus;
|
||
time_t SegmentStart;
|
||
time_t SegmentEnd;
|
||
int Format;
|
||
cSchedules* Schedules;
|
||
cChannel* channel;
|
||
epghandler.c | ||
---|---|---|
//DISH NID 0x1001 to 0x100B BEV 0x100 and 0x101
|
||
int nid = Schedule->ChannelID().Nid();
|
||
if ((nid >= 0x1001 && nid <= 0x100B) || nid == 0x101 || nid == 0x100) {
|
||
//Set the Format for Eit events so that the new lines are not erased with FixEpgBugs
|
||
if (Format != DISH_BEV) Format = DISH_BEV;
|
||
SI::cEIT2 eit2(Schedule);
|
||
//Set the Format to DISH_BEV for Eit events so that the new lines are not erased with FixEpgBugs
|
||
SI::cEIT2 eit2(Schedule, DISH_BEV);
|
||
eit2.ProcessEitEvent(Schedule, EitEvent, TableID, Version);
|
||
return true;
|
||
}
|
util.c | ||
---|---|---|
struct hufftab *tables[2][128];
|
||
int table_size[2][128];
|
||
EFormat Format;
|
||
cEquivHandler* EquivHandler;
|
||
cChannel *GetChannelByID(tChannelID & channelID, bool searchOtherPos)
|
util.h | ||
---|---|---|
extern int YesterdayEpoch;
|
||
extern int YesterdayEpochUTC;
|
||
extern enum EFormat
|
||
enum EFormat
|
||
{
|
||
//First all batchmode, load ONCE protocols:
|
||
MHW1 = 0,
|
||
... | ... | |
EIT,
|
||
//the highest number of EPG-formats that is supported by this plugin
|
||
HIGHEST_FORMAT = EIT
|
||
} Format;
|
||
};
|
||
extern cEquivHandler* EquivHandler;
|
||