Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: wrong entry in EPG - Update
On Monday 02 September 2002 11:02, Maxime GUILBOT wrote:
> Oliver Endriss wrote:
> >On Friday 30 August 2002 18:21, Maxime GUILBOT wrote:
> >>I'm french and I have the Canalsatellite demo. I know that on
> >> german channel, PROGRAMMES ALLEMANDS is displayed all day long.
> >> But I don't use the demo anymore, I'm using vdr, would you like me
> >> to power on again the canalsat demo ?
> >
> >Perhaps you could try this:
> >First tune to the channel 'La Cinquieme'.
> >Check the EPG for 'ZDF'. I guess you will see 'PROGRAMMES
> > ALLEMANDS'.
> >
> >Then *tune* to the channel 'ZDF'.
> >Do you see the German EPG?
> >Does the text 'PROGRAMMES ALLEMANDS' disappear?
> >
> >Oliver
>
> I try tune to the channel "France 5", I can see on epg, pressing the
> button 'PILOTE', and I can see "PROGRAMMES ALLEMANDS" on ZDF.
> Then, I tune to the channel ZDF and when I press PILOTE to see the
> ZDF nothing appear... (no epg info)
> So I tune on another channel, and check the epg, I can see
> 'PROGRAMMES ALLEMANDS' for ZDF.
> I think I've never seen any german epg on german channels, I only see
> 'PROGRAMMES ALLEMANDS'.
> Hope can help.
> Maxime.
Thanks. It seems that they display only French EPG info and ignore everything else.
That's not the way VDR should do :-)
For all that are interested:
I've prepared a patch (VDR 1.04) which changes EPG processing so that
EPG info from 'actual TS' has priority over EPG info from 'other TS'.
EPG data from actual TS is considered 'better' than EPG data from 'other TS'.
Therefore, the bogus data for ZDF will be suppressed as soon as you have
tuned to the ZDF transponder. If there is no EPG data on the 'actual TS' (e.g. TW1)
EPG data from 'other TS' is used. I Think this is the best we can do.
Oliver
----------------------------------- snip ------------------------------
diff -u vdr-1.0.4/eit.c vdr-1.0.4-patched/eit.c
--- vdr-1.0.4/eit.c Sat Apr 6 15:58:59 2002
+++ vdr-1.0.4-patched/eit.c Mon Sep 2 04:48:11 2002
@@ -605,18 +605,7 @@
{
// checking temporal sanity of present event (kls 2000-11-01)
time_t now = time(NULL);
-//XXX if (pPresent && !(pPresent->GetTime() <= now && now <= pPresent->GetTime() + pPresent->GetDuration()))
- {
- cEventInfo *pe = Events.First();
- while (pe != NULL)
- {
- if (pe->GetTime() <= now && now <= pe->GetTime() + pe->GetDuration())
- return pe;
- pe = Events.Next(pe);
- }
- }
- return NULL;//XXX
- return pPresent;
+ return GetEventAround(now);
}
/** */
const cEventInfo * cSchedule::GetFollowingEvent() const
@@ -624,24 +613,40 @@
// checking temporal sanity of following event (kls 2000-11-01)
time_t now = time(NULL);
const cEventInfo *pr = GetPresentEvent(); // must have it verified!
-if (pr)//XXX if (pFollowing && !(pr && pr->GetTime() + pr->GetDuration() <= pFollowing->GetTime()))
+
+ if (pr)//XXX if (pFollowing && !(pr && pr->GetTime() + pr->GetDuration() <= pFollowing->GetTime()))
{
- int minDt = INT_MAX;
- cEventInfo *pe = Events.First(), *pf = NULL;
+ int minDt = INT_MAX, minDtOtherTS = INT_MAX;
+ cEventInfo *pe = Events.First(), *pf = NULL, *pfOtherTS = NULL;
while (pe != NULL)
{
int dt = pe->GetTime() - now;
- if (dt > 0 && dt < minDt)
+ unsigned char tid = pe->GetTableID();
+
+ // find next events for 'other TS' and 'actual TS'
+ if (tid == 0x4f || (0x60 <= tid && tid <= 0x6f))
+ {
+ if (dt > 0 && dt < minDtOtherTS)
+ {
+ minDtOtherTS = dt;
+ pfOtherTS = pe;
+ }
+ }
+ else
{
- minDt = dt;
- pf = pe;
+ if (dt > 0 && dt < minDt)
+ {
+ minDt = dt;
+ pf = pe;
+ }
}
pe = Events.Next(pe);
}
- return pf;
+ // 'actual TS' has priority over 'other TS'
+ return (pf) ? pf : pfOtherTS;
}
return NULL;//XXX
- return pFollowing;
+ //return pFollowing;
}
/** */
void cSchedule::SetServiceID(unsigned short servid)
@@ -676,15 +681,24 @@
const cEventInfo * cSchedule::GetEventAround(time_t tTime) const
{
cEventInfo *pe = Events.First();
+ cEventInfo *peOtherTS = NULL;
+ unsigned char tid;
+
while (pe != NULL)
{
if (pe->GetTime() <= tTime && tTime <= pe->GetTime() + pe->GetDuration())
- return pe;
-
+ {
+ tid = pe->GetTableID();
+ // 'actual TS' has priority over 'other TS'
+ if (tid == 0x4f || (0x60 <= tid && tid <= 0x6f))
+ peOtherTS = pe; // 'other TS': continue
+ else
+ return pe; // 'actual TS': done
+ }
pe = Events.Next(pe);
}
- return NULL;
+ return peOtherTS;
}
/** */
bool cSchedule::SetPresentEvent(cEventInfo *pEvent)
diff -u vdr-1.0.4/menu.c vdr-1.0.4-patched/menu.c
--- vdr-1.0.4/menu.c Wed May 1 16:54:10 2002
+++ vdr-1.0.4-patched/menu.c Mon Sep 2 05:10:45 2002
@@ -1680,16 +1680,31 @@
if (pArray) {
time_t now = time(NULL);
int numreal = 0;
+ unsigned char tid;
+ bool foundActualTSEvent = false;
+
for (int a = 0; a < num; a++) {
const cEventInfo *EventInfo = Schedule->GetEventNumber(a);
- if (EventInfo->GetTime() + EventInfo->GetDuration() > now)
+ if (EventInfo->GetTime() + EventInfo->GetDuration() > now) {
+ tid = EventInfo->GetTableID();
+ if (tid == 0x4e || (0x50 <= tid && tid <= 0x5f))
+ foundActualTSEvent = true;
pArray[numreal++] = EventInfo;
+ }
}
qsort(pArray, numreal, sizeof(cEventInfo *), CompareEventTime);
- for (int a = 0; a < numreal; a++)
+ for (int a = 0; a < numreal; a++) {
+ if (foundActualTSEvent) {
+ // ignore events from 'other TS'
+ tid = pArray[a]->GetTableID();
+ if (tid == 0x4f || (0x60 <= tid && tid <= 0x6f))
+ continue;
+ }
Add(new cMenuScheduleItem(pArray[a]));
+ }
+
delete pArray;
}
}
----------------------------------- snip ------------------------------
Home |
Main Index |
Thread Index