diff options
Diffstat (limited to 'patches/pre-vdr-2.1.x--epghandler-segment-transfer.patch')
-rw-r--r-- | patches/pre-vdr-2.1.x--epghandler-segment-transfer.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/patches/pre-vdr-2.1.x--epghandler-segment-transfer.patch b/patches/pre-vdr-2.1.x--epghandler-segment-transfer.patch new file mode 100644 index 0000000..8374a66 --- /dev/null +++ b/patches/pre-vdr-2.1.x--epghandler-segment-transfer.patch @@ -0,0 +1,65 @@ +--- ../vdr-2.0.2.plain//eit.c 2012-12-04 12:10:10.000000000 +0100 ++++ eit.c 2013-05-22 16:49:37.635027462 +0200 +@@ -46,6 +46,8 @@ + return; + } + ++ EpgHandlers.BeginSegmentTransfer(channel, OnlyRunningStatus); ++ + bool handledExternally = EpgHandlers.HandledExternally(channel); + cSchedule *pSchedule = (cSchedule *)Schedules->GetSchedule(channel, true); + +@@ -310,6 +312,7 @@ + Schedules->SetModified(pSchedule); + } + Channels.Unlock(); ++ EpgHandlers.EndSegmentTransfer(Modified, OnlyRunningStatus); + } + + // --- cTDT ------------------------------------------------------------------ +--- ../vdr-2.0.2.plain//epg.c 2013-02-17 15:12:07.000000000 +0100 ++++ epg.c 2013-05-22 16:50:29.043029281 +0200 +@@ -1537,3 +1537,19 @@ + } + Schedule->DropOutdated(SegmentStart, SegmentEnd, TableID, Version); + } ++ ++void cEpgHandlers::BeginSegmentTransfer(const cChannel *Channel, bool OnlyRunningStatus) ++{ ++ for (cEpgHandler *eh = First(); eh; eh = Next(eh)) { ++ if (eh->BeginSegmentTransfer(Channel, OnlyRunningStatus)) ++ return; ++ } ++} ++ ++void cEpgHandlers::EndSegmentTransfer(bool Modified, bool OnlyRunningStatus) ++{ ++ for (cEpgHandler *eh = First(); eh; eh = Next(eh)) { ++ if (eh->EndSegmentTransfer(Modified, OnlyRunningStatus)) ++ return; ++ } ++} +--- ../vdr-2.0.2.plain//epg.h 2012-09-24 14:53:53.000000000 +0200 ++++ epg.h 2013-05-22 16:50:16.867028850 +0200 +@@ -273,6 +273,12 @@ + virtual bool DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version) { return false; } + ///< Takes a look at all EPG events between SegmentStart and SegmentEnd and + ///< drops outdated events. ++ virtual bool BeginSegmentTransfer(const cChannel *Channel, bool OnlyRunningStatus) { return false; } ++ ///< called directly after IgnoreChannel before any other handler method called ++ ///< designed to give handlers the ossibility to prepare a transaction ++ virtual bool EndSegmentTransfer(bool Modified, bool OnlyRunningStatus) { return false; } ++ ///< called at last after the segment data is processed ++ ///< at this oint handlers should close/commt/rollback their transactions + }; + + class cEpgHandlers : public cList<cEpgHandler> { +@@ -295,6 +301,8 @@ + void HandleEvent(cEvent *Event); + void SortSchedule(cSchedule *Schedule); + void DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version); ++ void BeginSegmentTransfer(const cChannel *Channel, bool OnlyRunningStatus); ++ void EndSegmentTransfer(bool Modified, bool OnlyRunningStatus); + }; + + extern cEpgHandlers EpgHandlers; |