[mythtv] DVB Service Description Table processing
roger
roger at beardandsandals.co.uk
Thu Jan 12 14:08:56 UTC 2017
Does anybody know what this piece of code is tryng to acheive.
void DVBStreamData::SetDesiredService(uint netid, uint tsid, int serviceid)
{
bool reset = true;
if (HasCachedAllSDT(tsid, true))
{
sdt_const_ptr_t first_sdt = GetCachedSDT(tsid, 0, true);
uint networkID = first_sdt->OriginalNetworkID();
if (networkID == netid)
{
reset = false;
_desired_netid = netid;
_desired_tsid = tsid;
uint last_section = first_sdt->LastSection();
ProcessSDT(_desired_tsid, first_sdt);
ReturnCachedTable(first_sdt);
for (uint i = 1; i <= last_section; ++i)
{
sdt_const_ptr_t sdt = GetCachedSDT(_desired_tsid, i, true);
ProcessSDT(_desired_tsid, sdt);
ReturnCachedTable(sdt);
}
SetDesiredProgram(serviceid);
}
}
if (reset)
Reset(netid, tsid, serviceid);
}
My guess is that it is trying to find out if this streamdata object is
already tuned to the requested transport stream and it only needs to set
the desired serviceid without retuning.
Surely there is an easier way to do this.
Why does it run through all the sections in this particular SD table and
pass these up to the upper layers (ProcessSDT) when this has already
been done when these sections were fiirst encountered?
Any ideas?
Roger
More information about the mythtv-dev
mailing list