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
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
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
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
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
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
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
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
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
* 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
* 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
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
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
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
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
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
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