Ticket #13547: 2020010401_opentv_channel_number.patch

File 2020010401_opentv_channel_number.patch, 21.2 KB (added by mspieth, 4 years ago)

opentv channel id patch

  • mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp

    commit e0e227d99a9d9cfc6ddebbc152baae719ca37cc1
    Author: Mark Spieth <mspieth@digivation.com.au>
    Date:   Thu Dec 22 01:03:50 2011 +1100
    
        opentv channel and extended eit support
    
    diff --git a/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp b/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp
    index de955f6e9a..363bed9fde 100644
    a b class ScannedChannelInfo 
    118118    nit_vec_t               m_nits;
    119119    sdt_map_t               m_sdts;
    120120    bat_vec_t               m_bats;
     121    QMap<uint64_t, uint64_t> opentv_channels;
    121122};
    122123
    123124/** \class ChannelScanSM
    ChannelScanSM::ChannelScanSM(ScanMonitor *_scan_monitor, 
    158159      m_channelTimeout(channel_timeout),
    159160      m_inputName(std::move(_inputname)),
    160161      m_testDecryption(test_decryption),
     162      scanOpenTVBouquet(0),
     163      scanOpenTVRegion(0),
     164      scanOpenTVRegionMask(0),
    161165      // Misc
    162166      m_analogSignalHandler(new AnalogSignalHandler(this))
    163167{
    void ChannelScanSM::SetAnalog(bool is_analog) 
    251255        m_signalMonitor->AddListener(m_analogSignalHandler);
    252256}
    253257
     258void ChannelScanSM::SetOpenTV(uint openTVBouquet, uint openTVRegion)
     259{
     260    scanOpenTVBouquet = openTVBouquet;
     261    scanOpenTVRegion = openTVRegion;
     262    if (openTVRegion)
     263        scanOpenTVRegionMask = 1 << openTVRegion;
     264    else
     265        scanOpenTVRegionMask = (uint)-1;
     266}
     267
    254268void ChannelScanSM::HandleAllGood(void)
    255269{
    256270    QMutexLocker locker(&m_lock);
    void ChannelScanSM::HandleBAT(const BouquetAssociationTable *bat) 
    507521
    508522    m_otherTableTime = m_timer.elapsed() + m_otherTableTimeout;
    509523
     524    if (0 != bat->BouquetDescriptorsLength())
     525    {
     526        vector<const unsigned char*> desc =
     527            MPEGDescriptor::Parse(bat->BouquetDescriptors(),
     528                                  bat->BouquetDescriptorsLength());
     529    }
     530
    510531    for (uint i = 0; i < bat->TransportStreamCount(); ++i)
    511532    {
    512533        uint tsid = bat->TSID(i);
    void ChannelScanSM::HandleBAT(const BouquetAssociationTable *bat) 
    546567                   m_defAuthorities[index] = authority.DefaultAuthority();
    547568            }
    548569        }
     570
     571        if (scanOpenTVBouquet > 0)
     572        {
     573            const unsigned char *otv_chan_list =
     574                MPEGDescriptor::Find(parsed, PrivateDescriptorID::opentv_channel_list);
     575            if (otv_chan_list)
     576            {
     577                OpenTVChannelListDescriptor opentvChannelList(otv_chan_list);
     578
     579                uint64_t regionMask = (uint64_t)-1;
     580                if (opentvChannelList.RegionID() > 0 && opentvChannelList.RegionID() < 32)
     581                    regionMask = ((uint64_t)1) << opentvChannelList.RegionID();
     582
     583                for (uint j = 0; j < opentvChannelList.ChannelCount(); j++)
     584                {
     585                    uint64_t index = ((uint64_t)netid << 32) |
     586                        bat->BouquetID() << 16 |
     587                        opentvChannelList.ServiceID(j);
     588                    if (!m_currentInfo)
     589                        m_currentInfo = new ScannedChannelInfo();
     590                    if (m_currentInfo->opentv_channels.contains(index))
     591                    {
     592                        m_currentInfo->opentv_channels[index] |= regionMask << 32;
     593                    }
     594                    else
     595                    {
     596                        m_currentInfo->opentv_channels[index] =
     597                            regionMask << 32 |
     598                            (opentvChannelList.ChannelID(j) << 16);
     599                    }
     600                    if (regionMask & scanOpenTVRegionMask)
     601                    {
     602                        m_currentInfo->opentv_channels[index] |=
     603                            opentvChannelList.ChannelNumber(j);
     604                    }
     605                }
     606            }
     607        }
    549608    }
    550609    UpdateChannelInfo(true);
    551610}
    ChannelScanSM::GetChannelList(transport_scan_items_it_t trans_info, 
    16521711            if (it != ukChanNums.end())
    16531712            {
    16541713                info.m_chanNum = QString::number(*it);
     1714                continue;
     1715            }
     1716
     1717            // See if there is an openTV LCN
     1718            if (scanOpenTVBouquet > 0)
     1719            {
     1720                QMap<uint64_t, uint64_t>::const_iterator oit = scan_info->opentv_channels.find(
     1721                        ((qlonglong)info.m_origNetId<<32) | scanOpenTVBouquet << 16 | info.m_serviceId);
     1722                if (oit != scan_info->opentv_channels.end())
     1723                {
     1724                    uint chanNum = (*oit) & 0xffff;
     1725                    if (chanNum > 0)
     1726                    {
     1727                        info.m_chanNum = chanNum;
     1728                        continue;
     1729                    }
     1730                }
    16551731            }
    16561732        }
    16571733
  • mythtv/libs/libmythtv/channelscan/channelscan_sm.h

    diff --git a/mythtv/libs/libmythtv/channelscan/channelscan_sm.h b/mythtv/libs/libmythtv/channelscan/channelscan_sm.h
    index 46613c92b0..2a4908792a 100644
    a b class ChannelScanSM : public MPEGStreamListener, 
    121121    void SetChannelTimeout(uint val)   { m_channelTimeout = val; }
    122122    void SetScanDTVTunerType(DTVTunerType t) { m_scanDTVTunerType = t; }
    123123    void SetScanDTVTunerType(int t) { m_scanDTVTunerType = DTVTunerType(t); }
     124    void SetOpenTV(uint openTVBouquet, uint openTVRegion);
    124125
    125126    uint GetSignalTimeout(void)  const { return m_signalTimeout; }
    126127    uint GetChannelTimeout(void) const { return m_channelTimeout; }
    class ChannelScanSM : public MPEGStreamListener, 
    225226    // Optional info
    226227    DTVTunerType      m_scanDTVTunerType  {DTVTunerType::kTunerTypeUnknown};
    227228
     229    uint              scanOpenTVBouquet;
     230    uint              scanOpenTVRegion;
     231    uint              scanOpenTVRegionMask;
     232
    228233    /// The big lock
    229234    mutable QMutex    m_lock;
    230235
  • mythtv/libs/libmythtv/channelscan/channelscanmiscsettings.h

    diff --git a/mythtv/libs/libmythtv/channelscan/channelscanmiscsettings.h b/mythtv/libs/libmythtv/channelscan/channelscanmiscsettings.h
    index 9f8ed5fa3f..0c36530987 100644
    a b class ScanRollOff: public TransMythUIComboBoxSetting 
    443443    };
    444444};
    445445
     446class OpenTVBouquet: public TransTextEditSetting
     447{
     448  public:
     449    OpenTVBouquet()
     450    {
     451        setLabel(QObject::tr("OpenTV Bouquet"));
     452        setHelpText(QObject::tr("OpenTV Bouquet (Default: 0 = dont use)\n"
     453                                "OpenTV Bouquet for channel numbers."));
     454    };
     455};
     456
     457class OpenTVRegion: public TransTextEditSetting
     458{
     459  public:
     460    OpenTVRegion()
     461    {
     462        setLabel(QObject::tr("OpenTV Region"));
     463        setHelpText(QObject::tr("OpenTV Region (Default: 0 = use any)\n"
     464                                "OpenTV Region for preferred channel numbers when duplicates exist."));
     465    };
     466};
     467
    446468class PaneError : public GroupSetting
    447469{
    448470  public:
  • mythtv/libs/libmythtv/channelscan/channelscanner.cpp

    diff --git a/mythtv/libs/libmythtv/channelscan/channelscanner.cpp b/mythtv/libs/libmythtv/channelscan/channelscanner.cpp
    index f20db6b584..7aa781685c 100644
    a b void ChannelScanner::Scan( 
    122122    bool           do_full_channel_search,
    123123    bool           do_add_full_ts,
    124124    ServiceRequirements service_requirements,
     125    uint           opentvBouquet,
     126    uint           opentvRegion,
    125127    // stuff needed for particular scans
    126128    uint           mplexid /* TransportScan */,
    127129    const QMap<QString,QString> &startChan /* NITAddScan */,
    void ChannelScanner::Scan( 
    155157
    156158    bool ok = false;
    157159
     160    if (opentvBouquet)
     161        m_sigmonScanner->SetOpenTV(opentvBouquet, opentvRegion);
     162
    158163    if ((ScanTypeSetting::FullScan_ATSC   == scantype) ||
    159164        (ScanTypeSetting::FullScan_DVBC   == scantype) ||
    160165        (ScanTypeSetting::FullScan_DVBT   == scantype) ||
  • mythtv/libs/libmythtv/channelscan/channelscanner.h

    diff --git a/mythtv/libs/libmythtv/channelscan/channelscanner.h b/mythtv/libs/libmythtv/channelscan/channelscanner.h
    index 66e0f9b7d9..ffab7fc6d4 100644
    a b class MTV_PUBLIC ChannelScanner 
    8181              bool           do_full_channel_search,
    8282              bool           do_add_full_ts,
    8383              ServiceRequirements service_requirements,
     84              uint           opentvBouquet,
     85              uint           opentvRegion,
    8486              // stuff needed for particular scans
    8587              uint           mplexid,
    8688              const QMap<QString,QString> &startChan,
  • mythtv/libs/libmythtv/channelscan/scanwizardconfig.cpp

    diff --git a/mythtv/libs/libmythtv/channelscan/scanwizardconfig.cpp b/mythtv/libs/libmythtv/channelscan/scanwizardconfig.cpp
    index 5e4a76e4a3..4af8114c44 100644
    a b void ScanWizard::SetupConfig( 
    3737    m_fullSearch = new FullChannelSearch();
    3838    m_addFullTS = new AddFullTS();
    3939    m_trustEncSI = new TrustEncSISetting();
     40    opentvBouquet = new OpenTVBouquet();
     41    opentvRegion = new OpenTVRegion();
    4042
    4143    setLabel(tr("Channel Scan"));
    4244
    void ScanWizard::SetupConfig( 
    4749    addChild(m_fullSearch);
    4850    addChild(m_addFullTS);
    4951    addChild(m_trustEncSI);
     52    addChild(opentvBouquet);
     53    addChild(opentvRegion);
    5054
    5155    addChild(m_videoSource);
    5256    addChild(m_input);
    bool ScanWizard::DoTestDecryption(void) const 
    110114    return m_trustEncSI->boolValue();
    111115}
    112116
     117uint ScanWizard::GetOpenTVBouquet(void) const
     118{
     119    return opentvBouquet->getValue().toUInt(0);
     120}
     121
     122uint ScanWizard::GetOpenTVRegion(void) const
     123{
     124    return opentvRegion->getValue().toUInt(0);
     125}
     126
    113127void ScanWizard::SetPaneDefaults(const QString &cardid_inputname)
    114128{
    115129    const int sourceid = m_videoSource->getValue().toInt();
  • mythtv/libs/libmythtv/channelscan/scanwizardconfig.h

    diff --git a/mythtv/libs/libmythtv/channelscan/scanwizardconfig.h b/mythtv/libs/libmythtv/channelscan/scanwizardconfig.h
    index 0b4d968d63..5a208ce221 100644
    a b class CompleteChannelsOnly; 
    4949class FullChannelSearch;
    5050class AddFullTS;
    5151class TrustEncSISetting;
     52class OpenTVBouquet;
     53class OpenTVRegion;
    5254
    5355class PaneAll;
    5456class PaneATSC;
    class ScanOptionalConfig : public GroupSetting 
    151153    PaneDVBUtilsImport     *m_paneDVBUtilsImport       {nullptr};
    152154    PaneExistingScanImport *m_paneExistingScanImport   {nullptr};
    153155};
    154 
    155156#endif // _SCAN_WIZARD_CONFIG_H_
  • mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp

    diff --git a/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp b/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp
    index 23217ff699..eb2aa7c839 100644
    a b QString FreesatCallsignDescriptor::toString(void) const 
    682682    return ret;
    683683}
    684684
     685QString OpenTVChannelListDescriptor::toString() const
     686{
     687    QString ret = QString("OpenTVChannelListDescriptor region: %1 sid->chan_num(id): ").arg(RegionID());
     688    for (uint i = 0; i < ChannelCount(); i++)
     689    {
     690        ret += QString("%1->%2(%3)").arg(ServiceID(i)).arg(ChannelNumber(i)).arg(ChannelID(i));
     691        ret += (i+1<ChannelCount()) ? ", " : "";
     692    }
     693    return ret;
     694}
     695
    685696QString CAIdentifierDescriptor::toString(void) const
    686697{
    687698    QString ret = QString("CAIdentifierDescriptor ");
  • mythtv/libs/libmythtv/mpeg/dvbdescriptors.h

    diff --git a/mythtv/libs/libmythtv/mpeg/dvbdescriptors.h b/mythtv/libs/libmythtv/mpeg/dvbdescriptors.h
    index 57d2ae0db7..9b7c9b3902 100644
    a b class BSkyBLCNDescriptor : public MPEGDescriptor 
    23272327    QString toString(void) const override; // MPEGDescriptor
    23282328};
    23292329
     2330class OpenTVChannelListDescriptor : public MPEGDescriptor
     2331{
     2332  public:
     2333    OpenTVChannelListDescriptor(const unsigned char *data, int len = 300) :
     2334        MPEGDescriptor(data, len, PrivateDescriptorID::opentv_channel_list) { }
     2335    //       Name             bits  loc  expected value
     2336    // descriptor_tag           8   0.0       0xB1
     2337    // descriptor_length        8   1.0
     2338
     2339    uint ChannelCount(void) const { return (DescriptorLength() - 2)/9; }
     2340
     2341    uint RegionID() const
     2342        { return (m_data[2] << 8) | m_data[3]; }
     2343
     2344    uint ServiceID(uint i) const
     2345        { return (m_data[4 + 0 + (i*9)] << 8) | m_data[4 + 1 + (i*9)]; }
     2346
     2347    uint ChannelType(uint i) const
     2348        { return m_data[4 + 2 + (i*9)]; }
     2349
     2350    uint ChannelID(uint i) const
     2351        { return ((m_data[4 + 3 + (i*9)] << 8) | m_data[4 + 5 + (i*9)]); }
     2352
     2353    uint ChannelNumber(uint i) const
     2354        { return ((m_data[4 + 5 + (i*9)] << 8) | m_data[4 + 6 + (i*9)]); }
     2355
     2356    uint Flags(uint i) const
     2357        { return ((m_data[4 + 7 + (i*9)] << 8) | m_data[4 + 8 + (i*9)]) & 0xf; }
     2358
     2359    QString toString(void) const;
     2360};
     2361
    23302362// ETSI TS 102 323 (TV Anytime)
    23312363class DVBContentIdentifierDescriptor : public MPEGDescriptor
    23322364{
  • mythtv/libs/libmythtv/mpeg/dvbstreamdata.cpp

    diff --git a/mythtv/libs/libmythtv/mpeg/dvbstreamdata.cpp b/mythtv/libs/libmythtv/mpeg/dvbstreamdata.cpp
    index 3d8fb28a14..a57c7bbc56 100644
    a b bool DVBStreamData::GetEITPIDChanges(const uint_vec_t &cur_pids, 
    473473            add_pids.push_back(DVB_BVLONG_EIT_PID);
    474474        }
    475475
     476        // opentv eit pids
     477        if (m_dvbEitDishnetLong)
     478        {
     479            uint pid;
     480            for(pid=OTV_EIT_TIT_PID_START; pid <= OTV_EIT_TIT_PID_END; pid++)
     481            {
     482                if (find(cur_pids.begin(), cur_pids.end(),
     483                         pid) == cur_pids.end())
     484                    add_pids.push_back(pid);
     485            }
     486            for(pid=OTV_EIT_SUP_PID_START; pid <= OTV_EIT_SUP_PID_END; pid++)
     487            {
     488                if (find(cur_pids.begin(), cur_pids.end(),
     489                         pid) == cur_pids.end())
     490                    add_pids.push_back(pid);
     491            }
     492        }
     493
    476494        if (m_desiredNetId == PREMIERE_ONID &&
    477495            find(cur_pids.begin(), cur_pids.end(),
    478496                 (uint) PREMIERE_EIT_DIREKT_PID) == cur_pids.end())
    bool DVBStreamData::GetEITPIDChanges(const uint_vec_t &cur_pids, 
    523541            del_pids.push_back(DVB_BVLONG_EIT_PID);
    524542        }
    525543
     544        // opentv eit pids
     545        if (m_dvbEitDishnetLong)
     546        {
     547            uint pid;
     548            for(pid=OTV_EIT_TIT_PID_START; pid <= OTV_EIT_TIT_PID_END; pid++)
     549            {
     550                if (find(cur_pids.begin(), cur_pids.end(),
     551                         pid) != cur_pids.end())
     552                    del_pids.push_back(pid);
     553            }
     554            for(pid=OTV_EIT_SUP_PID_START; pid <= OTV_EIT_SUP_PID_END; pid++)
     555            {
     556                if (find(cur_pids.begin(), cur_pids.end(),
     557                         pid) != cur_pids.end())
     558                    del_pids.push_back(pid);
     559            }
     560        }
     561
    526562        if (m_desiredNetId == PREMIERE_ONID &&
    527563            find(cur_pids.begin(), cur_pids.end(),
    528564                 (uint) PREMIERE_EIT_DIREKT_PID) != cur_pids.end())
  • mythtv/libs/libmythtv/mpeg/mpegdescriptors.cpp

    diff --git a/mythtv/libs/libmythtv/mpeg/mpegdescriptors.cpp b/mythtv/libs/libmythtv/mpeg/mpegdescriptors.cpp
    index db8cb7fc93..dae8e1a2b5 100644
    a b QString MPEGDescriptor::DescriptorTagString(void) const 
    375375        case PrivateDescriptorID::premiere_content_transmission: /* 0xF2 */
    376376            comma_list_append(str, "Possibly Premiere DE Content Transmission");
    377377            break;
     378        case PrivateDescriptorID::opentv_channel_list: /* 0xB1 */
     379            comma_list_append(str, "Possibly DVB OpenTV Channel List");
     380            break;
    378381    }
    379382
    380383    if (str.isEmpty())
    QString MPEGDescriptor::toStringPD(uint priv_dsid) const 
    561564        SET_STRING(ComponentNameDescriptor);
    562565    }
    563566    // POSSIBLY UNSAFE ! -- end
     567    else if (PrivateDescriptorID::opentv_channel_list == DescriptorTag())
     568        SET_STRING(OpenTVChannelListDescriptor);
    564569    else
    565570    {
    566571        str = QString("%1 Descriptor (0x%2) length(%3). Dumping\n")
  • mythtv/libs/libmythtv/mpeg/mpegdescriptors.h

    diff --git a/mythtv/libs/libmythtv/mpeg/mpegdescriptors.h b/mythtv/libs/libmythtv/mpeg/mpegdescriptors.h
    index f3ad43a65f..dd64a2f611 100644
    a b class PrivateDescriptorID 
    218218        premiere_content_order         = 0xF0,
    219219        premiere_parental_information  = 0xF1,
    220220        premiere_content_transmission  = 0xF2,
     221
     222        // Private -- opentv
     223        opentv_titles_1                  = 0xA0, /* implemented */
     224        opentv_titles_2                  = 0xA1, /* implemented */
     225        opentv_titles_3                  = 0xA2, /* implemented */
     226        opentv_titles_4                  = 0xA3, /* implemented */
     227        opentv_summaries_1               = 0xA8, /* implemented */
     228        opentv_summaries_2               = 0xA9, /* implemented */
     229        opentv_summaries_3               = 0xAA, /* implemented */
     230        opentv_summaries_4               = 0xAB, /* implemented */
     231        opentv_channel_list              = 0xB1, /* partial */
    221232    };
    222233};
    223234
  • mythtv/libs/libmythtv/mpeg/mpegtables.h

    diff --git a/mythtv/libs/libmythtv/mpeg/mpegtables.h b/mythtv/libs/libmythtv/mpeg/mpegtables.h
    index 045fd475e9..39c44e8d1d 100644
    a b enum 
    234234    /// The all-ones PID value 0x1FFF indicates a Null TS Packet
    235235    /// introduced to maintain a constant bit rate of a TS Multiplex.
    236236    MPEG_NULL_PID      = 0x1fff,
     237
     238    // OpenTV EIT PIDs
     239    OTV_EIT_TIT_PID_START  = 0x30,
     240    OTV_EIT_TIT_PID_END    = 0x37,
     241    OTV_EIT_SUP_PID_START  = 0x40,
     242    OTV_EIT_SUP_PID_END    = 0x47,
    237243};
    238244
    239245/** \class TableID
    class MTV_PUBLIC TableID 
    364370        SRVLOC   = 0xA1,
    365371        TSS      = 0xA2,
    366372        CMPNAME  = 0xA3,
     373
     374        // opentv
     375        OTV_EIT_TITbeg  = 0xA0, // always on pids config (0x30-0x37)
     376        OTV_EIT_TITend  = 0xA3, // always on pids config (0x30-0x37)
     377        OTV_EIT_SUMbeg  = 0xA8, // always on pids config (0x40-0x47)
     378        OTV_EIT_SUMend  = 0xAB, // always on pids config (0x40-0x47)
    367379    };
    368380};
    369381
  • mythtv/libs/libmythtv/scanwizard.cpp

    diff --git a/mythtv/libs/libmythtv/scanwizard.cpp b/mythtv/libs/libmythtv/scanwizard.cpp
    index 6b6f18478d..d200ef9f11 100644
    a b void ScanWizard::Scan() 
    186186            DoChannelNumbersOnly(),   DoCompleteChannelsOnly(),
    187187            DoFullChannelSearch(),
    188188            DoAddFullTS(),            GetServiceRequirements(),
     189            GetOpenTVBouquet(),       GetOpenTVRegion(),
     190
    189191            // stuff needed for particular scans
    190192            GetMultiplex(),         start_chan,
    191193            GetFrequencyStandard(), GetModulation(),
  • mythtv/libs/libmythtv/scanwizard.h

    diff --git a/mythtv/libs/libmythtv/scanwizard.h b/mythtv/libs/libmythtv/scanwizard.h
    index 1d9edab85e..4d7637890e 100644
    a b class MTV_PUBLIC ScanWizard : public GroupSetting 
    9494    bool    DoFullChannelSearch(void)    const;
    9595    bool    DoAddFullTS(void)            const;
    9696    bool    DoTestDecryption(void)       const;
     97    uint    GetOpenTVBouquet(void) const;
     98    uint    GetOpenTVRegion(void) const;
    9799
    98100  protected:
    99101    VideoSourceSelector  *m_videoSource   {nullptr};
    class MTV_PUBLIC ScanWizard : public GroupSetting 
    107109    FullChannelSearch    *m_fullSearch    {nullptr};
    108110    AddFullTS            *m_addFullTS     {nullptr};
    109111    TrustEncSISetting    *m_trustEncSI    {nullptr};
     112    OpenTVBouquet       *opentvBouquet;
     113    OpenTVRegion        *opentvRegion;
    110114// End of members moved from ScanWizardConfig
    111115};
    112116
  • mythtv/programs/mythtv-setup/main.cpp

    diff --git a/mythtv/programs/mythtv-setup/main.cpp b/mythtv/programs/mythtv-setup/main.cpp
    index 8b2fc8ccab..5a8e4a4fd9 100644
    a b int main(int argc, char *argv[]) 
    258258    bool    scanCompleteOnly = false;
    259259    bool    scanFullChannelSearch = false;
    260260    bool    addFullTS = false;
     261    uint    scanOpenTVBouquet = 0;
     262    uint    scanOpenTVRegion = 0;
    261263    ServiceRequirements scanServiceRequirements = kRequireAV;
    262264    uint    scanCardId = 0;
    263265    QString frequencyStandard = "atsc";
    int main(int argc, char *argv[]) 
    351353        scanFullChannelSearch = true;
    352354    if (cmdline.toBool("addfullts"))
    353355        addFullTS = true;
     356    if (cmdline.toBool("opentvbouquet"))
     357        scanOpenTVBouquet = cmdline.toUInt("opentvbouquet");
     358    if (cmdline.toBool("opentvregion"))
     359        scanOpenTVRegion = cmdline.toUInt("opentvregion");
    354360    if (cmdline.toBool("servicetype"))
    355361    {
    356362        scanServiceRequirements = kRequireNothing;
    int main(int argc, char *argv[]) 
    509515                         scanFullChannelSearch,
    510516                         addFullTS,
    511517                         scanServiceRequirements,
     518                         scanOpenTVBouquet,
     519                         scanOpenTVRegion,
    512520                         // stuff needed for particular scans
    513521                         /* mplexid   */ 0,
    514522                         startChan, frequencyStandard, modulation, region);