diff -urx po orig-cvs/apps/tuxbox/enigma/lib/dvb/dvb.cpp tuxbox-cvs/apps/tuxbox/enigma/lib/dvb/dvb.cpp
--- orig-cvs/apps/tuxbox/enigma/lib/dvb/dvb.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/lib/dvb/dvb.cpp 2006-02-11 16:45:20.000000000 +0000
@@ -1000,7 +1000,7 @@
(i->first.getOriginalNetworkID() == onid) && // if service on this on
(i->first.getTransportStreamID() == tsid) && // and on this transponder (war das "first" hier wichtig?)
(i->first.getDVBNamespace() == dvbnamespace) && // and in this namespace
- (newServiceIds.find(i->first.getServiceID())==newServiceIds.end())) // but does not exist
+ (checkedServiceIds.find(i->first.getServiceID())==checkedServiceIds.end())) // but does not exist
{
for (std::map<int,eServiceReferenceDVB>::iterator m(channel_number.begin()); m != channel_number.end(); ++m)
if (i->first == m->second)
diff -urx po orig-cvs/apps/tuxbox/enigma/lib/dvb/epgcache.cpp tuxbox-cvs/apps/tuxbox/enigma/lib/dvb/epgcache.cpp
--- orig-cvs/apps/tuxbox/enigma/lib/dvb/epgcache.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/lib/dvb/epgcache.cpp 2006-02-09 17:42:22.000000000 +0000
@@ -462,7 +462,7 @@
time_t TM = parseDVBtime( eit_event->start_time_1, eit_event->start_time_2, eit_event->start_time_3, eit_event->start_time_4, eit_event->start_time_5);
time_t now = time(0)+eDVB::getInstance()->time_difference;
- if ( TM != 3599 && TM > -1)
+ if ( TM != 3599 /*&& TM > -1*/ )
{
switch(source)
{
@@ -514,10 +514,10 @@
goto next;
#endif
- if ( TM != 3599 && (TM+duration < now || TM > now+14*24*60*60) )
+ if ( TM != 3599 && (TM+duration < now || TM > now+14*24*60*60) && TM != -1 )
goto next;
- if ( now <= (TM+duration) || TM == 3599 /*NVOD Service*/ ) // old events should not be cached
+ if ( now <= (TM+duration) || TM == 3599 || TM == -1 /*NVOD Service*/ ) // old events should not be cached
{
#ifdef NVOD
// look in 1st descriptor tag.. i hope all time shifted events have the
@@ -538,6 +538,8 @@
#endif
__u16 event_id = HILO(eit_event->event_id);
// eDebug("event_id is %d sid is %04x", event_id, service.sid);
+ if (TM == -1)
+ eDebug("event_id is %04x sid is %04x tsid is %04x", event_id, service.sid, service.tsid);
eventData *evt = 0;
int ev_erase_count = 0;
@@ -570,6 +572,8 @@
else
{
tm_erase_count++;
+ if (TM == -1)
+ eDebug("tm_erase_count: %d", tm_erase_count);
// delete the found record from timemap
servicemap.second.erase(tm_it_tmp);
prevTimeIt=servicemap.second.end();
@@ -591,9 +595,11 @@
eventMap::iterator ev_it_tmp =
servicemap.first.find(tm_it->second->getEventID());
- if ( ev_it_tmp != servicemap.first.end() )
+ if ( (ev_it_tmp != servicemap.first.end()) && (TM != -1) )
{
ev_erase_count++;
+ if (TM == -1)
+ eDebug("ev_erase_count: %d", ev_erase_count);
// delete the found record from eventmap
servicemap.first.erase(ev_it_tmp);
prevEventIt=servicemap.first.end();
@@ -618,6 +624,8 @@
delete ev_it->second;
tm_it=prevTimeIt=servicemap.second.insert( prevTimeIt, std::pair<const time_t, eventData*>( TM, evt ) );
ev_it->second=evt;
+ if (TM == -1)
+ eDebug("Removed Event Data from TMmap");
}
else if (ev_erase_count > 0 && tm_erase_count == 0)
{
@@ -625,6 +633,8 @@
delete tm_it->second;
ev_it=prevEventIt=servicemap.first.insert( prevEventIt, std::pair<const __u16, eventData*>( event_id, evt) );
tm_it->second=evt;
+ if (TM == -1)
+ eDebug("Removed Event Data from EVmap");
}
else // added new eventData
{
@@ -633,6 +643,8 @@
#endif
prevEventIt=servicemap.first.insert( prevEventIt, std::pair<const __u16, eventData*>( event_id, evt) );
prevTimeIt=servicemap.second.insert( prevTimeIt, std::pair<const time_t, eventData*>( TM, evt ) );
+ if (TM == -1)
+ eDebug("Added Event Data");
}
#if EPG_DEBUG
if ( consistencyCheck )
@@ -826,7 +838,8 @@
bool updated=false;
for (timeMap::iterator It = DBIt->second.second.begin(); It != DBIt->second.second.end() && It->first < now;)
{
- if ( now > (It->first+It->second->getDuration()) ) // outdated normal entry (nvod references to)
+ //if ( now > (It->first+It->second->getDuration()) ) // outdated normal entry (nvod references to)
+ if ( (now > (It->first+It->second->getDuration())) && (It->second->getStartTime() != -1) )
{
// remove entry from eventMap
eventMap::iterator b(DBIt->second.first.find(It->second->getEventID()));
@@ -881,8 +894,8 @@
}
#endif
- if ( DBIt->second.second.size() == 1 )
- // less than two events for this service in cache..
+ if ( DBIt->second.second.size() < 3 )
+ // less than three events for this service in cache..
{
updateMap::iterator u = serviceLastUpdated.find(DBIt->first);
if ( u != serviceLastUpdated.end() )
diff -urx po orig-cvs/apps/tuxbox/enigma/lib/dvb/esection.cpp tuxbox-cvs/apps/tuxbox/enigma/lib/dvb/esection.cpp
--- orig-cvs/apps/tuxbox/enigma/lib/dvb/esection.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/lib/dvb/esection.cpp 2006-02-09 17:42:22.000000000 +0000
@@ -296,13 +296,13 @@
if ( ret != -2 && timer && section == -1 )
{
section=0;
- timer->start(10000, true);
+ timer->start(30000, true);
}
if (ret)
{
if ( ret == -2 && timer && timer->isActive() )
- timer->start(10000, true);
+ timer->start(30000, true);
return;
}
@@ -338,7 +338,7 @@
}
// when more data to read.. restart timeout..
if ( timer )
- timer->start(10000,true);
+ timer->start(30000,true);
}
}
diff -urx po orig-cvs/apps/tuxbox/enigma/lib/dvb/si.cpp tuxbox-cvs/apps/tuxbox/enigma/lib/dvb/si.cpp
--- orig-cvs/apps/tuxbox/enigma/lib/dvb/si.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/lib/dvb/si.cpp 2006-02-09 17:42:35.000000000 +0000
@@ -749,6 +749,7 @@
event_name=convertDVBUTF8((unsigned char*)data+ptr, len, table, tsidonid);
// filter newlines in ARD ShortEventDescriptor event_name
event_name.strReplace("\xc2\x8a",": ");
+ event_name.strReplace(" ", "intermission");
ptr+=len;
len=data[ptr++];
diff -urx po orig-cvs/apps/tuxbox/enigma/src/enigma_epg.cpp tuxbox-cvs/apps/tuxbox/enigma/src/enigma_epg.cpp
--- orig-cvs/apps/tuxbox/enigma/src/enigma_epg.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/src/enigma_epg.cpp 2006-02-11 21:26:14.000000000 +0000
@@ -340,6 +340,31 @@
LocalEventData led;
led.getLocalData(ev, &e->title, &description);
+
+ if (!e->title)
+ for (ePtrList<Descriptor>::iterator d(ev->descriptor); d != ev->descriptor.end(); ++d)
+ {
+ Descriptor *descriptor=*d;
+ if (descriptor->Tag()==DESCR_TIME_SHIFTED_EVENT)
+ {
+ eServiceReferenceDVB nvodService(
+ service.service.getDVBNamespace().get(),
+ service.service.getTransportStreamID().get(),
+ service.service.getOriginalNetworkID().get(),
+ ((TimeShiftedEventDescriptor*)descriptor)->reference_service_id,
+ service.service.getServiceType() );
+
+ EITEvent *evtmp = eEPGCache::getInstance()->lookupEvent(nvodService, ((TimeShiftedEventDescriptor*)descriptor)->reference_event_id );
+
+ if (evtmp)
+ {
+ led.getLocalData(evtmp, &e->title, &description);
+ delete evtmp;
+ break;
+ }
+ }
+ }
+
tm *begin=localtime(&ev->start_time);
while ( description[0] == ' ' )
description.erase(0);
diff -urx po orig-cvs/apps/tuxbox/enigma/src/enigma_event.cpp tuxbox-cvs/apps/tuxbox/enigma/src/enigma_event.cpp
--- orig-cvs/apps/tuxbox/enigma/src/enigma_event.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/src/enigma_event.cpp 2006-02-11 21:26:08.000000000 +0000
@@ -253,6 +253,25 @@
else if (led.language_exists(event,"eng"))
lang="eng";
+ EITEvent *orig = event;
+ for (ePtrList<Descriptor>::iterator d(event->descriptor); d != event->descriptor.end(); ++d)
+ {
+ if (d->Tag()==DESCR_TIME_SHIFTED_EVENT)
+ {
+ eServiceReferenceDVB nvodService(
+ ref.getDVBNamespace().get(),
+ ref.getTransportStreamID().get(),
+ ref.getOriginalNetworkID().get(),
+ ((TimeShiftedEventDescriptor*)*d)->reference_service_id,
+ ref.getServiceType() );
+
+ event = eEPGCache::getInstance()->lookupEvent(nvodService, ((TimeShiftedEventDescriptor*)*d)->reference_event_id );
+ if (!event)
+ event = orig;
+ break;
+ }
+ }
+
for (ePtrList<Descriptor>::iterator d(event->descriptor); d != event->descriptor.end(); ++d)
{
if (d->Tag()==DESCR_SHORT_EVENT)
@@ -284,6 +303,10 @@
_long_description+=ss->text;
}
}
+
+ if (event != orig)
+ event = orig;
+
if (!_title)
_title = _("no information is available");
if ( !ref.path )
diff -urx po orig-cvs/apps/tuxbox/enigma/src/enigma_main.cpp tuxbox-cvs/apps/tuxbox/enigma/src/enigma_main.cpp
--- orig-cvs/apps/tuxbox/enigma/src/enigma_main.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/src/enigma_main.cpp 2006-02-11 21:26:13.000000000 +0000
@@ -2024,6 +2024,10 @@
ButtonRedDis->hide();
ButtonRedEn->show();
isEPG = 1;
+
+ int cache=0;
+ if (eConfig::getInstance()->getKey("/ezap/osd/useEPGCache", cache));
+ gotEIT();
}
else
{
@@ -2209,6 +2213,184 @@
actual_eventDisplay->setList(eit?eit->events:dummy);
}
+int eZapMain::setEITcache()
+{
+ eDebug("eZapMain::setEITcache");
+ cur_event_text="";
+ int ret=0;
+
+ eServiceReferenceDVB &ref=(eServiceReferenceDVB&)eServiceInterface::getInstance()->service;
+
+ eEPGCache::getInstance()->Lock();
+ const timeMap* pMap = eEPGCache::getInstance()->getTimeMap(ref);
+
+ if (pMap)
+ {
+ timeMap::const_iterator It;
+ int tsidonid = (ref.getTransportStreamID().get()<<16)|ref.getOriginalNetworkID().get();
+
+ eString nowtext, nexttext, nowtime="", nexttime="", descr;
+ int val=0, p=0;
+
+ for (It = pMap->begin(); It != pMap->end(); It++)
+ {
+ EITEvent event(*It->second,tsidonid);
+
+ if ((event.running_status>=2) || ((!p) && (!event.running_status)))
+ {
+ cur_event_id=event.event_id;
+ cur_start=event.start_time;
+ cur_duration=event.duration;
+ clockUpdate();
+ }
+
+ LocalEventData led;
+ switch(p)
+ {
+ case 0:
+ {
+ led.getLocalData(&event, &nowtext, &descr);
+ cur_event_text=nowtext;
+
+ if (nowtext)
+ {
+ val|=1;
+ break;
+ }
+
+ for (ePtrList<Descriptor>::iterator d(event.descriptor); d != event.descriptor.end(); ++d)
+ {
+ Descriptor *descriptor=*d;
+ if (descriptor->Tag()==DESCR_TIME_SHIFTED_EVENT)
+ {
+ eDebug("ref_event_id is %04x ref_sid is %04x tsid is %04x",
+ ((TimeShiftedEventDescriptor*)descriptor)->reference_event_id,
+ ((TimeShiftedEventDescriptor*)descriptor)->reference_service_id,
+ ref.getTransportStreamID().get());
+
+ eServiceReferenceDVB nvodService(
+ ref.getDVBNamespace().get(),
+ ref.getTransportStreamID().get(),
+ ref.getOriginalNetworkID().get(),
+ ((TimeShiftedEventDescriptor*)descriptor)->reference_service_id,
+ ref.getServiceType() );
+
+ EITEvent *evt = eEPGCache::getInstance()->lookupEvent(nvodService, ((TimeShiftedEventDescriptor*)descriptor)->reference_event_id );
+
+ if (evt)
+ {
+ led.getLocalData(evt, &nowtext, &descr);
+ delete evt;
+ val|=1;
+ break;
+ }
+ }
+ }
+ break;
+ }
+
+ case 1:
+ {
+ led.getLocalData(&event, &nexttext);
+
+ if (nexttext)
+ {
+ val|=2;
+ break;
+ }
+
+ for (ePtrList<Descriptor>::iterator d(event.descriptor); d != event.descriptor.end(); ++d)
+ {
+ Descriptor *descriptor=*d;
+ if (descriptor->Tag()==DESCR_TIME_SHIFTED_EVENT)
+ {
+ eDebug("ref_event_id is %04x ref_sid is %04x tsid is %04x",
+ ((TimeShiftedEventDescriptor*)descriptor)->reference_event_id,
+ ((TimeShiftedEventDescriptor*)descriptor)->reference_service_id,
+ ref.getTransportStreamID().get());
+
+ eServiceReferenceDVB nvodService(
+ ref.getDVBNamespace().get(),
+ ref.getTransportStreamID().get(),
+ ref.getOriginalNetworkID().get(),
+ ((TimeShiftedEventDescriptor*)descriptor)->reference_service_id,
+ ref.getServiceType() );
+
+ EITEvent *evt = eEPGCache::getInstance()->lookupEvent(nvodService, ((TimeShiftedEventDescriptor*)descriptor)->reference_event_id );
+
+ if (evt)
+ {
+ led.getLocalData(evt, &nexttext);
+ delete evt;
+ val|=2;
+ break;
+ }
+ }
+ }
+ break;
+ }
+ }
+
+
+ tm *t=event.start_time!=-1?localtime(&event.start_time):0;
+ eString start="";
+ if (t && event.duration)
+ start.sprintf("%02d:%02d", t->tm_hour, t->tm_min);
+ eString duration;
+ if (event.duration>0)
+ duration.sprintf("%d min", event.duration/60);
+ else
+ duration="";
+ switch (p)
+ {
+ case 0:
+ {
+ int show_current_remaining=1;
+ eConfig::getInstance()->getKey("/ezap/osd/showCurrentRemaining", show_current_remaining);
+ if (!show_current_remaining || !eDVB::getInstance()->time_difference )
+ EINowDuration->setText(duration);
+ nowtime=start;
+ EINowTime->setText(nowtime);
+ break;
+ }
+ case 1:
+ {
+ EINextDuration->setText(duration);
+ nexttime=start;
+ EINextTime->setText(nexttime);
+ break;
+ }
+ }
+ Description->setText(descr);
+ p++;
+ }
+
+ if (val&1)
+ {
+ fileinfos->setText(nowtext);
+ EINow->setText(nowtext);
+ }
+
+ if (val&2)
+ EINext->setText(nexttext);
+
+ ret=1;
+ }
+ else
+ {
+ fileinfos->setText("");
+ EINow->setText(_("no EPG available"));
+ EINext->setText("");
+ EINowDuration->setText("");
+ EINextDuration->setText("");
+ EINowTime->setText("");
+ EINextTime->setText("");
+ }
+
+ eEPGCache::getInstance()->Unlock();
+ return ret;
+}
+
void eZapMain::updateServiceNum( const eServiceReference &_serviceref )
{
eService *rservice = eServiceInterface::getInstance()->addRef( refservice );
@@ -6219,9 +6401,15 @@
EIT *eit=sapi->getEIT();
int old_event_id=cur_event_id;
- setEIT(eit);
+ int cache=0, cset=0;
+ eConfig::getInstance()->getKey("/ezap/osd/useEPGCache", cache);
- if (eit)
+ if (isEPG && cache)
+ cset = setEITcache();
+ else
+ setEIT(eit);
+
+ if (eit || cset)
{
int state=0;
if (old_event_id != cur_event_id)
@@ -6243,7 +6431,8 @@
}
}
}
- eit->unlock();
+ if (eit)
+ eit->unlock();
}
else
eDebug("no eit");
diff -urx po orig-cvs/apps/tuxbox/enigma/src/enigma_main.h tuxbox-cvs/apps/tuxbox/enigma/src/enigma_main.h
--- orig-cvs/apps/tuxbox/enigma/src/enigma_main.h 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/src/enigma_main.h 2006-02-10 19:38:46.000000000 +0000
@@ -432,6 +432,7 @@
#endif
void eraseBackground(gPainter *, const eRect &where);
void setEIT(EIT *);
+ int setEITcache();
void handleNVODService(SDTEntry *sdtentry);
// actions
diff -urx po orig-cvs/apps/tuxbox/enigma/src/setup_extra.cpp tuxbox-cvs/apps/tuxbox/enigma/src/setup_extra.cpp
--- orig-cvs/apps/tuxbox/enigma/src/setup_extra.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/src/setup_extra.cpp 2006-02-01 20:14:41.000000000 +0000
@@ -117,6 +117,7 @@
new eListBoxEntryCheck( (eListBox<eListBoxEntry>*)&list, _("Hide error windows"), "/elitedvb/extra/hideerror", _("don't show zap error messages"));
new eListBoxEntryCheck( (eListBox<eListBoxEntry>*)&list, _("Auto show Infobar"), "/ezap/osd/showOSDOnEITUpdate", _("always show infobar when new event info is avail"));
new eListBoxEntryCheck( (eListBox<eListBoxEntry>*)&list, _("Show remaining Time"), "/ezap/osd/showCurrentRemaining", _("show event remaining time in the infobar"));
+ new eListBoxEntryCheck( (eListBox<eListBoxEntry>*)&list, _("Use EPG cache for Infobar"), "/ezap/osd/useEPGCache", _("use the EPG cache for the infobar if the EIT is unavailable"));
CONNECT((new eListBoxEntryCheck( (eListBox<eListBoxEntry>*)&list, _("Use http authentification"), "/ezap/webif/lockWebIf", _("enables the http (user/password) authentification")))->selected, eExpertSetup::reinitializeHTTPServer );
CONNECT((new eListBoxEntryCheck( (eListBox<eListBoxEntry>*)&list, _("Don't open serial port"), "/ezap/extra/disableSerialOutput", _("don't write debug messages to /dev/tts/0")))->selected, eExpertSetup::reinitializeHTTPServer );
new eListBoxEntryCheck( (eListBox<eListBoxEntry>*)&list, _("Auto bouquet change"), "/elitedvb/extra/autobouquetchange", _("change into next bouquet when end of current bouquet is reached"));
diff -urx po orig-cvs/apps/tuxbox/enigma/src/sselect.cpp tuxbox-cvs/apps/tuxbox/enigma/src/sselect.cpp
--- orig-cvs/apps/tuxbox/enigma/src/sselect.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/src/sselect.cpp 2006-02-11 21:26:15.000000000 +0000
@@ -330,6 +330,32 @@
eString descr;
LocalEventData led;
led.getLocalData(e, &descr);
+
+ if (!descr)
+ for (ePtrList<Descriptor>::iterator d(e->descriptor); d != e->descriptor.end(); ++d)
+ {
+ Descriptor *descriptor=*d;
+ if (descriptor->Tag()==DESCR_TIME_SHIFTED_EVENT)
+ {
+ eServiceReferenceDVB nvodService(
+ ((eServiceReferenceDVB&)service).getDVBNamespace().get(),
+ ((eServiceReferenceDVB&)service).getTransportStreamID().get(),
+ ((eServiceReferenceDVB&)service).getOriginalNetworkID().get(),
+ ((TimeShiftedEventDescriptor*)descriptor)->reference_service_id,
+ ((eServiceReferenceDVB&)service).getServiceType() );
+
+ EITEvent *evtmp = eEPGCache::getInstance()->lookupEvent(nvodService, ((TimeShiftedEventDescriptor*)descriptor)->reference_event_id );
+
+ if (evtmp)
+ {
+ led.getLocalData(evtmp, &descr);
+ delete evtmp;
+ break;
+ }
+ }
+ }
+
+
if (descr.length())
{
sdescr='('+descr+')';
Enigma NVOD Now & Next Diff
-
- Moderator english
- Beiträge: 2458
- Registriert: Donnerstag 20. Dezember 2001, 00:00
Enigma NVOD Now & Next Diff
Wieder mal aus England:
-
- Moderator english
- Beiträge: 2458
- Registriert: Donnerstag 20. Dezember 2001, 00:00
Neueste Variante hier
Code: Alles auswählen
diff -urx po orig-cvs/apps/tuxbox/enigma/lib/dvb/dvb.cpp tuxbox-cvs/apps/tuxbox/enigma/lib/dvb/dvb.cpp
--- orig-cvs/apps/tuxbox/enigma/lib/dvb/dvb.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/lib/dvb/dvb.cpp 2006-02-11 16:45:20.000000000 +0000
@@ -1000,7 +1000,7 @@
(i->first.getOriginalNetworkID() == onid) && // if service on this on
(i->first.getTransportStreamID() == tsid) && // and on this transponder (war das "first" hier wichtig?)
(i->first.getDVBNamespace() == dvbnamespace) && // and in this namespace
- (newServiceIds.find(i->first.getServiceID())==newServiceIds.end())) // but does not exist
+ (checkedServiceIds.find(i->first.getServiceID())==checkedServiceIds.end())) // but does not exist
{
for (std::map<int,eServiceReferenceDVB>::iterator m(channel_number.begin()); m != channel_number.end(); ++m)
if (i->first == m->second)
diff -urx po orig-cvs/apps/tuxbox/enigma/lib/dvb/epgcache.cpp tuxbox-cvs/apps/tuxbox/enigma/lib/dvb/epgcache.cpp
--- orig-cvs/apps/tuxbox/enigma/lib/dvb/epgcache.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/lib/dvb/epgcache.cpp 2006-02-09 17:42:22.000000000 +0000
@@ -462,7 +462,7 @@
time_t TM = parseDVBtime( eit_event->start_time_1, eit_event->start_time_2, eit_event->start_time_3, eit_event->start_time_4, eit_event->start_time_5);
time_t now = time(0)+eDVB::getInstance()->time_difference;
- if ( TM != 3599 && TM > -1)
+ if ( TM != 3599 /*&& TM > -1*/ )
{
switch(source)
{
@@ -514,10 +514,10 @@
goto next;
#endif
- if ( TM != 3599 && (TM+duration < now || TM > now+14*24*60*60) )
+ if ( TM != 3599 && (TM+duration < now || TM > now+14*24*60*60) && TM != -1 )
goto next;
- if ( now <= (TM+duration) || TM == 3599 /*NVOD Service*/ ) // old events should not be cached
+ if ( now <= (TM+duration) || TM == 3599 || TM == -1 /*NVOD Service*/ ) // old events should not be cached
{
#ifdef NVOD
// look in 1st descriptor tag.. i hope all time shifted events have the
@@ -538,6 +538,8 @@
#endif
__u16 event_id = HILO(eit_event->event_id);
// eDebug("event_id is %d sid is %04x", event_id, service.sid);
+ if (TM == -1)
+ eDebug("event_id is %04x sid is %04x tsid is %04x", event_id, service.sid, service.tsid);
eventData *evt = 0;
int ev_erase_count = 0;
@@ -570,6 +572,8 @@
else
{
tm_erase_count++;
+ if (TM == -1)
+ eDebug("tm_erase_count: %d", tm_erase_count);
// delete the found record from timemap
servicemap.second.erase(tm_it_tmp);
prevTimeIt=servicemap.second.end();
@@ -591,9 +595,11 @@
eventMap::iterator ev_it_tmp =
servicemap.first.find(tm_it->second->getEventID());
- if ( ev_it_tmp != servicemap.first.end() )
+ if ( (ev_it_tmp != servicemap.first.end()) && (TM != -1) )
{
ev_erase_count++;
+ if (TM == -1)
+ eDebug("ev_erase_count: %d", ev_erase_count);
// delete the found record from eventmap
servicemap.first.erase(ev_it_tmp);
prevEventIt=servicemap.first.end();
@@ -618,6 +624,8 @@
delete ev_it->second;
tm_it=prevTimeIt=servicemap.second.insert( prevTimeIt, std::pair<const time_t, eventData*>( TM, evt ) );
ev_it->second=evt;
+ if (TM == -1)
+ eDebug("Removed Event Data from TMmap");
}
else if (ev_erase_count > 0 && tm_erase_count == 0)
{
@@ -625,6 +633,8 @@
delete tm_it->second;
ev_it=prevEventIt=servicemap.first.insert( prevEventIt, std::pair<const __u16, eventData*>( event_id, evt) );
tm_it->second=evt;
+ if (TM == -1)
+ eDebug("Removed Event Data from EVmap");
}
else // added new eventData
{
@@ -633,6 +643,8 @@
#endif
prevEventIt=servicemap.first.insert( prevEventIt, std::pair<const __u16, eventData*>( event_id, evt) );
prevTimeIt=servicemap.second.insert( prevTimeIt, std::pair<const time_t, eventData*>( TM, evt ) );
+ if (TM == -1)
+ eDebug("Added Event Data");
}
#if EPG_DEBUG
if ( consistencyCheck )
@@ -826,7 +838,8 @@
bool updated=false;
for (timeMap::iterator It = DBIt->second.second.begin(); It != DBIt->second.second.end() && It->first < now;)
{
- if ( now > (It->first+It->second->getDuration()) ) // outdated normal entry (nvod references to)
+ //if ( now > (It->first+It->second->getDuration()) ) // outdated normal entry (nvod references to)
+ if ( (now > (It->first+It->second->getDuration())) && (It->second->getStartTime() != -1) )
{
// remove entry from eventMap
eventMap::iterator b(DBIt->second.first.find(It->second->getEventID()));
@@ -881,8 +894,8 @@
}
#endif
- if ( DBIt->second.second.size() == 1 )
- // less than two events for this service in cache..
+ if ( DBIt->second.second.size() < 3 )
+ // less than three events for this service in cache..
{
updateMap::iterator u = serviceLastUpdated.find(DBIt->first);
if ( u != serviceLastUpdated.end() )
diff -urx po orig-cvs/apps/tuxbox/enigma/lib/dvb/esection.cpp tuxbox-cvs/apps/tuxbox/enigma/lib/dvb/esection.cpp
--- orig-cvs/apps/tuxbox/enigma/lib/dvb/esection.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/lib/dvb/esection.cpp 2006-02-09 17:42:22.000000000 +0000
@@ -296,13 +296,13 @@
if ( ret != -2 && timer && section == -1 )
{
section=0;
- timer->start(10000, true);
+ timer->start(30000, true);
}
if (ret)
{
if ( ret == -2 && timer && timer->isActive() )
- timer->start(10000, true);
+ timer->start(30000, true);
return;
}
@@ -338,7 +338,7 @@
}
// when more data to read.. restart timeout..
if ( timer )
- timer->start(10000,true);
+ timer->start(30000,true);
}
}
diff -urx po orig-cvs/apps/tuxbox/enigma/lib/dvb/si.cpp tuxbox-cvs/apps/tuxbox/enigma/lib/dvb/si.cpp
--- orig-cvs/apps/tuxbox/enigma/lib/dvb/si.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/lib/dvb/si.cpp 2006-02-09 17:42:35.000000000 +0000
@@ -749,6 +749,7 @@
event_name=convertDVBUTF8((unsigned char*)data+ptr, len, table, tsidonid);
// filter newlines in ARD ShortEventDescriptor event_name
event_name.strReplace("\xc2\x8a",": ");
+ event_name.strReplace(" ", "intermission");
ptr+=len;
len=data[ptr++];
diff -urx po orig-cvs/apps/tuxbox/enigma/src/enigma_epg.cpp tuxbox-cvs/apps/tuxbox/enigma/src/enigma_epg.cpp
--- orig-cvs/apps/tuxbox/enigma/src/enigma_epg.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/src/enigma_epg.cpp 2006-02-11 21:26:14.000000000 +0000
@@ -340,6 +340,31 @@
LocalEventData led;
led.getLocalData(ev, &e->title, &description);
+
+ if (!e->title)
+ for (ePtrList<Descriptor>::iterator d(ev->descriptor); d != ev->descriptor.end(); ++d)
+ {
+ Descriptor *descriptor=*d;
+ if (descriptor->Tag()==DESCR_TIME_SHIFTED_EVENT)
+ {
+ eServiceReferenceDVB nvodService(
+ service.service.getDVBNamespace().get(),
+ service.service.getTransportStreamID().get(),
+ service.service.getOriginalNetworkID().get(),
+ ((TimeShiftedEventDescriptor*)descriptor)->reference_service_id,
+ service.service.getServiceType() );
+
+ EITEvent *evtmp = eEPGCache::getInstance()->lookupEvent(nvodService, ((TimeShiftedEventDescriptor*)descriptor)->reference_event_id );
+
+ if (evtmp)
+ {
+ led.getLocalData(evtmp, &e->title, &description);
+ delete evtmp;
+ break;
+ }
+ }
+ }
+
tm *begin=localtime(&ev->start_time);
while ( description[0] == ' ' )
description.erase(0);
diff -urx po orig-cvs/apps/tuxbox/enigma/src/enigma_event.cpp tuxbox-cvs/apps/tuxbox/enigma/src/enigma_event.cpp
--- orig-cvs/apps/tuxbox/enigma/src/enigma_event.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/src/enigma_event.cpp 2006-02-11 21:26:08.000000000 +0000
@@ -253,6 +253,25 @@
else if (led.language_exists(event,"eng"))
lang="eng";
+ EITEvent *orig = event;
+ for (ePtrList<Descriptor>::iterator d(event->descriptor); d != event->descriptor.end(); ++d)
+ {
+ if (d->Tag()==DESCR_TIME_SHIFTED_EVENT)
+ {
+ eServiceReferenceDVB nvodService(
+ ref.getDVBNamespace().get(),
+ ref.getTransportStreamID().get(),
+ ref.getOriginalNetworkID().get(),
+ ((TimeShiftedEventDescriptor*)*d)->reference_service_id,
+ ref.getServiceType() );
+
+ event = eEPGCache::getInstance()->lookupEvent(nvodService, ((TimeShiftedEventDescriptor*)*d)->reference_event_id );
+ if (!event)
+ event = orig;
+ break;
+ }
+ }
+
for (ePtrList<Descriptor>::iterator d(event->descriptor); d != event->descriptor.end(); ++d)
{
if (d->Tag()==DESCR_SHORT_EVENT)
@@ -284,6 +303,10 @@
_long_description+=ss->text;
}
}
+
+ if (event != orig)
+ event = orig;
+
if (!_title)
_title = _("no information is available");
if ( !ref.path )
diff -urx po orig-cvs/apps/tuxbox/enigma/src/enigma_main.cpp tuxbox-cvs/apps/tuxbox/enigma/src/enigma_main.cpp
--- orig-cvs/apps/tuxbox/enigma/src/enigma_main.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/src/enigma_main.cpp 2006-02-11 21:26:13.000000000 +0000
@@ -2024,6 +2024,10 @@
ButtonRedDis->hide();
ButtonRedEn->show();
isEPG = 1;
+
+ int cache=0;
+ if (eConfig::getInstance()->getKey("/ezap/osd/useEPGCache", cache));
+ gotEIT();
}
else
{
@@ -2209,6 +2213,184 @@
actual_eventDisplay->setList(eit?eit->events:dummy);
}
+int eZapMain::setEITcache()
+{
+ eDebug("eZapMain::setEITcache");
+ cur_event_text="";
+ int ret=0;
+
+ eServiceReferenceDVB &ref=(eServiceReferenceDVB&)eServiceInterface::getInstance()->service;
+
+ eEPGCache::getInstance()->Lock();
+ const timeMap* pMap = eEPGCache::getInstance()->getTimeMap(ref);
+
+ if (pMap)
+ {
+ timeMap::const_iterator It;
+ int tsidonid = (ref.getTransportStreamID().get()<<16)|ref.getOriginalNetworkID().get();
+
+ eString nowtext, nexttext, nowtime="", nexttime="", descr;
+ int val=0, p=0;
+
+ for (It = pMap->begin(); It != pMap->end(); It++)
+ {
+ EITEvent event(*It->second,tsidonid);
+
+ if ((event.running_status>=2) || ((!p) && (!event.running_status)))
+ {
+ cur_event_id=event.event_id;
+ cur_start=event.start_time;
+ cur_duration=event.duration;
+ clockUpdate();
+ }
+
+ LocalEventData led;
+ switch(p)
+ {
+ case 0:
+ {
+ led.getLocalData(&event, &nowtext, &descr);
+ cur_event_text=nowtext;
+
+ if (nowtext)
+ {
+ val|=1;
+ break;
+ }
+
+ for (ePtrList<Descriptor>::iterator d(event.descriptor); d != event.descriptor.end(); ++d)
+ {
+ Descriptor *descriptor=*d;
+ if (descriptor->Tag()==DESCR_TIME_SHIFTED_EVENT)
+ {
+ eDebug("ref_event_id is %04x ref_sid is %04x tsid is %04x",
+ ((TimeShiftedEventDescriptor*)descriptor)->reference_event_id,
+ ((TimeShiftedEventDescriptor*)descriptor)->reference_service_id,
+ ref.getTransportStreamID().get());
+
+ eServiceReferenceDVB nvodService(
+ ref.getDVBNamespace().get(),
+ ref.getTransportStreamID().get(),
+ ref.getOriginalNetworkID().get(),
+ ((TimeShiftedEventDescriptor*)descriptor)->reference_service_id,
+ ref.getServiceType() );
+
+ EITEvent *evt = eEPGCache::getInstance()->lookupEvent(nvodService, ((TimeShiftedEventDescriptor*)descriptor)->reference_event_id );
+
+ if (evt)
+ {
+ led.getLocalData(evt, &nowtext, &descr);
+ delete evt;
+ val|=1;
+ break;
+ }
+ }
+ }
+ break;
+ }
+
+ case 1:
+ {
+ led.getLocalData(&event, &nexttext);
+
+ if (nexttext)
+ {
+ val|=2;
+ break;
+ }
+
+ for (ePtrList<Descriptor>::iterator d(event.descriptor); d != event.descriptor.end(); ++d)
+ {
+ Descriptor *descriptor=*d;
+ if (descriptor->Tag()==DESCR_TIME_SHIFTED_EVENT)
+ {
+ eDebug("ref_event_id is %04x ref_sid is %04x tsid is %04x",
+ ((TimeShiftedEventDescriptor*)descriptor)->reference_event_id,
+ ((TimeShiftedEventDescriptor*)descriptor)->reference_service_id,
+ ref.getTransportStreamID().get());
+
+ eServiceReferenceDVB nvodService(
+ ref.getDVBNamespace().get(),
+ ref.getTransportStreamID().get(),
+ ref.getOriginalNetworkID().get(),
+ ((TimeShiftedEventDescriptor*)descriptor)->reference_service_id,
+ ref.getServiceType() );
+
+ EITEvent *evt = eEPGCache::getInstance()->lookupEvent(nvodService, ((TimeShiftedEventDescriptor*)descriptor)->reference_event_id );
+
+ if (evt)
+ {
+ led.getLocalData(evt, &nexttext);
+ delete evt;
+ val|=2;
+ break;
+ }
+ }
+ }
+ break;
+ }
+ }
+
+
+ tm *t=event.start_time!=-1?localtime(&event.start_time):0;
+ eString start="";
+ if (t && event.duration)
+ start.sprintf("%02d:%02d", t->tm_hour, t->tm_min);
+ eString duration;
+ if (event.duration>0)
+ duration.sprintf("%d min", event.duration/60);
+ else
+ duration="";
+ switch (p)
+ {
+ case 0:
+ {
+ int show_current_remaining=1;
+ eConfig::getInstance()->getKey("/ezap/osd/showCurrentRemaining", show_current_remaining);
+ if (!show_current_remaining || !eDVB::getInstance()->time_difference )
+ EINowDuration->setText(duration);
+ nowtime=start;
+ EINowTime->setText(nowtime);
+ break;
+ }
+ case 1:
+ {
+ EINextDuration->setText(duration);
+ nexttime=start;
+ EINextTime->setText(nexttime);
+ break;
+ }
+ }
+ Description->setText(descr);
+ p++;
+ }
+
+ if (val&1)
+ {
+ fileinfos->setText(nowtext);
+ EINow->setText(nowtext);
+ }
+
+ if (val&2)
+ EINext->setText(nexttext);
+
+ ret=1;
+ }
+ else
+ {
+ fileinfos->setText("");
+ EINow->setText(_("no EPG available"));
+ EINext->setText("");
+ EINowDuration->setText("");
+ EINextDuration->setText("");
+ EINowTime->setText("");
+ EINextTime->setText("");
+ }
+
+ eEPGCache::getInstance()->Unlock();
+ return ret;
+}
+
void eZapMain::updateServiceNum( const eServiceReference &_serviceref )
{
eService *rservice = eServiceInterface::getInstance()->addRef( refservice );
@@ -6219,9 +6401,15 @@
EIT *eit=sapi->getEIT();
int old_event_id=cur_event_id;
- setEIT(eit);
+ int cache=0, cset=0;
+ eConfig::getInstance()->getKey("/ezap/osd/useEPGCache", cache);
- if (eit)
+ if (isEPG && cache)
+ cset = setEITcache();
+ else
+ setEIT(eit);
+
+ if (eit || cset)
{
int state=0;
if (old_event_id != cur_event_id)
@@ -6243,7 +6431,8 @@
}
}
}
- eit->unlock();
+ if (eit)
+ eit->unlock();
}
else
eDebug("no eit");
diff -urx po orig-cvs/apps/tuxbox/enigma/src/enigma_main.h tuxbox-cvs/apps/tuxbox/enigma/src/enigma_main.h
--- orig-cvs/apps/tuxbox/enigma/src/enigma_main.h 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/src/enigma_main.h 2006-02-10 19:38:46.000000000 +0000
@@ -432,6 +432,7 @@
#endif
void eraseBackground(gPainter *, const eRect &where);
void setEIT(EIT *);
+ int setEITcache();
void handleNVODService(SDTEntry *sdtentry);
// actions
diff -urx po orig-cvs/apps/tuxbox/enigma/src/setup_extra.cpp tuxbox-cvs/apps/tuxbox/enigma/src/setup_extra.cpp
--- orig-cvs/apps/tuxbox/enigma/src/setup_extra.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/src/setup_extra.cpp 2006-02-01 20:14:41.000000000 +0000
@@ -117,6 +117,7 @@
new eListBoxEntryCheck( (eListBox<eListBoxEntry>*)&list, _("Hide error windows"), "/elitedvb/extra/hideerror", _("don't show zap error messages"));
new eListBoxEntryCheck( (eListBox<eListBoxEntry>*)&list, _("Auto show Infobar"), "/ezap/osd/showOSDOnEITUpdate", _("always show infobar when new event info is avail"));
new eListBoxEntryCheck( (eListBox<eListBoxEntry>*)&list, _("Show remaining Time"), "/ezap/osd/showCurrentRemaining", _("show event remaining time in the infobar"));
+ new eListBoxEntryCheck( (eListBox<eListBoxEntry>*)&list, _("Use EPG cache for Infobar"), "/ezap/osd/useEPGCache", _("use the EPG cache for the infobar if the EIT is unavailable"));
CONNECT((new eListBoxEntryCheck( (eListBox<eListBoxEntry>*)&list, _("Use http authentification"), "/ezap/webif/lockWebIf", _("enables the http (user/password) authentification")))->selected, eExpertSetup::reinitializeHTTPServer );
CONNECT((new eListBoxEntryCheck( (eListBox<eListBoxEntry>*)&list, _("Don't open serial port"), "/ezap/extra/disableSerialOutput", _("don't write debug messages to /dev/tts/0")))->selected, eExpertSetup::reinitializeHTTPServer );
new eListBoxEntryCheck( (eListBox<eListBoxEntry>*)&list, _("Auto bouquet change"), "/elitedvb/extra/autobouquetchange", _("change into next bouquet when end of current bouquet is reached"));
diff -urx po orig-cvs/apps/tuxbox/enigma/src/sselect.cpp tuxbox-cvs/apps/tuxbox/enigma/src/sselect.cpp
--- orig-cvs/apps/tuxbox/enigma/src/sselect.cpp 2006-01-29 14:28:35.000000000 +0000
+++ tuxbox-cvs/apps/tuxbox/enigma/src/sselect.cpp 2006-02-11 21:26:15.000000000 +0000
@@ -330,6 +330,32 @@
eString descr;
LocalEventData led;
led.getLocalData(e, &descr);
+
+ if (!descr)
+ for (ePtrList<Descriptor>::iterator d(e->descriptor); d != e->descriptor.end(); ++d)
+ {
+ Descriptor *descriptor=*d;
+ if (descriptor->Tag()==DESCR_TIME_SHIFTED_EVENT)
+ {
+ eServiceReferenceDVB nvodService(
+ ((eServiceReferenceDVB&)service).getDVBNamespace().get(),
+ ((eServiceReferenceDVB&)service).getTransportStreamID().get(),
+ ((eServiceReferenceDVB&)service).getOriginalNetworkID().get(),
+ ((TimeShiftedEventDescriptor*)descriptor)->reference_service_id,
+ ((eServiceReferenceDVB&)service).getServiceType() );
+
+ EITEvent *evtmp = eEPGCache::getInstance()->lookupEvent(nvodService, ((TimeShiftedEventDescriptor*)descriptor)->reference_event_id );
+
+ if (evtmp)
+ {
+ led.getLocalData(evtmp, &descr);
+ delete evtmp;
+ break;
+ }
+ }
+ }
+
+
if (descr.length())
{
sdescr='('+descr+')';
-
- Einsteiger
- Beiträge: 133
- Registriert: Sonntag 6. April 2003, 18:26
-
- Moderator english
- Beiträge: 2458
- Registriert: Donnerstag 20. Dezember 2001, 00:00
-
- Developer
- Beiträge: 57
- Registriert: Sonntag 4. Mai 2003, 14:17
-
- Moderator english
- Beiträge: 2458
- Registriert: Donnerstag 20. Dezember 2001, 00:00
-
- Developer
- Beiträge: 57
- Registriert: Sonntag 4. Mai 2003, 14:17
-
- Moderator english
- Beiträge: 2458
- Registriert: Donnerstag 20. Dezember 2001, 00:00
-
- Developer
- Beiträge: 57
- Registriert: Sonntag 4. Mai 2003, 14:17
-
- Moderator english
- Beiträge: 2458
- Registriert: Donnerstag 20. Dezember 2001, 00:00
-
- Semiprofi
- Beiträge: 1383
- Registriert: Freitag 18. April 2003, 15:12
-
- Developer
- Beiträge: 57
- Registriert: Sonntag 4. Mai 2003, 14:17
-
- Semiprofi
- Beiträge: 1383
- Registriert: Freitag 18. April 2003, 15:12
-
- Developer
- Beiträge: 245
- Registriert: Mittwoch 13. März 2002, 21:19
Hi,
weil der Code nicht sonderlich Toll aussieht, und man das ganze garantiert einfacher und schöner bauen kann. Und das ganze bestimmt auch ohne an X Stellen in enigma Workarounds einbauen zu müssen.
Sorry.. aber für eine absolute Minderheit, die wirklich NVOD empfangen kann, mag ich enigma nicht unnötig langsamer/instabiler machen.
Da aber wohl nirgends außer im englischen Kabelnetz jemand NVOD benutzt, sieht es eher schlecht aus, dass das ordentlich implementiert wieder aufgenommen wird. Eine alternative wäre eine Aufnahme (TS File) in dem alle nötigen PIDs enthalten sind.
Wenn da jemand die Möglichkeit hat so eine Aufnahme zu erstellen (sprich er einen Sender Empfangen kann, der NVOD benutzt).. dann kann er sich ja mal melden.
cya
weil der Code nicht sonderlich Toll aussieht, und man das ganze garantiert einfacher und schöner bauen kann. Und das ganze bestimmt auch ohne an X Stellen in enigma Workarounds einbauen zu müssen.
Sorry.. aber für eine absolute Minderheit, die wirklich NVOD empfangen kann, mag ich enigma nicht unnötig langsamer/instabiler machen.
Da aber wohl nirgends außer im englischen Kabelnetz jemand NVOD benutzt, sieht es eher schlecht aus, dass das ordentlich implementiert wieder aufgenommen wird. Eine alternative wäre eine Aufnahme (TS File) in dem alle nötigen PIDs enthalten sind.
Wenn da jemand die Möglichkeit hat so eine Aufnahme zu erstellen (sprich er einen Sender Empfangen kann, der NVOD benutzt).. dann kann er sich ja mal melden.
cya
-
- Semiprofi
- Beiträge: 1383
- Registriert: Freitag 18. April 2003, 15:12
-
- Developer
- Beiträge: 57
- Registriert: Sonntag 4. Mai 2003, 14:17
-
- Moderator english
- Beiträge: 2458
- Registriert: Donnerstag 20. Dezember 2001, 00:00