Skip to content

Commit

Permalink
One-part channel number for ATSC cable
Browse files Browse the repository at this point in the history
Implement the one-part channel number for ATSC cable as defined
in ATSC standard A65/2013  7 August 2013  page 35.
In this case the ATSC major number is 1008 (0x3F0) or higher
and all channels in all multiplexes have this major number.
Change the name of the MPTS full-transport stream channel
to use the freqid instead of the major number when
the one-part channel number is used.
  • Loading branch information
kmdewaal committed Feb 16, 2020
1 parent c56a97f commit f1ea02d
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp
Expand Up @@ -1366,6 +1366,14 @@ ChannelScanSM::GetChannelList(transport_scan_items_it_t trans_info,
uint pnum = cvct->ProgramNumber(i);
PCM_INFO_INIT("atsc");
update_info(info, cvct, i);

// One-part channel number, as defined in the ATSC Standard:
// Program and System Information Protocol for Terrestrial Broadcast and Cable
// Doc. A65/2013 7 August 2013 page 35
if ((info.m_atscMajorChannel & 0x3F0) == 0x3F0)
{
info.m_chanNum = (info.m_atscMajorChannel & 0x00F) << 10 + info.m_atscMinorChannel;
}
}
}

Expand Down Expand Up @@ -1763,8 +1771,14 @@ ScanDTVTransportList ChannelScanSM::GetChannelList(bool addFullTS) const
}
else if (info.m_atscMajorChannel > 0)
{
info.m_callSign =
QString("MPTS_%1").arg(info.m_atscMajorChannel);
if (info.m_atscMajorChannel < 0x3F0)
{
info.m_callSign = QString("MPTS_%1").arg(info.m_atscMajorChannel);
}
else
{
info.m_callSign = QString("MPTS_%1").arg(info.m_freqId);
}
}
else if (info.m_serviceId > 0)
{
Expand Down

0 comments on commit f1ea02d

Please sign in to comment.