From d44d94f3e7b108db1e348e25aafb161c742ce868 Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Fri, 3 Jun 2011 13:42:17 +0200 Subject: fix compile for VDR <= 1.7.11 --- eepg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eepg.c b/eepg.c index 5c37a34..2b6e7c8 100644 --- a/eepg.c +++ b/eepg.c @@ -2999,6 +2999,7 @@ extern bool SystemCharacterTableIsSingleByte;*/ } } break; +#if APIVERSNUM > 10711 case SI::ContentDescriptorTag:{ SI::ContentDescriptor *cd = (SI::ContentDescriptor *)d; SI::ContentDescriptor::Nibble Nibble; @@ -3013,6 +3014,7 @@ extern bool SystemCharacterTableIsSingleByte;*/ pEvent->SetContents(Contents); } break; +#endif case SI::ParentalRatingDescriptorTag:{ int LanguagePreferenceRating = -1; SI::ParentalRatingDescriptor *prd = (SI::ParentalRatingDescriptor *)d; -- cgit v1.2.3 From e7383edb0b991c6f3f185fbdf1b09cb485780b36 Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Tue, 19 Jul 2011 21:18:11 +0200 Subject: implementded eepg-0.0.6pre-freesat_huffman_decode.diff fixed include eepg_cEIT2.diff and patch thanks to Zoolook --- eepg.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/eepg.c b/eepg.c index 2b6e7c8..883bff6 100644 --- a/eepg.c +++ b/eepg.c @@ -331,7 +331,7 @@ bool cFilterEEPG::allowedEPG (tChannelID kanalID) */ #ifndef FREEVIEW_NO_SYSLOG -#include "../tools.h" +#include /* Logging via vdr */ #ifndef isyslog #define isyslog(a...) void( (SysLogLevel > 1) ? syslog_with_tid(LOG_INFO, a) : void() ) @@ -940,6 +940,18 @@ nextloop1: void decodeText2 (const unsigned char *from, int len, char *buffer, int buffsize) { + if (from[0] == 0x1f) { + char *temp = freesat_huffman_decode (from, len); + if (temp) { + len = strlen (temp); + len = len < buffsize - 1 ? len : buffsize - 1; + strncpy (buffer, temp, len); + buffer[len] = 0; + free (temp); + return; + } + } + SI::String convStr; SI::CharArray charArray; charArray.assign(from, len); @@ -2766,7 +2778,7 @@ extern bool SystemCharacterTableIsSingleByte;*/ class cEIT2:public SI::EIT { public: - cEIT2 (cSchedules::cSchedules * Schedules, int Source, u_char Tid, const u_char * Data, + cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Data, bool OnlyRunningStatus = false); #ifdef USE_NOEPG @@ -2795,7 +2807,7 @@ extern bool SystemCharacterTableIsSingleByte;*/ } #endif /* NOEPG */ - cEIT2::cEIT2 (cSchedules::cSchedules * Schedules, int Source, u_char Tid, const u_char * Data, bool OnlyRunningStatus) + cEIT2::cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Data, bool OnlyRunningStatus) : SI::EIT (Data, false) { if (!CheckCRCAndParse ()) return; -- cgit v1.2.3 From 27f9ad3da60c42a1b982929986d9f20eae9d0049 Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Thu, 3 Jan 2013 10:08:14 +0100 Subject: modified Makefile according to the new VDR version 1.7.35 style --- Makefile | 112 ++++++++++++++++++++++++++++++++------------------------------- eepg.c | 2 +- 2 files changed, 58 insertions(+), 56 deletions(-) diff --git a/Makefile b/Makefile index 49e8770..78911e9 100644 --- a/Makefile +++ b/Makefile @@ -28,58 +28,57 @@ PLUGIN = eepg VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g') -### The C++ compiler and options: +### The directory environment: -CXX ?= g++ -CXXFLAGS ?= -O2 -fPIC -Wall -Woverloaded-virtual +# Use package data if installed...otherwise assume we're under the VDR source directory: +PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc)) +LIBDIR = $(DESTDIR)$(call PKGCFG,libdir) +LOCDIR = $(DESTDIR)$(call PKGCFG,locdir) +PLGCFG = $(call PKGCFG,plgcfg) +# +TMPDIR ?= /tmp -### The directory environment: +### The compiler options: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +export CFLAGS = $(call PKGCFG,cflags) +export CXXFLAGS = $(call PKGCFG,cxxflags) -### Allow user defined options to overwrite defaults: +### The version number of VDR's plugin API: --include $(VDRDIR)/Make.config --include Make.config +APIVERSION = $(call PKGCFG,apiversion) -### The version number of VDR (taken from VDR's "config.h"): +### Allow user defined options to overwrite defaults: -VDRVERSION = $(shell sed -ne '/define VDRVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) -APIVERSION = $(shell sed -ne '/define APIVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) -ifeq ($(strip $(APIVERSION)),) - APIVERSION = $(VDRVERSION) -endif +-include $(PLGCFG) +-include Make.config ### The name of the distribution archive: ARCHIVE = $(PLUGIN)-$(VERSION) PACKAGE = vdr-$(ARCHIVE) +### The name of the shared object file: + +SOFILE = libvdr-$(PLUGIN).so + ### Includes and Defines (add further entries here): INCLUDES += -I$(VDRDIR)/include -DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' +DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' ### The object files (add further files here): OBJS = $(PLUGIN).o dish.o epghandler.o setupeepg.o equivhandler.o util.o eit2.o -ifdef DBG -CXXFLAGS += -g -endif +### The main target: -### Internationalization (I18N): +all: $(SOFILE) i18n -PODIR = po -I18Npot = $(PODIR)/$(PLUGIN).pot -I18Nmsgs = $(addprefix $(LOCALEDIR)/,$(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo,$(notdir $(foreach file, $(wildcard $(PODIR)/*.po), $(basename $(file)))))) -LOCALEDIR = $(VDRDIR)/locale +### Implicit rules: -### Default Target -default: $(OBJS) +%.o: %.c + $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $< ### Dependencies: @@ -90,47 +89,50 @@ $(DEPFILE): Makefile -include $(DEPFILE) -### Targets: - -TARGETS = libvdr-$(PLUGIN).so -ifneq ($(shell grep -l 'Phrases' $(VDRDIR)/i18n.c),$(VDRDIR)/i18n.c) -TARGETS += i18n -endif - -all: $(TARGETS) -.PHONY: i18n +### Internationalization (I18N): -%.o: %.c - $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $< +PODIR = po +I18Npo = $(wildcard $(PODIR)/*.po) +I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file)))) +I18Nmsgs = $(addprefix $(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file)))))) +I18Npot = $(PODIR)/$(PLUGIN).pot -libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ - @cp $@ $(LIBDIR)/$@.$(APIVERSION) +%.mo: %.po + msgfmt -c -o $@ $< -$(I18Npot): $(shell grep -rl '\(tr\|trNOOP\)(\".*\")' *.c $(SYSDIR)) - xgettext -C -cTRANSLATORS --no-wrap -F -k -ktr -ktrNOOP -o $@ $^ +$(I18Npot): $(wildcard *.c) + xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) --msgid-bugs-address='' -o $@ `ls $^` %.po: $(I18Npot) - msgmerge -U --no-wrap -F --backup=none -q $@ $< + msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $< @touch $@ -%.mo: %.po - msgfmt -c -o $@ $< +$(I18Nmsgs): $(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo + install -D -m644 $< $@ + +.PHONY: i18n +i18n: $(I18Nmo) $(I18Npot) + +install-i18n: $(I18Nmsgs) + +### Targets: + +$(SOFILE): $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ -$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo - @mkdir -p $(dir $@) - cp $< $@ +install-lib: $(SOFILE) + install -D $^ $(LIBDIR)/$^.$(APIVERSION) -i18n: $(I18Nmsgs) +install: install-lib install-i18n -dist: clean +dist: $(I18Npo) clean @-rm -rf $(TMPDIR)/$(ARCHIVE) @mkdir $(TMPDIR)/$(ARCHIVE) @cp -a * $(TMPDIR)/$(ARCHIVE) - @tar czf $(PACKAGE).tar.gz -C $(TMPDIR) $(ARCHIVE) + @tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE) @-rm -rf $(TMPDIR)/$(ARCHIVE) - @echo Distribution package created as $(PACKAGE).tar.gz + @echo Distribution package created as $(PACKAGE).tgz clean: - @-rm -f $(OBJS) $(DEPFILE) *.so *.tar.gz core* *~ -# @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot + @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot + @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ diff --git a/eepg.c b/eepg.c index cced41b..6f9e6a7 100644 --- a/eepg.c +++ b/eepg.c @@ -52,7 +52,7 @@ #include -#if APIVERSNUM < 10401 +#if defined(APIVERSNUM) && APIVERSNUM < 10401 #error You need at least VDR API version 1.4.1 for this plugin #endif #if APIVERSNUM < 10507 -- cgit v1.2.3 From 33a1abb417fd2107408fb16b7151f142a338d91f Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Sun, 27 Jan 2013 17:07:43 +0100 Subject: fix makefile since there is no po in master --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 78911e9..3348ece 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ OBJS = $(PLUGIN).o dish.o epghandler.o setupeepg.o equivhandler.o util.o eit2.o ### The main target: -all: $(SOFILE) i18n +all: $(SOFILE) ### Implicit rules: -- cgit v1.2.3 From 55dbd5a167d7fccd2ca8a67de8ce24543a5a8d3b Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Thu, 31 Jan 2013 08:40:42 +0100 Subject: Makefile again adapted to vdr-1.7.36. Closes #1234 --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 3348ece..637463f 100644 --- a/Makefile +++ b/Makefile @@ -32,8 +32,8 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri # Use package data if installed...otherwise assume we're under the VDR source directory: PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc)) -LIBDIR = $(DESTDIR)$(call PKGCFG,libdir) -LOCDIR = $(DESTDIR)$(call PKGCFG,locdir) +LIBDIR = $(call PKGCFG,libdir) +LOCDIR = $(call PKGCFG,locdir) PLGCFG = $(call PKGCFG,plgcfg) # TMPDIR ?= /tmp @@ -78,14 +78,14 @@ all: $(SOFILE) ### Implicit rules: %.o: %.c - $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $< + $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $< ### Dependencies: MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile - @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ + @$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ -include $(DEPFILE) @@ -94,7 +94,7 @@ $(DEPFILE): Makefile PODIR = po I18Npo = $(wildcard $(PODIR)/*.po) I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file)))) -I18Nmsgs = $(addprefix $(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file)))))) +I18Nmsgs = $(addprefix $(DESTDIR)$(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file)))))) I18Npot = $(PODIR)/$(PLUGIN).pot %.mo: %.po @@ -107,7 +107,7 @@ $(I18Npot): $(wildcard *.c) msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $< @touch $@ -$(I18Nmsgs): $(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo +$(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo install -D -m644 $< $@ .PHONY: i18n @@ -121,7 +121,7 @@ $(SOFILE): $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ install-lib: $(SOFILE) - install -D $^ $(LIBDIR)/$^.$(APIVERSION) + install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) install: install-lib install-i18n -- cgit v1.2.3 From 07d7e7edfc182082af61756ac31171bf76298a8c Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Thu, 31 Jan 2013 13:40:19 +0100 Subject: fix creating of new theme file if missing in eepg dir --- eepg.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/eepg.c b/eepg.c index 6f9e6a7..6bf997a 100644 --- a/eepg.c +++ b/eepg.c @@ -3446,6 +3446,7 @@ cPluginEEPG::cPluginEEPG (void) void cPluginEEPG::CheckCreateFile(const char* Name, const char *fileContent[]) { FILE *File; + bool isSkyTheme = fileContent == SkyItThemes || fileContent == SkyUkThemes; string FileName = string(cSetupEEPG::getInstance()->getConfDir()) + "/" + Name; File = fopen(FileName.c_str(), "r"); if (File == NULL) { @@ -3454,11 +3455,23 @@ void cPluginEEPG::CheckCreateFile(const char* Name, const char *fileContent[]) if (File == NULL) { LogE (0, prep("Error creating file '%s', %s"), FileName.c_str(), strerror (errno)); } else { - int i = 0; - while (fileContent[i] != NULL) { - fprintf (File, "%s\n", fileContent[i]); - i++; + if (!isSkyTheme) { + int i = 0; + while (fileContent[i] != NULL) { + fprintf (File, "%s\n", fileContent[i]); + i++; + } + } else { + for (int i = 0; i < 256; i++) { + if (fileContent[i]) { + fprintf (File, "0x%02x=%s\n", i, fileContent[i]); + } + else { + fprintf (File, "0x%02x=\n", i); + } + } } + LogI (0, prep("Success creating file '%s'"), FileName.c_str()); fclose (File); } -- cgit v1.2.3 From 5149d28a52c7e103ad1007494cb404a1d128bc1b Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Mon, 6 Jan 2014 20:34:15 +0100 Subject: fixed compile with VDR 2.1.3 --- eepg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eepg.c b/eepg.c index 6bf997a..3ac3e5e 100644 --- a/eepg.c +++ b/eepg.c @@ -3420,7 +3420,7 @@ private: struct { cFilterEEPG *filter; cDevice *device; - } epg[MAXDVBDEVICES]; + } epg[MAXDEVICES]; void CheckCreateFile(const char* Name, const char *fileContent[]); @@ -3485,7 +3485,7 @@ bool cPluginEEPG::Start (void) #if APIVERSNUM < 10507 RegisterI18n (Phrases); #endif - for (int i = 0; i < MAXDVBDEVICES; i++) { + for (int i = 0; i < MAXDEVICES; i++) { cDevice *dev = cDevice::GetDevice (i); if (dev) { epg[i].device = dev; @@ -3551,7 +3551,7 @@ bool cPluginEEPG::Start (void) void cPluginEEPG::Stop (void) { - for (int i = 0; i < MAXDVBDEVICES; i++) { + for (int i = 0; i < MAXDEVICES; i++) { cDevice *dev = epg[i].device; if (dev) dev->Detach (epg[i].filter); -- cgit v1.2.3 From 69b47ba4bf0195fd6820beb2cf4f7c7ea31f4011 Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Tue, 7 Jan 2014 19:13:51 +0100 Subject: Updated PKGCFG variable --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 637463f..c7b93d0 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri ### The directory environment: # Use package data if installed...otherwise assume we're under the VDR source directory: -PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc)) +PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell PKG_CONFIG_PATH="$$PKG_CONFIG_PATH:../../.." pkg-config --variable=$(1) vdr)) LIBDIR = $(call PKGCFG,libdir) LOCDIR = $(call PKGCFG,locdir) PLGCFG = $(call PKGCFG,plgcfg) -- cgit v1.2.3 From d7dc6141c91b48c410e9cc5734ca9a2adecc278e Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Mon, 14 Apr 2014 09:40:50 +0200 Subject: Move Format out of global scope, fixes #1634 and other problems with multiple devices. Thanks to cheesemonster --- README | 1 + eepg.c | 19 +++++++++++++------ eit2.c | 7 ++++--- eit2.h | 8 ++++++-- epghandler.c | 4 ++-- util.c | 1 - util.h | 4 ++-- 7 files changed, 28 insertions(+), 16 deletions(-) diff --git a/README b/README index edde5b7..6dee8d5 100644 --- a/README +++ b/README @@ -113,6 +113,7 @@ This code is based on: * cAddEventThread from EPGFixer plugin by Matti Lehtimaki matti.lehtimaki /at/ gmail.com Thanks to mrgandalf, and the others who helped map NA eit. Thanks to VDR User for testing and providing makequiv.sh script for S72.7W channels. +Thanks to cheesemonster for providing a patch to fix multipe device problems We wish to thank all authors for the great work they have been doing, decoding this EEPG data; this plugin tries to combine the best of all worlds. diff --git a/eepg.c b/eepg.c index 3ac3e5e..8573446 100644 --- a/eepg.c +++ b/eepg.c @@ -175,7 +175,7 @@ private: bool EndChannels, EndThemes; //only used for ?? int MHWStartTime; //only used for MHW1 bool ChannelsOk; - //int Format; //the format that this filter currently is processing + EFormat 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]; @@ -194,6 +194,8 @@ private: 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); @@ -258,7 +260,7 @@ void cFilterEEPG::SetStatus (bool On) if (!On) { FreeSummaries (); FreeTitles (); - //Format = 0; + Format = MHW1; ChannelsOk = false; NumberOfTables = 0; } else { @@ -422,7 +424,7 @@ static bool load_freesat_file (int tableid, const char *filename) * \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; @@ -646,7 +648,7 @@ char *freesat_huffman_decode (const unsigned char *src, size_t size) 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; @@ -793,8 +795,13 @@ bool cFilterEEPG::GetThemesSKYBOX (void) //TODO can't we read this from the DVB * \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: @@ -2729,7 +2736,7 @@ void cFilterEEPG::ProccessContinuous(u_short Pid, u_char Tid, int Length, const cSchedules *Schedules = (cSchedules*)(cSchedules::Schedules(SchedulesLock)); //Look for other satelite positions only if Dish/Bell ExpressVU for the moment hardcoded pid check if(Schedules) - SI::cEIT2 EIT(Schedules, Source(), Tid, Data, Pid == EIT_PID); + SI::cEIT2 EIT(Schedules, Source(), Tid, Data, Format, Pid == EIT_PID); else//cEIT EIT (Schedules, Source (), Tid, Data); { @@ -2740,7 +2747,7 @@ void cFilterEEPG::ProccessContinuous(u_short Pid, u_char Tid, int Length, const cSchedulesLock SchedulesLock; cSchedules *Schedules = (cSchedules*)(cSchedules::Schedules(SchedulesLock)); if(Schedules) - SI::cEIT2 EIT(Schedules, Source(), Tid, Data, Pid == EIT_PID, true); + SI::cEIT2 EIT(Schedules, Source(), Tid, Data, Format, Pid == EIT_PID, true); //cEIT EIT (Schedules, Source (), Tid, Data, true); } diff --git a/eit2.c b/eit2.c index 3980dba..4e813af 100644 --- a/eit2.c +++ b/eit2.c @@ -9,7 +9,6 @@ #include #include #include "log.h" -#include "util.h" #include "dish.h" #include "equivhandler.h" @@ -435,10 +434,11 @@ void cEIT2::ProcessEventDescriptors(bool ExternalData, int Source, 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, EFormat format, bool isEITPid, bool OnlyRunningStatus) : SI::EIT (Data, false) , OnlyRunningStatus(OnlyRunningStatus) , Schedules(Schedules) +, Format(format) { //LogD(2, prep("cEIT2::cEIT2")); @@ -563,13 +563,14 @@ cEIT2::cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Dat } //end of cEIT2 -cEIT2::cEIT2 (cSchedule * Schedule) +cEIT2::cEIT2 (cSchedule * Schedule, EFormat 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--; diff --git a/eit2.h b/eit2.h index 7686672..c85a9d3 100644 --- a/eit2.h +++ b/eit2.h @@ -4,7 +4,9 @@ #include #include #include +#include "util.h" +using namespace util; namespace SI { enum DescriptorTagExt { @@ -22,9 +24,10 @@ extern bool SystemCharacterTableIsSingleByte;*/ 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, + EFormat format, bool isEITPid = false, bool OnlyRunningStatus = false); - cEIT2 (cSchedule * Schedule); + cEIT2 (cSchedule * Schedule, EFormat format); //protected: // void updateEquivalent(cSchedules * Schedules, tChannelID channelID, cEvent *pEvent); cEvent* ProcessEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version); @@ -42,6 +45,7 @@ private: time_t SegmentStart; time_t SegmentEnd; cSchedules* Schedules; + EFormat Format; cChannel* channel; }; diff --git a/epghandler.c b/epghandler.c index 49c89e4..4b67fe3 100644 --- a/epghandler.c +++ b/epghandler.c @@ -34,9 +34,9 @@ bool cEEpgHandler::HandleEitEvent(cSchedule* Schedule, 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; + EFormat Format = DISH_BEV; - SI::cEIT2 eit2(Schedule); + SI::cEIT2 eit2(Schedule, Format); eit2.ProcessEitEvent(Schedule, EitEvent, TableID, Version); return true; } diff --git a/util.c b/util.c index 415f213..4fc0c48 100644 --- a/util.c +++ b/util.c @@ -26,7 +26,6 @@ int YesterdayEpochUTC; struct hufftab *tables[2][128]; int table_size[2][128]; -EFormat Format; cEquivHandler* EquivHandler; cChannel *GetChannelByID(tChannelID & channelID, bool searchOtherPos) diff --git a/util.h b/util.h index dec5b70..0113249 100644 --- a/util.h +++ b/util.h @@ -32,7 +32,7 @@ extern int Yesterday; extern int YesterdayEpoch; extern int YesterdayEpochUTC; -extern enum EFormat +enum EFormat { //First all batchmode, load ONCE protocols: MHW1 = 0, @@ -47,7 +47,7 @@ extern enum EFormat EIT, //the highest number of EPG-formats that is supported by this plugin HIGHEST_FORMAT = EIT -} Format; +}; extern cEquivHandler* EquivHandler; -- cgit v1.2.3 From 0223b8b98276b3f1c935325c9dcdf9b6484eb136 Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Mon, 14 Apr 2014 09:58:04 +0200 Subject: fix wrong merge conflicts --- Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Makefile b/Makefile index 320a63e..b07b767 100644 --- a/Makefile +++ b/Makefile @@ -102,15 +102,11 @@ OBJS = $(PLUGIN).o dish.o epghandler.o setupeepg.o equivhandler.o util.o eit2.o ### The main target: -<<<<<<< HEAD ifdef API1733 all: libvdr-$(PLUGIN).so i18n else all: $(SOFILE) i18n endif -======= -all: $(SOFILE) ->>>>>>> master ### Implicit rules: -- cgit v1.2.3