Commit Graph

51 Commits

Author SHA1 Message Date
satbaby
3770af64b0 -fix event version handling
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1427 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-05-03 15:06:32 +00:00
satbaby
aa7fa768b8 tiny fix
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1423 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-05-02 11:47:38 +00:00
satbaby
517a305980 sectionsd: -add replae event if new version
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1422 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-05-02 11:21:15 +00:00
seife
4ed9e079ae sectionsd: avoid duplicate events
When adding a new event remove others with the same start time and the
same service id, but possibly different event id.
This reduces the number of duplicates significantly, and is basically
similar to what other projects are doing for this case.

Due to the significant overhead this needs to be explicitly enabled by
exporting the TEST_ADDEVENT environment variable before starting
neutrino for now. Please test and report your findings to the mailing
list.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1410 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-04-17 17:36:53 +00:00
seife
95e1d38529 sectionsd: add number of read events to 'reading saved EPG' message
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1409 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-04-17 17:36:51 +00:00
seife
48ac30ddb9 sectionsd: add timing info to 'reading saved EPG' message
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1406 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-04-16 22:11:21 +00:00
seife
b52d414d97 sectionsd: fix iterator type mismatch
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1405 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-04-16 21:57:29 +00:00
seife
df3d2fbc3b sectionsd: don't take any chances in deleteEvent()
Just take the write lock right away, to make sure nothing changes the
event lists behind our backs and possibly corrupts the iterator.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1392 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-04-11 17:17:39 +00:00
seife
c5ae25e66d sectionsd: un-break removeDupEvents()
The crashes probably were caused by the iterator being invalid
due to concurrent insertion and deletion of events.
An obvious fix is to collect the list of events to delete while
holding the read lock, and later deleting them all in an extra loop.
Turned out to be less complicated than I originally expected ;)
TODO: audit the sectionsd code for similar stuff in other places.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1391 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-04-11 17:17:37 +00:00
striper
6395258913 - revert to rev. 1387
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1390 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-04-11 15:01:24 +00:00
satbaby
ca8a298d83 test remove2
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1389 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-04-11 14:23:15 +00:00
satbaby
5f8ed77fc1 test remove
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1388 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-04-11 14:01:36 +00:00
seife
f9250015c7 sectionsd: disable removeDupEvents() for now
removeDupEvents has some yet to be discovered design problem which
leads to crashes after some time, which smell like stack corruption
or locking issues wrt. the event lists
Obviously it needs some more thought, so disable it for now.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1386 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-04-11 06:26:51 +00:00
seife
8f704427b8 sectionsd: use better event set for removeDupEvents()
Use the set of events which is sorted by start time and
service id intead of the one sorted by end time to iterate
through the list of events. Fixes a mysterious crash on ppc.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1385 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-04-10 22:21:42 +00:00
seife
13b67c5da5 sectionsd: remove duplicate events with different eventIDs
Sometimes the playout centers seem to "renumber" the events, leading
to duplicates.
This "removeDupEvents()" checks for events from the same service, with
identical start time and duration. If it finds such events, it keeps
the one with the lower (== more recent) table_id.
This check is run from the hosekeeping thread.
It could be extended to also remove overlapping events, but this is
potentially more dangerous and can be implemented later still.

As this code is experimental, it is pretty noisy for now. The debugging
output should be toned down later.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1384 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-04-10 18:10:27 +00:00
seife
04bd1ce20b sectionsd: replace existing events with event from lower table ID
If we get a new epg event whose eventID is already existing, still
replace the existing event if the table ID of the new event is lower.
This comes from the observation that the lower table IDs have the
"more current" events:
Table 0x60-0x6f: other TS,   scheduled
      0x50-0x5f: current TS, scheduled
      0x4f:      other TS,   current/next
      0x4e:      current TS, current/next
So, at at least in theory, an event from table 0x4e should always be
"better" than one from 0x60.
If you see any regressions, don't hesitate to report them.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1382 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-04-09 16:35:16 +00:00
seife
72149b63a4 sectionsd: add table ID to event data
record the originating table ID with every event
if not set (e.g. for events read from saved data), it defaults
to 0xff to make sure it is bigger than a real existing table ID

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1381 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-04-09 16:35:14 +00:00
focus
0651464007 Workaround for new COsdLangSetup, which not send configured preffered languages to sectionsd at startup
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1345 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-03-28 09:49:18 +00:00
seife
6efb0d5e47 get rid of HAVE_DVB_API_VERSION define
remove non-working legacy code

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1289 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-03-12 12:36:13 +00:00
satbaby
85f5e1110d memcpy -> memmove
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1278 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-03-09 12:55:31 +00:00
seife
9dd10d9ee5 sectionsd: add a forgotten 'no epg' event
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1261 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-03-06 16:31:47 +00:00
seife
deefb52eeb sectionsd: trigger time refetch after transponder change
This should ensure that the system time somehow matches the
transponder time. Comments and reports welcome on the developers
mailinglist. If this turns out to be not working well for all
setups, it could be made configurable.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1257 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-03-06 15:34:16 +00:00
seife
53744ed622 sectionsd: improve time acquisition from DVB stream
* during startup, get time from TDT, to get *any* time information quickly
* after startup, immediately (after 5 seconds) retry with TDT
* later calls only use TOT. TOT is not broadcast on all channels, but the
  channels that broadcast a TOT usually are much more "trustworthy" wrt
  time setting
Comments welcome, also reports if this works worse than before

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1256 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-03-06 15:34:12 +00:00
seife
a2cb0257b3 sectionsd: improve eit_set_update_filter debug message
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1254 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-03-06 15:34:06 +00:00
seife
b925c40ea5 sectionsd: improve CN EIT timeout detection
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1253 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-03-06 15:34:04 +00:00
seife
446c32a5f0 sectionsd: use monotonic time to guard against timesetting
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1252 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-03-06 15:34:01 +00:00
seife
4247a24cc5 sectionsd: #if 0 unused parseExtendedEvents() function
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1248 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-03-05 12:19:50 +00:00
seife
3daabbc97e sectionsd: #if 0 unused BouquetFilter code
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1247 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-03-05 12:19:47 +00:00
seife
0a32adb856 sectionsd: #if 0 commandRestart (unused and dangerous)
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1246 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-03-05 12:19:44 +00:00
seife
de2f61c7f5 sectionsd: #ifdef out complete SDT thread, it is unused anyway
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1245 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-03-05 12:19:42 +00:00
seife
b1e7ea7d55 sectionsd: improve CN thread's handling of non-broadcast events
* reduce EIT timeout to 3 seconds
* if there are no events broadcast, send an event to neutrino anyway
* when EIT has changed but events are the same, return to sleep faster

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1229 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-02-27 21:19:32 +00:00
seife
c04dc028a0 improve sectionsd EIT filter for non-broken drivers
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1084 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-01-30 12:25:08 +00:00
seife
80f3d04fbf sectionsd: send more chars of the event description
If the short description of an event was empty, only 40 chars of the
extended description were sent. This causes truncated text in the
channellist's details window.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@988 e54a6e83-5905-42d5-8d5c-058d10e6a962
2011-01-01 14:02:30 +00:00
seife
2590adfe15 add generic dispatcher headers for frontend etc
add generic audio, video and demux headers in zapit/include (TODO: put them
into a better place, or put wrappers into lib directories) that automatically
dispatch to the hardware specific functions and use them in the code

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@962 e54a6e83-5905-42d5-8d5c-058d10e6a962
2010-12-25 17:43:28 +00:00
satbaby
d8489c3abc -fix set timer in findEvents
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@946 e54a6e83-5905-42d5-8d5c-058d10e6a962
2010-12-18 19:11:12 +00:00
seife
33b5739dca sectionsd: cancel TOT thread on shutdown
this helps with spurious hangs on exit / ctrl-C

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@764 e54a6e83-5905-42d5-8d5c-058d10e6a962
2010-09-12 16:58:47 +00:00
seife
4165dc5755 remove unnecessary use of linux dvb api in sectionsd
the variable types are not really used as intended, so we can
as well avoid using them at all to make it easier to port to
other platforms

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@761 e54a6e83-5905-42d5-8d5c-058d10e6a962
2010-09-12 14:42:35 +00:00
focus
913a94ce76 Fix bouquet name in epgplus; Fix bitrate for radio channels; Show language settings before setup banner
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@688 e54a6e83-5905-42d5-8d5c-058d10e6a962
2010-07-29 11:25:43 +00:00
satbaby
6fdbb34680 -fix search in bouquet & all
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@556 e54a6e83-5905-42d5-8d5c-058d10e6a962
2010-04-30 12:03:33 +00:00
striper
3fe1c9a19d - port over some not yet landed fixes for german SKY TV epg (THX Gaucho316!)
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@394 e54a6e83-5905-42d5-8d5c-058d10e6a962
2010-02-20 18:22:55 +00:00
focus
0fc1a8fe07 Rework of prefered language code to support both possible iso639 codes
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@372 e54a6e83-5905-42d5-8d5c-058d10e6a962
2010-02-18 12:48:55 +00:00
satbaby
288f4fd41f copy fixes from tuxcvs
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@367 e54a6e83-5905-42d5-8d5c-058d10e6a962
2010-02-17 21:11:56 +00:00
focus
81276253ae Prefered language settings for testing, at the moment for audio and epg
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@361 e54a6e83-5905-42d5-8d5c-058d10e6a962
2010-02-17 13:13:43 +00:00
satbaby
c3db76408a change 'long long' tom int64_t'
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@293 e54a6e83-5905-42d5-8d5c-058d10e6a962
2010-02-07 15:10:25 +00:00
seife
a13654fa10 sectionsd: we need to lock the mutex for pthread_cond_broadcast()
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@140 e54a6e83-5905-42d5-8d5c-058d10e6a962
2010-01-03 14:52:06 +00:00
seife
4d97222d9b sectionsd: speed up shutdown
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@139 e54a6e83-5905-42d5-8d5c-058d10e6a962
2010-01-03 14:50:08 +00:00
seife
5053702af1 sectionsd: get rid of exceptions
Fortunately, those exceptions do not trigger. If they did, they
would kill the box as an unhandled exception would lead to an unclean
shutdown of the drivers anyway, so we can just do without them as in
the rest of neutrino.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@134 e54a6e83-5905-42d5-8d5c-058d10e6a962
2010-01-03 12:45:27 +00:00
seife
8070a9613d fix up libxmltree interfaces, so that useless casts can be removed
Lots of places hat casts from (const char*) to (char *) to silence
a "deprecated conversion" warning. Instead of casting (which is
inherently wrong), fix up the libxmltree interfaces.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@117 e54a6e83-5905-42d5-8d5c-058d10e6a962
2009-12-22 16:11:40 +00:00
mws
1b13da2617 Mark unused vars as comment
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@104 e54a6e83-5905-42d5-8d5c-058d10e6a962
2009-12-21 16:23:09 +00:00
mws
27328dc8ad fix variable init
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@85 e54a6e83-5905-42d5-8d5c-058d10e6a962
2009-12-16 16:08:12 +00:00