diff options
author | Dimitar Petrovski <dimeptr@gmail.com> | 2012-05-17 14:15:55 +0200 |
---|---|---|
committer | Dimitar Petrovski <dimeptr@gmail.com> | 2012-05-17 14:15:55 +0200 |
commit | 3a1c661a2573115e965161f78688c633a92dd10b (patch) | |
tree | d278f3f6bbd6d87124bc6826a938a68885110fbc | |
parent | d83f0216f4eee94ea6f945cc1fab83a5e93b8303 (diff) | |
download | vdr-plugin-eepg-3a1c661a2573115e965161f78688c633a92dd10b.tar.gz vdr-plugin-eepg-3a1c661a2573115e965161f78688c633a92dd10b.tar.bz2 |
removed EIT filter for NA since it should be done by epg-handler
modified indentation
-rw-r--r-- | eepg.c | 2 | ||||
-rw-r--r-- | epghandler.c | 132 | ||||
-rw-r--r-- | epghandler.h | 38 |
3 files changed, 87 insertions, 85 deletions
@@ -3672,7 +3672,9 @@ void cFilterEEPG::ProcessNextFormat (bool FirstTime = false) AddFilter (pid, 0xb0); //perhaps TID is equal to first data byte? break; case DISH_BEV: +#if APIVERSNUM < 10726 AddFilter (EIT_PID, 0, 0); // event info, actual(0x4e)/other(0x4f) TS, present/following +#endif AddFilter (0x0300, 0, 0); // Dish Network EEPG event info, actual(0x4e)/other(0x4f) TS, present/following AddFilter (0x0441, 0, 0); // Dish Network EEPG event info, actual(0x4e)/other(0x4f) TS, present/following // AddFilter (0x0441, 0x50, 0xf0); // Bell ExpressVU EEPG diff --git a/epghandler.c b/epghandler.c index 36aaf74..29f092b 100644 --- a/epghandler.c +++ b/epghandler.c @@ -5,122 +5,122 @@ * Author: d.petrovski */ -#if APIVERSNUM > 10725 #include "epghandler.h" +#if APIVERSNUM > 10725 #include "log.h" cEEpgHandler::cEEpgHandler() { - // TODO Auto-generated constructor stub - LogD(4, prep("cEEpgHandler()")); + // TODO Auto-generated constructor stub + LogD(4, prep("cEEpgHandler()")); } cEEpgHandler::~cEEpgHandler() { - // TODO Auto-generated destructor stub + // TODO Auto-generated destructor stub } bool cEEpgHandler::HandleEitEvent(cSchedule* Schedule, - const SI::EIT::Event* EitEvent, uchar TableID, uchar Version) { - //LogD(1, prep("HandleEitEvent")); - return false; -// return true; + const SI::EIT::Event* EitEvent, uchar TableID, uchar Version) { + //LogD(1, prep("HandleEitEvent")); + return false; + // return true; } bool cEEpgHandler::SetEventID(cEvent* Event, tEventID EventID) { - Event->SetEventID(EventID); - return true; + Event->SetEventID(EventID); + return true; } bool cEEpgHandler::SetTitle(cEvent* Event, const char* Title) { - LogD(3, prep("Event id:%d title:%s new title:%s"), Event->EventID(), Event->Title(), Title); + LogD(3, prep("Event id:%d title:%s new title:%s"), Event->EventID(), Event->Title(), Title); - if (!Event->Title() || Title && (!strcmp(Event->Title(),"") || (strcmp(Title,"") && strcmp(Event->Title(),Title)))) - Event->SetTitle(Title); - return true; + if (!Event->Title() || Title && (!strcmp(Event->Title(),"") || (strcmp(Title,"") && strcmp(Event->Title(),Title)))) + Event->SetTitle(Title); + return true; } bool cEEpgHandler::SetShortText(cEvent* Event, const char* ShortText) { - LogD(3, prep("Event id:%d ShortText:%s new ShortText:%s"), Event->EventID(), Event->ShortText(), ShortText); - - if (Event->ShortText() && strcmp(Event->ShortText(),"") != 0) { - origShortText = std::string(Event->ShortText()); - } - else { - origShortText.clear(); - } - - //if (!Event->ShortText() || ShortText && (!strcmp(Event->ShortText(),"") || (strcmp(ShortText,"") && strcmp(Event->ShortText(),ShortText)))) - Event->SetShortText(ShortText); - return true; + LogD(3, prep("Event id:%d ShortText:%s new ShortText:%s"), Event->EventID(), Event->ShortText(), ShortText); + + if (Event->ShortText() && strcmp(Event->ShortText(),"") != 0) { + origShortText = std::string(Event->ShortText()); + } + else { + origShortText.clear(); + } + + //if (!Event->ShortText() || ShortText && (!strcmp(Event->ShortText(),"") || (strcmp(ShortText,"") && strcmp(Event->ShortText(),ShortText)))) + Event->SetShortText(ShortText); + return true; } bool cEEpgHandler::SetDescription(cEvent* Event, const char* Description) { - LogD(3, prep("Event id:%d Description:%s new Description:%s"), Event->EventID(), Event->Description(), Description); - - if (Event->Description() && strcmp(Event->Description(),"") != 0) - origDescription = Event->Description(); - else - origDescription.clear(); - - //if (!Event->Description() || Description && (!strcmp(Event->Description(),"") || (strcmp(Description,"") && strcmp(Event->Description(),Description)))) - Event->SetDescription(Description); - return true; + LogD(3, prep("Event id:%d Description:%s new Description:%s"), Event->EventID(), Event->Description(), Description); + + if (Event->Description() && strcmp(Event->Description(),"") != 0) + origDescription = Event->Description(); + else + origDescription.clear(); + + //if (!Event->Description() || Description && (!strcmp(Event->Description(),"") || (strcmp(Description,"") && strcmp(Event->Description(),Description)))) + Event->SetDescription(Description); + return true; } bool cEEpgHandler::SetContents(cEvent* Event, uchar* Contents) { - Event->SetContents(Contents); - return true; + Event->SetContents(Contents); + return true; } bool cEEpgHandler::SetParentalRating(cEvent* Event, int ParentalRating) { - Event->SetParentalRating(ParentalRating); - return true; + Event->SetParentalRating(ParentalRating); + return true; } bool cEEpgHandler::SetStartTime(cEvent* Event, time_t StartTime) { - Event->SetStartTime(StartTime); - return true; + Event->SetStartTime(StartTime); + return true; } bool cEEpgHandler::SetDuration(cEvent* Event, int Duration) { - Event->SetDuration(Duration); - return true; + Event->SetDuration(Duration); + return true; } bool cEEpgHandler::SetVps(cEvent* Event, time_t Vps) { - Event->SetVps(Vps); - return true; + Event->SetVps(Vps); + return true; } bool cEEpgHandler::HandleEvent(cEvent* Event) { - - LogD(3, prep("HandleEvent st:%s ost:%s desc:%s odesc:%s"),Event->ShortText(),origShortText.c_str(),Event->Description(),origDescription.c_str()); - - //After FixEpgBugs of cEvent set the original Short Text if empty - if (!Event->ShortText() || !strcmp(Event->ShortText(),"")) - Event->SetShortText(origShortText.c_str()); - - if (!Event->Description() && !origDescription.empty()) { - Event->SetDescription(origDescription.c_str()); - } - //TODO just to see the difference - //else if (!origDescription.empty() && !origDescription.compare(Event->Description())) { -// origDescription.append(" | EIT: "); -// origDescription.append(Event->Description()); -// Event->SetDescription(origDescription.c_str()); + + LogD(3, prep("HandleEvent st:%s ost:%s desc:%s odesc:%s"),Event->ShortText(),origShortText.c_str(),Event->Description(),origDescription.c_str()); + + //After FixEpgBugs of cEvent set the original Short Text if empty + if (!Event->ShortText() || !strcmp(Event->ShortText(),"")) + Event->SetShortText(origShortText.c_str()); + + if (!Event->Description() && !origDescription.empty()) { + Event->SetDescription(origDescription.c_str()); + } + //TODO just to see the difference + //else if (!origDescription.empty() && !origDescription.compare(Event->Description())) { + // origDescription.append(" | EIT: "); + // origDescription.append(Event->Description()); + // Event->SetDescription(origDescription.c_str()); // } - return true; + return true; } bool cEEpgHandler::SortSchedule(cSchedule* Schedule) { - Schedule->Sort(); - return true; + Schedule->Sort(); + return true; } bool cEEpgHandler::DropOutdated(cSchedule* Schedule, time_t SegmentStart, - time_t SegmentEnd, uchar TableID, uchar Version) { - return false; + time_t SegmentEnd, uchar TableID, uchar Version) { + return false; } #endif diff --git a/epghandler.h b/epghandler.h index 8d3615a..16dbca3 100644 --- a/epghandler.h +++ b/epghandler.h @@ -13,27 +13,27 @@ class cEEpgHandler : public cEpgHandler { public: - cEEpgHandler(); - virtual ~cEEpgHandler(); - virtual bool IgnoreChannel(const cChannel *Channel) { return false; } - virtual bool HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version); - virtual bool SetEventID(cEvent *Event, tEventID EventID); - virtual bool SetTitle(cEvent *Event, const char *Title); - virtual bool SetShortText(cEvent *Event, const char *ShortText); - virtual bool SetDescription(cEvent *Event, const char *Description); - virtual bool SetContents(cEvent *Event, uchar *Contents); - virtual bool SetParentalRating(cEvent *Event, int ParentalRating); - virtual bool SetStartTime(cEvent *Event, time_t StartTime); - virtual bool SetDuration(cEvent *Event, int Duration); - virtual bool SetVps(cEvent *Event, time_t Vps); - virtual bool FixEpgBugs(cEvent *Event) { return false; } - virtual bool HandleEvent(cEvent *Event); - virtual bool SortSchedule(cSchedule *Schedule); - virtual bool DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version); + cEEpgHandler(); + virtual ~cEEpgHandler(); + virtual bool IgnoreChannel(const cChannel *Channel) { return false; } + virtual bool HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version); + virtual bool SetEventID(cEvent *Event, tEventID EventID); + virtual bool SetTitle(cEvent *Event, const char *Title); + virtual bool SetShortText(cEvent *Event, const char *ShortText); + virtual bool SetDescription(cEvent *Event, const char *Description); + virtual bool SetContents(cEvent *Event, uchar *Contents); + virtual bool SetParentalRating(cEvent *Event, int ParentalRating); + virtual bool SetStartTime(cEvent *Event, time_t StartTime); + virtual bool SetDuration(cEvent *Event, int Duration); + virtual bool SetVps(cEvent *Event, time_t Vps); + virtual bool FixEpgBugs(cEvent *Event) { return false; } + virtual bool HandleEvent(cEvent *Event); + virtual bool SortSchedule(cSchedule *Schedule); + virtual bool DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version); private: - std::string origShortText; - std::string origDescription; + std::string origShortText; + std::string origDescription; }; #endif /*APIVERSNUM > 10725*/ |