summaryrefslogtreecommitdiff
path: root/eit.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-11-04 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-11-04 18:00:00 +0100
commit6e1fd835558b4e70ad94a280a209f050ec0f7a75 (patch)
treec7807d423152fecf6e7fd98aaa6fb69324238431 /eit.c
parent8465398c6d2a57bc30a07fb61353a7c8ba6db574 (diff)
downloadvdr-patch-lnbsharing-6e1fd835558b4e70ad94a280a209f050ec0f7a75.tar.gz
vdr-patch-lnbsharing-6e1fd835558b4e70ad94a280a209f050ec0f7a75.tar.bz2
Version 0.98vdr-0.98
- Completed storing the current audio volume in the setup.conf file (thanks to Andy Grobb). - Fixed closing the progress display with the "Back" key when in trick mode and Setup.ShowReplayMode is enabled (thanks to Stefan Huelswitt). - New SVDRP commands LSTR and DELR to list and delete recordings (thanks to Thomas Heiligenmann). - Fixed a crash when pressing the '2' button while replaying a DVD. - Updated 'channels.conf' for the "Bundesliga" channels of Premiere World (thanks to Mel Schächner). - Changed the tuning code to use FrontendInfo to detect the type of DVB card. - Removed the recursion stuff from cThread (cMutex already does this). - Fixed handling the repeat function in the channel display. - Avoiding multiple EPG entries for the same event (thanks to Rolf Hakenes for some valuable information on how to do this). - A recording on the primary interface can now be stopped to make it continue on an other free DVB card (if one is free at the moment). See MANUAL for details. - Added some missing teletext PIDs (thanks to Norbert Schmidt). - Added PTS to the converted PCM audio when replaying a DVD (thanks to Andreas Schultz). Now the audio and video of a DVD replayed over the DVB card's A/V out should always be in sync. - Fixed handling the "Power" key in case Setup.MinUserInactivity is set to 0 to disable automatic shutdown. - Added a fifth parameter to the 'shutdown' call that indicates the reason for this shutdown request (see INSTALL). - Fixed releasing 'index' memory after recording or playback. - Fixed ejecting a DVD while it is being replayed. - Removed all video overlay stuff from cDvbApi and SVDRP. Guido Fiala's new 'kvdr' version 0.4 now does these things itself. As a consequence of this you will now need to use kvdr 0.4 or later. - The device /dev/video is now opened only if necessary (to GRAB an image), allowing other programs (like 'kvdr', for instance) to use that device.
Diffstat (limited to 'eit.c')
-rw-r--r--eit.c37
1 files changed, 32 insertions, 5 deletions
diff --git a/eit.c b/eit.c
index 71ab54c..00792ab 100644
--- a/eit.c
+++ b/eit.c
@@ -16,7 +16,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: eit.c 1.28 2001/10/19 13:13:25 kls Exp $
+ * $Id: eit.c 1.29 2001/10/28 13:51:22 kls Exp $
***************************************************************************/
#include "eit.h"
@@ -189,6 +189,7 @@ cEventInfo::cEventInfo(unsigned short serviceid, unsigned short eventid)
bIsPresent = bIsFollowing = false;
lDuration = 0;
tTime = 0;
+ uTableID = 0;
uEventID = eventid;
uServiceID = serviceid;
nChannelNumber = 0;
@@ -231,6 +232,12 @@ bool cEventInfo::IsFollowing() const
{
return bIsFollowing;
}
+
+void cEventInfo::SetTableID(unsigned char tableid)
+{
+ uTableID = tableid;
+}
+
/** */
void cEventInfo::SetFollowing(bool foll)
{
@@ -246,6 +253,12 @@ const char * cEventInfo::GetDate() const
return szDate;
}
+
+const unsigned char cEventInfo::GetTableID(void) const
+{
+ return uTableID;
+}
+
/** */
const char * cEventInfo::GetTimeString() const
{
@@ -545,21 +558,26 @@ unsigned short cSchedule::GetServiceID() const
return uServiceID;
}
/** */
-const cEventInfo * cSchedule::GetEvent(unsigned short uEventID) const
+const cEventInfo * cSchedule::GetEvent(unsigned short uEventID, time_t tTime) const
{
+ // Returns either the event info with the given uEventID or, if that one can't
+ // be found, the one with the given tTime (or NULL if neither can be found)
cEventInfo *pe = Events.First();
+ cEventInfo *pt = NULL;
while (pe != NULL)
{
if (pe->GetEventID() == uEventID)
return pe;
+ if (tTime > 0 && pe->GetTime() == tTime) // 'tTime < 0' is apparently used with NVOD channels
+ pt = pe;
pe = Events.Next(pe);
}
- return NULL;
+ return pt;
}
/** */
-const cEventInfo * cSchedule::GetEvent(time_t tTime) const
+const cEventInfo * cSchedule::GetEventAround(time_t tTime) const
{
cEventInfo *pe = Events.First();
while (pe != NULL)
@@ -759,7 +777,7 @@ int cEIT::ProcessEIT(unsigned char *buffer)
if (!rEvent)
break;
}
- pEvent = (cEventInfo *)pSchedule->GetEvent((unsigned short)VdrProgramInfo->EventID);
+ pEvent = (cEventInfo *)pSchedule->GetEvent((unsigned short)VdrProgramInfo->EventID, VdrProgramInfo->StartTime);
if (!pEvent) {
// If we don't have that event ID yet, we create a new one.
// Otherwise we copy the information into the existing event anyway, because the data might have changed.
@@ -767,6 +785,14 @@ int cEIT::ProcessEIT(unsigned char *buffer)
pEvent = (cEventInfo *)pSchedule->GetEvent((unsigned short)VdrProgramInfo->EventID);
if (!pEvent)
break;
+ pEvent->SetTableID(tid);
+ }
+ else {
+ // We have found an existing event, either through its event ID or its start time.
+ // If the new event comes from a table that belongs to an "other TS" and the existing
+ // one comes from a "actual TS" table, lets skip it.
+ if ((tid == 0x4F || tid == 0x60) && (pEvent->GetTableID() == 0x4E || pEvent->GetTableID() == 0x50))
+ continue;
}
if (rEvent) {
pEvent->SetTitle(rEvent->GetTitle());
@@ -774,6 +800,7 @@ int cEIT::ProcessEIT(unsigned char *buffer)
pEvent->SetExtendedDescription(rEvent->GetExtendedDescription());
}
else {
+ pEvent->SetTableID(tid);
pEvent->SetTitle(VdrProgramInfo->ShortName);
pEvent->SetSubtitle(VdrProgramInfo->ShortText);
pEvent->SetExtendedDescription(VdrProgramInfo->ExtendedName);