[mythtv] DVB Service Description Table (SDT) handling.
roger at beardandsandals.co.uk
Fri Dec 16 17:33:34 UTC 2016
In a fit of madness I decided to have a look at the SDT handling in
A large portion of the code appears to be unused. But one of this bits
that is used is this function.
bool DVBStreamData::HasCachedAllSDT(uint tsid, bool current) const
LOG(VB_GENERAL, LOG_WARNING, LOC +
"Currently we ignore \'current\' param");
sdt_cache_t::const_iterator it = _cached_sdts.find(tsid << 8);
if (it == _cached_sdts.end())
uint last_section = (*it)->LastSection();
for (uint i = 1; i <= last_section; i++)
if (_cached_sdts.find((tsid << 8) | i) == _cached_sdts.end())
Given that SDT sections are cached by this function.
void DVBStreamData::CacheSDT(ServiceDescriptionTable *sdt)
uint key = (sdt->TSID() << 8) | sdt->Section();
sdt_cache_t::iterator it = _cached_sdts.find(key);
if (it != _cached_sdts.end())
_cached_sdts[key] = sdt;
Is the bit in the first function that seeks on tsid << 8 really trying
to find out if section zero is present?
As it is at the moment it looks like the function returns true if
section zero is present and last section is also zero, or if section
zero is present and last section is not zero and that section is also
present. This does not really work as there are many reasons on
unreliable transport mechanisms such as broadcast television that
intervening segments may be missing.
Any comment anyone.
More information about the mythtv-dev