ScanSDT add extended menu option

This commit is contained in:
Jacek Jendrzej
2021-06-30 14:57:54 +02:00
parent 86d30a4740
commit 91a19a4a56
8 changed files with 27 additions and 6 deletions

View File

@@ -269,6 +269,9 @@ channellist.additional_on ein
channellist.additional_on_minitv ein (mit MiniTV) channellist.additional_on_minitv ein (mit MiniTV)
channellist.current_tp Aktueller Transponder channellist.current_tp Aktueller Transponder
channellist.edit Bearbeiten channellist.edit Bearbeiten
channellist.enablesdt_off aus
channellist.enablesdt_on ein
channellist.enablesdt_on_extended ein (mit PMT)
channellist.epgtext_align_left links channellist.epgtext_align_left links
channellist.epgtext_align_right rechts channellist.epgtext_align_right rechts
channellist.extended Sendungsfortschritt anzeigen channellist.extended Sendungsfortschritt anzeigen

View File

@@ -269,6 +269,9 @@ channellist.additional_on on
channellist.additional_on_minitv on (with MiniTV) channellist.additional_on_minitv on (with MiniTV)
channellist.current_tp Current transponder channellist.current_tp Current transponder
channellist.edit Edit channellist.edit Edit
channellist.enablesdt_off off
channellist.enablesdt_on on
channellist.enablesdt_on_extended on (with PMT)
channellist.epgtext_align_left left channellist.epgtext_align_left left
channellist.epgtext_align_right right channellist.epgtext_align_right right
channellist.extended Show event progress channellist.extended Show event progress

View File

@@ -207,6 +207,15 @@ const CMenuOptionChooser::keyval CHANNELLIST_NEW_ZAP_MODE_OPTIONS[CHANNELLIST_NE
{ 2, LOCALE_CHANNELLIST_NEW_ZAP_MODE_ACTIVE } { 2, LOCALE_CHANNELLIST_NEW_ZAP_MODE_ACTIVE }
}; };
#define CHANNELLIST_ENABLESDT_OPTION_COUNT 3
const CMenuOptionChooser::keyval CHANNELLIST_ENABLESDT_OPTIONS[CHANNELLIST_ENABLESDT_OPTION_COUNT] =
{
{ 0, LOCALE_CHANNELLIST_ENABLESDT_OFF },
{ 1, LOCALE_CHANNELLIST_ENABLESDT_ON },
{ 2, LOCALE_CHANNELLIST_ENABLESDT_ON_EXTENDED }
};
#define CPU_FREQ_OPTION_COUNT 13 #define CPU_FREQ_OPTION_COUNT 13
const CMenuOptionChooser::keyval_ext CPU_FREQ_OPTIONS[CPU_FREQ_OPTION_COUNT] = const CMenuOptionChooser::keyval_ext CPU_FREQ_OPTIONS[CPU_FREQ_OPTION_COUNT] =
{ {
@@ -603,7 +612,7 @@ int CMiscMenue::showMiscSettingsMenuChanlist()
mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_SHOW_EMPTY_FAVS); mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_SHOW_EMPTY_FAVS);
ms_chanlist->addItem(mc); ms_chanlist->addItem(mc);
mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_CHANNELLIST_ENABLESDT, &g_settings.enable_sdt, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_CHANNELLIST_ENABLESDT, &g_settings.enable_sdt, CHANNELLIST_ENABLESDT_OPTIONS, CHANNELLIST_ENABLESDT_OPTION_COUNT, true, this);
mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_ENABLESDT); mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_ENABLESDT);
ms_chanlist->addItem(mc); ms_chanlist->addItem(mc);

View File

@@ -296,6 +296,9 @@ typedef enum
LOCALE_CHANNELLIST_ADDITIONAL_ON_MINITV, LOCALE_CHANNELLIST_ADDITIONAL_ON_MINITV,
LOCALE_CHANNELLIST_CURRENT_TP, LOCALE_CHANNELLIST_CURRENT_TP,
LOCALE_CHANNELLIST_EDIT, LOCALE_CHANNELLIST_EDIT,
LOCALE_CHANNELLIST_ENABLESDT_OFF,
LOCALE_CHANNELLIST_ENABLESDT_ON,
LOCALE_CHANNELLIST_ENABLESDT_ON_EXTENDED,
LOCALE_CHANNELLIST_EPGTEXT_ALIGN_LEFT, LOCALE_CHANNELLIST_EPGTEXT_ALIGN_LEFT,
LOCALE_CHANNELLIST_EPGTEXT_ALIGN_RIGHT, LOCALE_CHANNELLIST_EPGTEXT_ALIGN_RIGHT,
LOCALE_CHANNELLIST_EXTENDED, LOCALE_CHANNELLIST_EXTENDED,

View File

@@ -296,6 +296,9 @@ const char * locale_real_names[] =
"channellist.additional_on_minitv", "channellist.additional_on_minitv",
"channellist.current_tp", "channellist.current_tp",
"channellist.edit", "channellist.edit",
"channellist.enablesdt_off",
"channellist.enablesdt_on",
"channellist.enablesdt_on_extended",
"channellist.epgtext_align_left", "channellist.epgtext_align_left",
"channellist.epgtext_align_right", "channellist.epgtext_align_right",
"channellist.extended", "channellist.extended",

View File

@@ -255,7 +255,7 @@ class CZapit : public OpenThreads::Thread
void Abort() { abort_zapit = 1; }; void Abort() { abort_zapit = 1; };
bool Recording() { return currentMode & RECORD_MODE; }; bool Recording() { return currentMode & RECORD_MODE; };
bool makeRemainingChannelsBouquet() { return config.makeRemainingChannelsBouquet; }; bool makeRemainingChannelsBouquet() { return config.makeRemainingChannelsBouquet; };
bool GetScanSDT() { return config.scanSDT; }; int GetScanSDT() { return config.scanSDT; };
void SetScanSDT(int _scanSDT) { config.scanSDT = _scanSDT; }; void SetScanSDT(int _scanSDT) { config.scanSDT = _scanSDT; };
bool scanPids() { return config.scanPids; }; bool scanPids() { return config.scanPids; };
void scanPids(bool enable) { config.scanPids = enable; }; void scanPids(bool enable) { config.scanPids = enable; };

View File

@@ -215,8 +215,8 @@ bool CSdt::Parse(t_transport_stream_id &tsid, t_original_network_id &onid)
sidpmt = pat.getSids(); sidpmt = pat.getSids();
//Update form PAT if SDT is empty //Update form PAT if SDT is empty
bool ScanSDT = CZapit::getInstance()->GetScanSDT();//check for normal scan withot ScanSDT int ScanSDT = CZapit::getInstance()->GetScanSDT();//check for normal scan without ScanSDT-PMT
if(ScanSDT && !sdt_read && !sidpmt.empty() && (pat_tsid == transport_stream_id || (transport_stream_id == 0 && pat_tsid > 1 ))){ if(ScanSDT == 2 && !sdt_read && !sidpmt.empty() && (pat_tsid == transport_stream_id || (transport_stream_id == 0 && pat_tsid > 1 ))){
bool ret = false; bool ret = false;
for (std::map<int,int>::iterator patit=sidpmt.begin(); patit!=sidpmt.end(); ++patit){ for (std::map<int,int>::iterator patit=sidpmt.begin(); patit!=sidpmt.end(); ++patit){
if(patit->first != 0 && patit->second != 0){ if(patit->first != 0 && patit->second != 0){
@@ -322,7 +322,7 @@ bool CSdt::Parse(t_transport_stream_id &tsid, t_original_network_id &onid)
} }
} }
} }
if(ScanSDT && pat_tsid == transport_stream_id){ if(ScanSDT == 2 && pat_tsid == transport_stream_id){
for (std::map<int,int>::iterator patit=sidpmt.begin(); patit!=sidpmt.end(); ++patit){ for (std::map<int,int>::iterator patit=sidpmt.begin(); patit!=sidpmt.end(); ++patit){
if(current && current_tp_id != CFEManager::getInstance()->getLiveFE()->getTsidOnid()){ if(current && current_tp_id != CFEManager::getInstance()->getLiveFE()->getTsidOnid()){
failed = true; failed = true;

View File

@@ -3007,7 +3007,7 @@ void CZapitSdtMonitor::run()
bool updated = CServiceManager::getInstance()->SaveCurrentServices(tpid); bool updated = CServiceManager::getInstance()->SaveCurrentServices(tpid);
CServiceManager::getInstance()->CopyCurrentServices(tpid); CServiceManager::getInstance()->CopyCurrentServices(tpid);
if(updated && (CZapit::getInstance()->GetScanSDT() == 1)) if(updated && (CZapit::getInstance()->GetScanSDT()))
CZapit::getInstance()->SendEvent(CZapitClient::EVT_SDT_CHANGED); CZapit::getInstance()->SendEvent(CZapitClient::EVT_SDT_CHANGED);
if(!updated) if(!updated)
printf("[sdt monitor] no changes.\n"); printf("[sdt monitor] no changes.\n");