Merge branch 'next' of coolstreamtech.de:cst-private-neutrino into next

Origin commit data
------------------
Commit: 34187b12cd
Author: [CST] Bas <bas@coolstreamtech.com>
Date: 2013-01-28 (Mon, 28 Jan 2013)
This commit is contained in:
[CST] Bas
2013-01-29 01:21:50 +08:00
20 changed files with 156 additions and 125 deletions

View File

@@ -964,13 +964,15 @@ menu.hint_scan_cable Select cable network to scan
menu.hint_scan_cable_simple Cable scan with optional\nprovider channel numbering menu.hint_scan_cable_simple Cable scan with optional\nprovider channel numbering
menu.hint_scan_commited Select commited input for\nthis satellite menu.hint_scan_commited Select commited input for\nthis satellite
menu.hint_scan_diseqc Select diseqc switch input for\nthis satellite menu.hint_scan_diseqc Select diseqc switch input for\nthis satellite
menu.hint_scan_diseqcorder Diseqc command order for cascaded switches
menu.hint_scan_diseqcrepeat Diseqc repeat for cascaded switches menu.hint_scan_diseqcrepeat Diseqc repeat for cascaded switches
menu.hint_scan_diseqctype Select your diseqc switch protocol\nwith 'advanced' you can use uncommited switches menu.hint_scan_diseqctype Select your diseqc switch protocol\nwith 'advanced' you can use uncommited switches
menu.hint_scan_fast CanalDigitaal/TéléSAT/TV Vlaanderen provider scan\nWARNING: diseqc config will be overwritten menu.hint_scan_fast CanalDigitaal/TéléSAT/TV Vlaanderen provider scan\nWARNING: diseqc config will be overwritten
menu.hint_scan_fastprov Select provider to scan menu.hint_scan_fastprov Select provider to scan
menu.hint_scan_fasttype Select fast scan type menu.hint_scan_fasttype Select fast scan type
menu.hint_scan_fec Select transponder FEC menu.hint_scan_fec Select transponder FEC
menu.hint_scan_femode Select second tuner connection type menu.hint_scan_femode Select tuner connection type
menu.hint_scan_felink Select tuner to link tuner to
menu.hint_scan_fesetup Configure tuner(s) menu.hint_scan_fesetup Configure tuner(s)
menu.hint_scan_fetimeout Time to wait for signal, in 1/10 of second menu.hint_scan_fetimeout Time to wait for signal, in 1/10 of second
menu.hint_scan_freq Enter transponder frequency menu.hint_scan_freq Enter transponder frequency
@@ -1534,6 +1536,7 @@ satsetup.diseqc12 DiSEqC 1.2
satsetup.diseqc_advanced Advanced satsetup.diseqc_advanced Advanced
satsetup.diseqc_com_uncom Commited/Uncommited satsetup.diseqc_com_uncom Commited/Uncommited
satsetup.diseqc_input DiSEqC input satsetup.diseqc_input DiSEqC input
satsetup.diseqc_order DiSEqC command order
satsetup.diseqc_uncom_com Uncommited/Commited satsetup.diseqc_uncom_com Uncommited/Commited
satsetup.diseqcrepeat DiSEqC-repeats satsetup.diseqcrepeat DiSEqC-repeats
satsetup.extended DiSEqC-Settings satsetup.extended DiSEqC-Settings
@@ -1590,7 +1593,7 @@ scants.actcable Cable:
scants.actsatellite Satellite: scants.actsatellite Satellite:
scants.bouquet Bouquet scants.bouquet Bouquet
scants.bouquet_create create new scants.bouquet_create create new
scants.bouquet_erase erase all scants.bouquet_erase erase old
scants.bouquet_leave leave current scants.bouquet_leave leave current
scants.bouquet_satellite Satellite-Bouquet scants.bouquet_satellite Satellite-Bouquet
scants.bouquet_update update scants.bouquet_update update

View File

@@ -33,28 +33,12 @@ typedef struct _scart_status {
bool fastblank; bool fastblank;
} scart_status_t; } scart_status_t;
typedef struct _pwm_status {
u16 pwm_pulse_first;
u16 pwm_pulse_second;
u32 pwm_clock;
} pwm_status_t;
typedef struct cs_control_data {
scart_status_t scart_status;
pwm_status_t pwm_status;
bool hdd_power;
u32 readers;
u32 sys_serial_high, sys_serial_low;
u32 sys_revision;
} cs_control_data_t;
/* ioctls */ /* ioctls */
#define CS_CONTROL_MAGIC 0xDE #define CS_CONTROL_MAGIC 0xDE
#define IOC_CONTROL_WIDESCREEN _IOW(CS_CONTROL_MAGIC, 20, unsigned int) #define IOC_CONTROL_WIDESCREEN _IOW(CS_CONTROL_MAGIC, 20, unsigned int)
#define IOC_CONTROL_TVAV _IOW(CS_CONTROL_MAGIC, 21, unsigned int) #define IOC_CONTROL_TVAV _IOW(CS_CONTROL_MAGIC, 21, unsigned int)
#define IOC_CONTROL_RGB _IOW(CS_CONTROL_MAGIC, 22, unsigned int) #define IOC_CONTROL_RGB _IOW(CS_CONTROL_MAGIC, 22, unsigned int)
#define IOC_CONTROL_SCART_STATUS _IOR(CS_CONTROL_MAGIC, 23, scart_status_t *) #define IOC_CONTROL_SCART_STATUS _IOR(CS_CONTROL_MAGIC, 23, scart_status_t *)
#define IOC_CONTROL_PWM_SPEED _IOW(CS_CONTROL_MAGIC, 24, unsigned int)
#define IOC_CONTROL_HDDPOWER _IOW(CS_CONTROL_MAGIC, 25, unsigned int) #define IOC_CONTROL_HDDPOWER _IOW(CS_CONTROL_MAGIC, 25, unsigned int)
/* ioctl for getting board serial and revision */ /* ioctl for getting board serial and revision */

View File

@@ -29,4 +29,9 @@ extern void cs_tsx_tsp_get_port_config(tsrouter_tsp_config_t *conf);
extern void cs_tsx_hsdp_set_port_config(const tsrouter_hsdp_config_t *conf); extern void cs_tsx_hsdp_set_port_config(const tsrouter_hsdp_config_t *conf);
extern void cs_tsx_tsp_set_port_config(const tsrouter_tsp_config_t *conf); extern void cs_tsx_tsp_set_port_config(const tsrouter_tsp_config_t *conf);
extern void cs_tsx_hsdp_get_port_pll(unsigned int port, unsigned int *pll_index);
extern void cs_tsx_hsdp_set_port_pll(unsigned int port, unsigned int pll_index);
extern void cs_tsx_hsdp_get_port_speed(unsigned int port, unsigned int *speed);
extern void cs_tsx_hsdp_set_port_speed(unsigned int port, unsigned int speed);
#endif /* __TSROUTER_H */ #endif /* __TSROUTER_H */

View File

@@ -88,10 +88,11 @@ void COSDFader::Stop()
{ {
if ( fadeIn || fadeOut ) { if ( fadeIn || fadeOut ) {
g_RCInput->killTimer(fadeTimer); g_RCInput->killTimer(fadeTimer);
usleep(40000);
#ifdef BOXMODEL_APOLLO #ifdef BOXMODEL_APOLLO
frameBuffer->setBlendMode(CNXTFB_BLEND_MODE_PER_PIXEL); // Global alpha multiplied with pixel alpha frameBuffer->setBlendMode(CNXTFB_BLEND_MODE_PER_PIXEL); // Global alpha multiplied with pixel alpha
#else #else
frameBuffer->setBlendMode(1); // Global alpha multiplied with pixel alpha frameBuffer->setBlendMode(1); // Global alpha multiplied with pixel alpha
#endif #endif
fadeIn = fadeOut = false; fadeIn = fadeOut = false;
} }

View File

@@ -543,7 +543,7 @@ void CFrameBuffer::setBlendLevel(int level)
if (ioctl(fd, FBIO_SETOPACITY, value)) if (ioctl(fd, FBIO_SETOPACITY, value))
printf("FBIO_SETOPACITY failed.\n"); printf("FBIO_SETOPACITY failed.\n");
#ifndef ISAPOLLO #if 0
if(level == 100) // TODO: sucks. if(level == 100) // TODO: sucks.
usleep(20000); usleep(20000);
#endif #endif

View File

@@ -694,11 +694,12 @@ int CScanSetup::showFrontendSetup(int number)
if (fe->getInfo()->type == FE_QPSK) { if (fe->getInfo()->type == FE_QPSK) {
/* disable all but mode option for linked frontends */ /* disable all but mode option for linked frontends */
bool allow_moptions = !CFrontend::linked(femode); bool allow_moptions = !CFrontend::linked(femode) && femode != CFrontend::FE_MODE_UNUSED;
if (fecount > 1) { if (fecount > 1) {
/* link to master select */ /* link to master select */
linkfe = new CMenuOptionChooser(LOCALE_SATSETUP_FE_MODE_MASTER, &femaster, feselect, select_count, !allow_moptions, this, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN, true); linkfe = new CMenuOptionChooser(LOCALE_SATSETUP_FE_MODE_MASTER, &femaster, feselect, select_count, !allow_moptions, this, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN, true);
linkfe->setHint("", LOCALE_MENU_HINT_SCAN_FELINK);
setupMenu->addItem(linkfe); setupMenu->addItem(linkfe);
} }
/* diseqc type select */ /* diseqc type select */
@@ -713,6 +714,13 @@ int CScanSetup::showFrontendSetup(int number)
ojDiseqcRepeats->setHint("", LOCALE_MENU_HINT_SCAN_DISEQCREPEAT); ojDiseqcRepeats->setHint("", LOCALE_MENU_HINT_SCAN_DISEQCREPEAT);
setupMenu->addItem(ojDiseqcRepeats); setupMenu->addItem(ojDiseqcRepeats);
/* diseqc cmd order select */
dorder = new CMenuOptionChooser(LOCALE_SATSETUP_DISEQC_ORDER, (int *)&fe_config.diseqc_order, DISEQC_ORDER_OPTIONS, DISEQC_ORDER_OPTION_COUNT,
allow_moptions && (dmode == DISEQC_ADVANCED),
this, CRCInput::convertDigitToKey(shortcut++), "", true);
dorder->setHint("", LOCALE_MENU_HINT_SCAN_DISEQCORDER);
setupMenu->addItem(dorder);
CMenuWidget * satToSelect = new CMenuWidget(LOCALE_SATSETUP_SELECT_SAT, NEUTRINO_ICON_SETTINGS, width); CMenuWidget * satToSelect = new CMenuWidget(LOCALE_SATSETUP_SELECT_SAT, NEUTRINO_ICON_SETTINGS, width);
satToSelect->addIntroItems(); satToSelect->addIntroItems();
@@ -1378,7 +1386,8 @@ bool CScanSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data*
#endif #endif
uniSetup->setActive(dmode == DISEQC_UNICABLE); uniSetup->setActive(dmode == DISEQC_UNICABLE);
bool enable = (dmode < DISEQC_ADVANCED) && (dmode != NO_DISEQC); bool enable = (dmode < DISEQC_ADVANCED) && (dmode != NO_DISEQC);
ojDiseqcRepeats->setActive(enable); ojDiseqcRepeats->setActive(enable && !CFrontend::linked(femode) && femode != CFrontend::FE_MODE_UNUSED);
dorder->setActive(!CFrontend::linked(femode) && femode != CFrontend::FE_MODE_UNUSED && dmode == DISEQC_ADVANCED);
} }
else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_SATSETUP_FE_MODE)) { else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_SATSETUP_FE_MODE)) {
@@ -1404,12 +1413,14 @@ bool CScanSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data*
if (fe && fe->getType() == FE_QPSK) { if (fe && fe->getType() == FE_QPSK) {
if (linkfe) if (linkfe)
linkfe->setActive(CFrontend::linked(femode)); linkfe->setActive(CFrontend::linked(femode));
/* leave diseqc type enabled for TWIN in case user need different unicable setup */
dtype->setActive(femode != CFrontend::FE_MODE_UNUSED && femode != CFrontend::FE_MODE_LINK_LOOP); dtype->setActive(femode != CFrontend::FE_MODE_UNUSED && femode != CFrontend::FE_MODE_LINK_LOOP);
uniSetup->setActive(dmode == DISEQC_UNICABLE && femode != CFrontend::FE_MODE_UNUSED && femode != CFrontend::FE_MODE_LINK_LOOP); uniSetup->setActive(dmode == DISEQC_UNICABLE && femode != CFrontend::FE_MODE_UNUSED && femode != CFrontend::FE_MODE_LINK_LOOP);
dorder->setActive(!CFrontend::linked(femode) && femode != CFrontend::FE_MODE_UNUSED && dmode == DISEQC_ADVANCED);
fsatSelect->setActive(!CFrontend::linked(femode) && femode != CFrontend::FE_MODE_UNUSED); fsatSelect->setActive(!CFrontend::linked(femode) && femode != CFrontend::FE_MODE_UNUSED);
fsatSetup->setActive(!CFrontend::linked(femode) && femode != CFrontend::FE_MODE_UNUSED); fsatSetup->setActive(!CFrontend::linked(femode) && femode != CFrontend::FE_MODE_UNUSED);
bool enable = (dmode < DISEQC_ADVANCED) && (dmode != NO_DISEQC); bool enable = (dmode < DISEQC_ADVANCED) && (dmode != NO_DISEQC);
ojDiseqcRepeats->setActive(!CFrontend::linked(femode) && enable); ojDiseqcRepeats->setActive(!CFrontend::linked(femode) && femode != CFrontend::FE_MODE_UNUSED && enable);
/* if mode changed, set current master too */ /* if mode changed, set current master too */
if (femaster >= 0) if (femaster >= 0)

View File

@@ -60,6 +60,7 @@ class CScanSetup : public CMenuTarget, public CChangeObserver
CMenuForwarder *fsatSetup; CMenuForwarder *fsatSetup;
CMenuForwarder *fsatSelect; CMenuForwarder *fsatSelect;
CMenuOptionChooser * dtype; CMenuOptionChooser * dtype;
CMenuOptionChooser * dorder;
CMenuForwarder *uniSetup; CMenuForwarder *uniSetup;
CMenuOptionNumberChooser * ojDiseqcRepeats; CMenuOptionNumberChooser * ojDiseqcRepeats;
CIntInput * nid; CIntInput * nid;

View File

@@ -1156,7 +1156,6 @@ extern CBouquetManager *g_bouquetManager;
void CNeutrinoApp::channelsInit(bool bOnly) void CNeutrinoApp::channelsInit(bool bOnly)
{ {
int bnum;
CBouquet* tmp; CBouquet* tmp;
printf("[neutrino] Creating channels lists...\n"); printf("[neutrino] Creating channels lists...\n");
@@ -1173,7 +1172,6 @@ void CNeutrinoApp::channelsInit(bool bOnly)
if(g_bouquetManager->existsUBouquet(fav_bouquetname, true) == -1) if(g_bouquetManager->existsUBouquet(fav_bouquetname, true) == -1)
g_bouquetManager->addBouquet(fav_bouquetname, true, true); g_bouquetManager->addBouquet(fav_bouquetname, true, true);
if(TVbouquetList) delete TVbouquetList; if(TVbouquetList) delete TVbouquetList;
if(RADIObouquetList) delete RADIObouquetList; if(RADIObouquetList) delete RADIObouquetList;
@@ -1222,15 +1220,11 @@ void CNeutrinoApp::channelsInit(bool bOnly)
tmp = TVallList->addBouquet(g_Locale->getText(LOCALE_CHANNELLIST_HEAD)); tmp = TVallList->addBouquet(g_Locale->getText(LOCALE_CHANNELLIST_HEAD));
delete tmp->channelList; delete tmp->channelList;
tmp->channelList = new CChannelList(*TVchannelList); tmp->channelList = new CChannelList(*TVchannelList);
//tmp->channelList->SortAlpha();
RADIOallList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_HEAD)); RADIOallList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_HEAD));
tmp = RADIOallList->addBouquet(g_Locale->getText(LOCALE_CHANNELLIST_HEAD)); tmp = RADIOallList->addBouquet(g_Locale->getText(LOCALE_CHANNELLIST_HEAD));
delete tmp->channelList; delete tmp->channelList;
tmp->channelList = new CChannelList(*RADIOchannelList); tmp->channelList = new CChannelList(*RADIOchannelList);
//tmp->channelList->SortAlpha();
TIMER_STOP("[neutrino] sort took");
if(TVsatList) delete TVsatList; if(TVsatList) delete TVsatList;
TVsatList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_SATS)); TVsatList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_SATS));
@@ -1241,8 +1235,7 @@ void CNeutrinoApp::channelsInit(bool bOnly)
sat_iterator_t sit; sat_iterator_t sit;
satellite_map_t satlist = CServiceManager::getInstance()->SatelliteList(); satellite_map_t satlist = CServiceManager::getInstance()->SatelliteList();
for(sit = satlist.begin(); sit != satlist.end(); sit++) { for(sit = satlist.begin(); sit != satlist.end(); sit++) {
CServiceManager::getInstance()->GetAllSatelliteChannels(zapitList, sit->first); if (!CServiceManager::getInstance()->GetAllSatelliteChannels(zapitList, sit->first))
if( zapitList.empty() )
continue; continue;
tvi = 0, ri = 0; tvi = 0, ri = 0;
@@ -1264,36 +1257,42 @@ void CNeutrinoApp::channelsInit(bool bOnly)
TVsatList->deleteBouquet(tmp1); TVsatList->deleteBouquet(tmp1);
if(!ri) if(!ri)
RADIOsatList->deleteBouquet(tmp2); RADIOsatList->deleteBouquet(tmp2);
TIMER_STOP("[neutrino] sat took"); TIMER_STOP("[neutrino] sat took");
} }
/* all HD channels */
if (g_settings.make_hd_list) {
if (CServiceManager::getInstance()->GetAllHDChannels(zapitList)) {
CBouquet* hdBouquet = new CBouquet(0, g_Locale->getText(LOCALE_BOUQUETNAME_HDTV), false, true);
hdBouquet->channelList->SetChannelList(&zapitList);
TVallList->Bouquets.push_back(hdBouquet);
printf("[neutrino] got %d HD channels\n", zapitList.size()); fflush(stdout);
}
}
/* new channels */ /* new channels */
if (g_settings.make_new_list) { if (g_settings.make_new_list) {
CServiceManager::getInstance()->GetAllTvChannels(zapitList, CZapitChannel::NEW); if (CServiceManager::getInstance()->GetAllTvChannels(zapitList, CZapitChannel::NEW)) {
if (!zapitList.empty()) {
CBouquet* newBouquet = new CBouquet(0, g_Locale->getText(LOCALE_BOUQUETNAME_NEW), false, true); CBouquet* newBouquet = new CBouquet(0, g_Locale->getText(LOCALE_BOUQUETNAME_NEW), false, true);
newBouquet->channelList->SetChannelList(&zapitList); newBouquet->channelList->SetChannelList(&zapitList);
TVallList->Bouquets.push_back(newBouquet); TVallList->Bouquets.push_back(newBouquet);
printf("[neutrino] got %d new TV channels\n", zapitList.size()); fflush(stdout); printf("[neutrino] got %d new TV channels\n", zapitList.size()); fflush(stdout);
} }
CServiceManager::getInstance()->GetAllRadioChannels(zapitList, CZapitChannel::NEW); if (CServiceManager::getInstance()->GetAllRadioChannels(zapitList, CZapitChannel::NEW)) {
if (!zapitList.empty()) {
CBouquet* newBouquet = new CBouquet(0, g_Locale->getText(LOCALE_BOUQUETNAME_NEW), false, true); CBouquet* newBouquet = new CBouquet(0, g_Locale->getText(LOCALE_BOUQUETNAME_NEW), false, true);
newBouquet->channelList->SetChannelList(&zapitList); newBouquet->channelList->SetChannelList(&zapitList);
RADIOallList->Bouquets.push_back(newBouquet); RADIOallList->Bouquets.push_back(newBouquet);
printf("[neutrino] got %d new RADIO channels\n", zapitList.size()); fflush(stdout); printf("[neutrino] got %d new RADIO channels\n", zapitList.size()); fflush(stdout);
} }
} }
/* removed channels */
if (g_settings.make_removed_list) { if (g_settings.make_removed_list) {
CServiceManager::getInstance()->GetAllTvChannels(zapitList, CZapitChannel::REMOVED); if (CServiceManager::getInstance()->GetAllTvChannels(zapitList, CZapitChannel::REMOVED)) {
if (!zapitList.empty()) {
CBouquet* newBouquet = new CBouquet(0, g_Locale->getText(LOCALE_BOUQUETNAME_REMOVED), false, true); CBouquet* newBouquet = new CBouquet(0, g_Locale->getText(LOCALE_BOUQUETNAME_REMOVED), false, true);
newBouquet->channelList->SetChannelList(&zapitList); newBouquet->channelList->SetChannelList(&zapitList);
TVallList->Bouquets.push_back(newBouquet); TVallList->Bouquets.push_back(newBouquet);
printf("[neutrino] got %d removed TV channels\n", zapitList.size()); fflush(stdout); printf("[neutrino] got %d removed TV channels\n", zapitList.size()); fflush(stdout);
} }
CServiceManager::getInstance()->GetAllRadioChannels(zapitList, CZapitChannel::REMOVED); if (CServiceManager::getInstance()->GetAllRadioChannels(zapitList, CZapitChannel::REMOVED)) {
if (!zapitList.empty()) {
CBouquet* newBouquet = new CBouquet(0, g_Locale->getText(LOCALE_BOUQUETNAME_REMOVED), false, true); CBouquet* newBouquet = new CBouquet(0, g_Locale->getText(LOCALE_BOUQUETNAME_REMOVED), false, true);
newBouquet->channelList->SetChannelList(&zapitList); newBouquet->channelList->SetChannelList(&zapitList);
RADIOallList->Bouquets.push_back(newBouquet); RADIOallList->Bouquets.push_back(newBouquet);
@@ -1303,63 +1302,36 @@ void CNeutrinoApp::channelsInit(bool bOnly)
TIMER_STOP("[neutrino] sats took"); TIMER_STOP("[neutrino] sats took");
} }
/* Favorites and providers TV bouquets */ /* Favorites and providers bouquets */
bnum = 0; tvi = ri = 0;
for (i = 0; i < g_bouquetManager->Bouquets.size(); i++) { for (i = 0; i < g_bouquetManager->Bouquets.size(); i++) {
if (!g_bouquetManager->Bouquets[i]->bHidden && !g_bouquetManager->Bouquets[i]->tvChannels.empty()) if (!g_bouquetManager->Bouquets[i]->bHidden) {
{ if (g_bouquetManager->Bouquets[i]->getTvChannels(zapitList)) {
if(g_bouquetManager->Bouquets[i]->bUser) if(g_bouquetManager->Bouquets[i]->bUser)
tmp = TVfavList->addBouquet(g_bouquetManager->Bouquets[i]); tmp = TVfavList->addBouquet(g_bouquetManager->Bouquets[i]);
else else
tmp = TVbouquetList->addBouquet(g_bouquetManager->Bouquets[i]); tmp = TVbouquetList->addBouquet(g_bouquetManager->Bouquets[i]);
ZapitChannelList* channels = &(g_bouquetManager->Bouquets[i]->tvChannels); tmp->channelList->SetChannelList(&zapitList);
tmp->channelList->SetChannelList(channels); tvi++;
bnum++; }
if (g_bouquetManager->Bouquets[i]->getRadioChannels(zapitList)) {
if(g_bouquetManager->Bouquets[i]->bUser)
tmp = RADIOfavList->addBouquet(g_bouquetManager->Bouquets[i]);
else
tmp = RADIObouquetList->addBouquet(g_bouquetManager->Bouquets[i]);
tmp->channelList->SetChannelList(&zapitList);
ri++;
}
} }
} }
printf("[neutrino] got %d TV bouquets\n", bnum); fflush(stdout); printf("[neutrino] got %d TV and %d RADIO bouquets\n", tvi, ri); fflush(stdout);
/* all HD channels */
if (g_settings.make_hd_list) {
CServiceManager::getInstance()->GetAllHDChannels(zapitList);
if (!zapitList.empty()) {
CBouquet* hdBouquet = new CBouquet(0, g_Locale->getText(LOCALE_BOUQUETNAME_HDTV), false, true);
hdBouquet->channelList->SetChannelList(&zapitList);
hdBouquet->channelList->SortSat();
TVfavList->Bouquets.push_back(hdBouquet);
printf("[neutrino] got %d HD channels\n", zapitList.size()); fflush(stdout);
}
}
TIMER_STOP("[neutrino] tv took");
/* Favorites and provides RADIO bouquets */
bnum = 0;
for (i = 0; i < g_bouquetManager->Bouquets.size(); i++) {
if (!g_bouquetManager->Bouquets[i]->bHidden && !g_bouquetManager->Bouquets[i]->radioChannels.empty() )
{
if(g_bouquetManager->Bouquets[i]->bUser)
tmp = RADIOfavList->addBouquet(g_bouquetManager->Bouquets[i]);
else
tmp = RADIObouquetList->addBouquet(g_bouquetManager->Bouquets[i]);
ZapitChannelList* channels = &(g_bouquetManager->Bouquets[i]->radioChannels);
tmp->channelList->SetChannelList(channels);
bnum++;
}
}
printf("[neutrino] got %d RADIO bouquets\n", bnum); fflush(stdout);
TIMER_STOP("[neutrino] took"); TIMER_STOP("[neutrino] took");
SetChannelMode(lastChannelMode); SetChannelMode(lastChannelMode);
dprintf(DEBUG_DEBUG, "\nAll bouquets-channels received\n"); dprintf(DEBUG_DEBUG, "\nAll bouquets-channels received\n");
#ifdef DEBUG
struct mallinfo myinfo = mallinfo();
printf("[neutrino] total memory allocated by malloc, in bytes: %d (%dkb), chunks %d\n",
myinfo.arena, myinfo.arena / 1024, myinfo.uordblks);
#endif
reloadhintBox->hide(); reloadhintBox->hide();
} }

View File

@@ -991,6 +991,7 @@ typedef enum
LOCALE_MENU_HINT_SCAN_CABLE_SIMPLE, LOCALE_MENU_HINT_SCAN_CABLE_SIMPLE,
LOCALE_MENU_HINT_SCAN_COMMITED, LOCALE_MENU_HINT_SCAN_COMMITED,
LOCALE_MENU_HINT_SCAN_DISEQC, LOCALE_MENU_HINT_SCAN_DISEQC,
LOCALE_MENU_HINT_SCAN_DISEQCORDER,
LOCALE_MENU_HINT_SCAN_DISEQCREPEAT, LOCALE_MENU_HINT_SCAN_DISEQCREPEAT,
LOCALE_MENU_HINT_SCAN_DISEQCTYPE, LOCALE_MENU_HINT_SCAN_DISEQCTYPE,
LOCALE_MENU_HINT_SCAN_FAST, LOCALE_MENU_HINT_SCAN_FAST,
@@ -998,6 +999,7 @@ typedef enum
LOCALE_MENU_HINT_SCAN_FASTTYPE, LOCALE_MENU_HINT_SCAN_FASTTYPE,
LOCALE_MENU_HINT_SCAN_FEC, LOCALE_MENU_HINT_SCAN_FEC,
LOCALE_MENU_HINT_SCAN_FEMODE, LOCALE_MENU_HINT_SCAN_FEMODE,
LOCALE_MENU_HINT_SCAN_FELINK,
LOCALE_MENU_HINT_SCAN_FESETUP, LOCALE_MENU_HINT_SCAN_FESETUP,
LOCALE_MENU_HINT_SCAN_FETIMEOUT, LOCALE_MENU_HINT_SCAN_FETIMEOUT,
LOCALE_MENU_HINT_SCAN_FREQ, LOCALE_MENU_HINT_SCAN_FREQ,
@@ -1561,6 +1563,7 @@ typedef enum
LOCALE_SATSETUP_DISEQC_ADVANCED, LOCALE_SATSETUP_DISEQC_ADVANCED,
LOCALE_SATSETUP_DISEQC_COM_UNCOM, LOCALE_SATSETUP_DISEQC_COM_UNCOM,
LOCALE_SATSETUP_DISEQC_INPUT, LOCALE_SATSETUP_DISEQC_INPUT,
LOCALE_SATSETUP_DISEQC_ORDER,
LOCALE_SATSETUP_DISEQC_UNCOM_COM, LOCALE_SATSETUP_DISEQC_UNCOM_COM,
LOCALE_SATSETUP_DISEQCREPEAT, LOCALE_SATSETUP_DISEQCREPEAT,
LOCALE_SATSETUP_EXTENDED, LOCALE_SATSETUP_EXTENDED,

View File

@@ -991,6 +991,7 @@ const char * locale_real_names[] =
"menu.hint_scan_cable_simple", "menu.hint_scan_cable_simple",
"menu.hint_scan_commited", "menu.hint_scan_commited",
"menu.hint_scan_diseqc", "menu.hint_scan_diseqc",
"menu.hint_scan_diseqcorder",
"menu.hint_scan_diseqcrepeat", "menu.hint_scan_diseqcrepeat",
"menu.hint_scan_diseqctype", "menu.hint_scan_diseqctype",
"menu.hint_scan_fast", "menu.hint_scan_fast",
@@ -998,6 +999,7 @@ const char * locale_real_names[] =
"menu.hint_scan_fasttype", "menu.hint_scan_fasttype",
"menu.hint_scan_fec", "menu.hint_scan_fec",
"menu.hint_scan_femode", "menu.hint_scan_femode",
"menu.hint_scan_felink",
"menu.hint_scan_fesetup", "menu.hint_scan_fesetup",
"menu.hint_scan_fetimeout", "menu.hint_scan_fetimeout",
"menu.hint_scan_freq", "menu.hint_scan_freq",
@@ -1561,6 +1563,7 @@ const char * locale_real_names[] =
"satsetup.diseqc_advanced", "satsetup.diseqc_advanced",
"satsetup.diseqc_com_uncom", "satsetup.diseqc_com_uncom",
"satsetup.diseqc_input", "satsetup.diseqc_input",
"satsetup.diseqc_order",
"satsetup.diseqc_uncom_com", "satsetup.diseqc_uncom_com",
"satsetup.diseqcrepeat", "satsetup.diseqcrepeat",
"satsetup.extended", "satsetup.extended",

View File

@@ -57,6 +57,8 @@ class CZapitBouquet
CZapitChannel* getChannelByChannelID(const t_channel_id channel_id, const unsigned char serviceType = ST_RESERVED); CZapitChannel* getChannelByChannelID(const t_channel_id channel_id, const unsigned char serviceType = ST_RESERVED);
void sortBouquet(void); void sortBouquet(void);
void sortBouquetByNumber(void); void sortBouquetByNumber(void);
bool getTvChannels(ZapitChannelList &list, int flags = CZapitChannel::PRESENT);
bool getRadioChannels(ZapitChannelList &list, int flags = CZapitChannel::PRESENT);
}; };
typedef vector<CZapitBouquet *> BouquetList; typedef vector<CZapitBouquet *> BouquetList;
@@ -115,7 +117,7 @@ class CBouquetManager
void moveBouquet(const unsigned int oldId, const unsigned int newId); void moveBouquet(const unsigned int oldId, const unsigned int newId);
bool existsChannelInBouquet(unsigned int bq_id, const t_channel_id channel_id); bool existsChannelInBouquet(unsigned int bq_id, const t_channel_id channel_id);
void clearAll(); void clearAll(bool user = true);
void sortBouquets(void); void sortBouquets(void);
}; };

View File

@@ -168,7 +168,10 @@ class CZapitChannel
typedef enum channel_flags { typedef enum channel_flags {
NEW = 0x01, NEW = 0x01,
REMOVED = 0x02, REMOVED = 0x02,
UPDATED = 0x04 UPDATED = 0x04,
NOT_FOUND = 0x08,
PRESENT = 0x05, // NEW + UPDATED
ANY = 0xFF
} channel_flags_t; } channel_flags_t;
casys_map_t camap; casys_map_t camap;

View File

@@ -37,6 +37,7 @@ typedef struct frontend_config {
int uni_lnb; int uni_lnb;
int motorRotationSpeed; int motorRotationSpeed;
int highVoltage; int highVoltage;
int diseqc_order;
} frontend_config_t; } frontend_config_t;
#endif // __FRONTEND_TYPES_H__ #endif // __FRONTEND_TYPES_H__

View File

@@ -135,12 +135,12 @@ class CServiceManager
std::string GetServiceName(t_channel_id channel_id); std::string GetServiceName(t_channel_id channel_id);
tallchans* GetAllChannels(){ return &allchans; }; tallchans* GetAllChannels(){ return &allchans; };
bool GetAllRadioChannels(ZapitChannelList &list, int flags = 0); bool GetAllRadioChannels(ZapitChannelList &list, int flags = CZapitChannel::PRESENT);
bool GetAllTvChannels(ZapitChannelList &list, int flags = 0); bool GetAllTvChannels(ZapitChannelList &list, int flags = CZapitChannel::PRESENT);
bool GetAllHDChannels(ZapitChannelList &list); bool GetAllHDChannels(ZapitChannelList &list, int flags = CZapitChannel::PRESENT);
bool GetAllSatelliteChannels(ZapitChannelList &list, t_satellite_position position); bool GetAllSatelliteChannels(ZapitChannelList &list, t_satellite_position position, int flags = CZapitChannel::PRESENT);
bool GetAllTransponderChannels(ZapitChannelList &list, transponder_id_t tpid); bool GetAllTransponderChannels(ZapitChannelList &list, transponder_id_t tpid, int flags = CZapitChannel::PRESENT);
bool GetAllUnusedChannels(ZapitChannelList &list); bool GetAllUnusedChannels(ZapitChannelList &list, int flags = CZapitChannel::PRESENT);
bool IsChannelTVChannel(const t_channel_id channel_id); bool IsChannelTVChannel(const t_channel_id channel_id);

View File

@@ -157,6 +157,26 @@ void CZapitBouquet::moveService(const unsigned int oldPosition, const unsigned i
} }
} }
bool CZapitBouquet::getTvChannels(ZapitChannelList &list, int flags)
{
list.clear();
for (ZapitChannelList::iterator it = tvChannels.begin(); it != tvChannels.end(); ++it) {
if ((*it)->flags & flags)
list.push_back(*it);
}
return (!list.empty());
}
bool CZapitBouquet::getRadioChannels(ZapitChannelList &list, int flags)
{
list.clear();
for (ZapitChannelList::iterator it = tvChannels.begin(); it != tvChannels.end(); ++it) {
if ((*it)->flags & flags)
list.push_back(*it);
}
return (!list.empty());
}
#if 0 #if 0
size_t CZapitBouquet::recModeRadioSize(const transponder_id_t transponder_id) size_t CZapitBouquet::recModeRadioSize(const transponder_id_t transponder_id)
{ {
@@ -262,7 +282,7 @@ void CBouquetManager::saveBouquets(const CZapitClient::bouquetMode bouquetMode,
if (bouquetMode == CZapitClient::BM_DELETEBOUQUETS) { if (bouquetMode == CZapitClient::BM_DELETEBOUQUETS) {
INFO("removing existing bouquets"); INFO("removing existing bouquets");
//unlink(BOUQUETS_XML); //unlink(BOUQUETS_XML);
g_bouquetManager->clearAll(); g_bouquetManager->clearAll(false);
} }
if (bouquetMode == CZapitClient::BM_DONTTOUCHBOUQUETS) if (bouquetMode == CZapitClient::BM_DONTTOUCHBOUQUETS)
return; return;
@@ -279,7 +299,7 @@ void CBouquetManager::saveBouquets(const CZapitClient::bouquetMode bouquetMode,
Bouquets[0]->Name = providerName; Bouquets[0]->Name = providerName;
} }
if ((bouquetMode == CZapitClient::BM_UPDATEBOUQUETS) || (bouquetMode == CZapitClient::BM_CREATESATELLITEBOUQUET)) { if ((bouquetMode == CZapitClient::BM_UPDATEBOUQUETS) || (bouquetMode == CZapitClient::BM_DELETEBOUQUETS)) {
while (!(Bouquets.empty())) { while (!(Bouquets.empty())) {
CZapitBouquet* bouquet; CZapitBouquet* bouquet;
int dest = g_bouquetManager->existsBouquet(Bouquets[0]->Name.c_str()); int dest = g_bouquetManager->existsBouquet(Bouquets[0]->Name.c_str());
@@ -378,6 +398,13 @@ void CBouquetManager::parseBouquetsXml(const char *fname, bool bUser)
chan->bAlwaysLocked = newBouquet->bLocked; chan->bAlwaysLocked = newBouquet->bLocked;
newBouquet->addService(chan); newBouquet->addService(chan);
} else if (bUser) {
chan = new CZapitChannel(name2, CREATE_CHANNEL_ID64, 1 /*service_type*/,
satellitePosition, freq);
CServiceManager::getInstance()->AddChannel(chan);
chan->flags = CZapitChannel::NOT_FOUND;
chan->bAlwaysLocked = newBouquet->bLocked;
newBouquet->addService(chan);
} }
channel_node = channel_node->xmlNextNode; channel_node = channel_node->xmlNextNode;
@@ -616,12 +643,19 @@ void CBouquetManager::moveBouquet(const unsigned int oldId, const unsigned int n
} }
} }
void CBouquetManager::clearAll() void CBouquetManager::clearAll(bool user)
{ {
for (unsigned int i =0; i < Bouquets.size(); i++) BouquetList tmplist;
delete Bouquets[i]; for (unsigned int i =0; i < Bouquets.size(); i++) {
if (!user || !Bouquets[i]->bFav)
delete Bouquets[i];
else
tmplist.push_back(Bouquets[i]);
}
Bouquets.clear(); Bouquets.clear();
if (!user)
Bouquets = tmplist;
remainChannels = NULL; remainChannels = NULL;
} }

View File

@@ -321,6 +321,8 @@ bool CServiceScan::ParseFst(unsigned short pid, fast_scan_operator_t * op)
newchannel->deltype = FE_QPSK; newchannel->deltype = FE_QPSK;
CServiceManager::getInstance()->AddChannel(newchannel); CServiceManager::getInstance()->AddChannel(newchannel);
} }
// FIXME detect new/removed
newchannel->flags = CZapitChannel::UPDATED;
newchannel->setName(serviceName); newchannel->setName(serviceName);
newchannel->setServiceType(service_type); newchannel->setServiceType(service_type);
newchannel->setVideoPid(video_pid); newchannel->setVideoPid(video_pid);

View File

@@ -223,6 +223,7 @@ bool CFEManager::loadSettings()
fe_config.highVoltage = getConfigValue(fe, "highVoltage", 0); fe_config.highVoltage = getConfigValue(fe, "highVoltage", 0);
fe_config.uni_scr = getConfigValue(fe, "uni_scr", -1); fe_config.uni_scr = getConfigValue(fe, "uni_scr", -1);
fe_config.uni_qrg = getConfigValue(fe, "uni_qrg", 0); fe_config.uni_qrg = getConfigValue(fe, "uni_qrg", 0);
fe_config.diseqc_order = getConfigValue(fe, "diseqc_order", UNCOMMITED_FIRST);
fe->setRotorSatellitePosition(getConfigValue(fe, "lastSatellitePosition", 0)); fe->setRotorSatellitePosition(getConfigValue(fe, "lastSatellitePosition", 0));
@@ -303,6 +304,7 @@ void CFEManager::saveSettings(bool write)
setConfigValue(fe, "highVoltage", fe_config.highVoltage); setConfigValue(fe, "highVoltage", fe_config.highVoltage);
setConfigValue(fe, "uni_scr", fe_config.uni_scr); setConfigValue(fe, "uni_scr", fe_config.uni_scr);
setConfigValue(fe, "uni_qrg", fe_config.uni_qrg); setConfigValue(fe, "uni_qrg", fe_config.uni_qrg);
setConfigValue(fe, "diseqc_order", fe_config.diseqc_order);
setConfigValue(fe, "lastSatellitePosition", fe->getRotorSatellitePosition()); setConfigValue(fe, "lastSatellitePosition", fe->getRotorSatellitePosition());
setConfigValue(fe, "mode", fe->getMode()); setConfigValue(fe, "mode", fe->getMode());
setConfigValue(fe, "master", fe->getMaster()); setConfigValue(fe, "master", fe->getMaster());

View File

@@ -1008,7 +1008,7 @@ void CFrontend::setInput(t_satellite_position satellitePosition, uint32_t freque
setDiseqc(sit->second.diseqc, polarization, frequency); setDiseqc(sit->second.diseqc, polarization, frequency);
return; return;
} }
if (sit->second.diseqc_order == COMMITED_FIRST) { if (config.diseqc_order /*sit->second.diseqc_order*/ == COMMITED_FIRST) {
if (setDiseqcSimple(sit->second.commited, polarization, frequency)) if (setDiseqcSimple(sit->second.commited, polarization, frequency))
uncommitedInput = 255; uncommitedInput = 255;
sendUncommittedSwitchesCommand(sit->second.uncommited); sendUncommittedSwitchesCommand(sit->second.uncommited);

View File

@@ -225,7 +225,7 @@ bool CServiceManager::GetAllRadioChannels(ZapitChannelList &list, int flags)
list.clear(); list.clear();
for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); ++it) { for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); ++it) {
if (it->second.getServiceType() == ST_DIGITAL_RADIO_SOUND_SERVICE && if (it->second.getServiceType() == ST_DIGITAL_RADIO_SOUND_SERVICE &&
((flags == 0) || (it->second.flags & flags))) (it->second.flags & flags))
list.push_back(&(it->second)); list.push_back(&(it->second));
} }
return (!list.empty()); return (!list.empty());
@@ -236,47 +236,47 @@ bool CServiceManager::GetAllTvChannels(ZapitChannelList &list, int flags)
list.clear(); list.clear();
for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); ++it) { for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); ++it) {
if (it->second.getServiceType() != ST_DIGITAL_RADIO_SOUND_SERVICE && if (it->second.getServiceType() != ST_DIGITAL_RADIO_SOUND_SERVICE &&
((flags == 0) || (it->second.flags & flags))) (it->second.flags & flags))
list.push_back(&(it->second)); list.push_back(&(it->second));
} }
return (!list.empty()); return (!list.empty());
} }
bool CServiceManager::GetAllHDChannels(ZapitChannelList &list) bool CServiceManager::GetAllHDChannels(ZapitChannelList &list, int flags)
{ {
list.clear(); list.clear();
for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); ++it) { for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); ++it) {
if (it->second.isHD()) if ((it->second.flags & flags) && it->second.isHD())
list.push_back(&(it->second)); list.push_back(&(it->second));
} }
return (!list.empty()); return (!list.empty());
} }
bool CServiceManager::GetAllUnusedChannels(ZapitChannelList &list) bool CServiceManager::GetAllUnusedChannels(ZapitChannelList &list, int flags)
{ {
list.clear(); list.clear();
for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); ++it) { for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); ++it) {
if (it->second.has_bouquet == false) if ((it->second.flags & flags) && it->second.has_bouquet == false)
list.push_back(&(it->second)); list.push_back(&(it->second));
} }
return (!list.empty()); return (!list.empty());
} }
bool CServiceManager::GetAllSatelliteChannels(ZapitChannelList &list, t_satellite_position position) bool CServiceManager::GetAllSatelliteChannels(ZapitChannelList &list, t_satellite_position position, int flags)
{ {
list.clear(); list.clear();
for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); ++it) { for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); ++it) {
if(it->second.getSatellitePosition() == position) if((it->second.flags & flags) && it->second.getSatellitePosition() == position)
list.push_back(&(it->second)); list.push_back(&(it->second));
} }
return (!list.empty()); return (!list.empty());
} }
bool CServiceManager::GetAllTransponderChannels(ZapitChannelList &list, transponder_id_t tpid) bool CServiceManager::GetAllTransponderChannels(ZapitChannelList &list, transponder_id_t tpid, int flags)
{ {
list.clear(); list.clear();
for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); ++it) { for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); ++it) {
if(it->second.getTransponderId() == tpid) if((it->second.flags & flags) && it->second.getTransponderId() == tpid)
list.push_back(&(it->second)); list.push_back(&(it->second));
} }
return (!list.empty()); return (!list.empty());
@@ -368,6 +368,9 @@ void CServiceManager::ParseChannels(xmlNodePtr node, const t_transport_stream_id
uint16_t scrambled = xmlGetNumericAttribute(node, "s", 16); uint16_t scrambled = xmlGetNumericAttribute(node, "s", 16);
int number = xmlGetNumericAttribute(node, "num", 10); int number = xmlGetNumericAttribute(node, "num", 10);
int flags = xmlGetNumericAttribute(node, "f", 10); int flags = xmlGetNumericAttribute(node, "f", 10);
/* default if no flags present */
if (flags == 0)
flags = CZapitChannel::UPDATED;
t_channel_id chid = CREATE_CHANNEL_ID64; t_channel_id chid = CREATE_CHANNEL_ID64;
char *ptr = xmlGetAttribute(node, "action"); char *ptr = xmlGetAttribute(node, "action");
@@ -789,6 +792,8 @@ void CServiceManager::SaveServices(bool tocopy, bool if_changed)
continue; continue;
} }
for (channel_map_iterator_t ccI = allchans.begin(); ccI != allchans.end(); ++ccI) { for (channel_map_iterator_t ccI = allchans.begin(); ccI != allchans.end(); ++ccI) {
if(ccI->second.flags & CZapitChannel::NOT_FOUND)
continue;
if(ccI->second.getTransponderId() == tI->first) { if(ccI->second.getTransponderId() == tI->first) {
if(!satdone) { if(!satdone) {
WriteSatHeader(fd, spos_it->second); WriteSatHeader(fd, spos_it->second);
@@ -848,16 +853,16 @@ bool CServiceManager::CopyCurrentServices(transponder_id_t tpid)
aI = allchans.find(cI->second.getChannelID()); aI = allchans.find(cI->second.getChannelID());
if(aI == allchans.end()) { if(aI == allchans.end()) {
channel_insert_res_t ret = allchans.insert(channel_pair_t (cI->second.getChannelID(), cI->second)); channel_insert_res_t ret = allchans.insert(channel_pair_t (cI->second.getChannelID(), cI->second));
ret.first->second.flags |= CZapitChannel::NEW; ret.first->second.flags = CZapitChannel::NEW;
updated = true; updated = true;
printf("CServiceManager::CopyCurrentServices: [%s] add\n", cI->second.getName().c_str()); printf("CServiceManager::CopyCurrentServices: [%s] add\n", cI->second.getName().c_str());
} else { } else {
if(cI->second.scrambled != aI->second.scrambled || cI->second.getName() != aI->second.getName()) { if(cI->second.scrambled != aI->second.scrambled || cI->second.getName() != aI->second.getName()) {
aI->second.setName(cI->second.getName()); aI->second.setName(cI->second.getName());
aI->second.scrambled = cI->second.scrambled; aI->second.scrambled = cI->second.scrambled;
aI->second.flags |= CZapitChannel::UPDATED; aI->second.flags = CZapitChannel::UPDATED;
updated = true; updated = true;
printf("CServiceManager::CopyCurrentServices: [%s] replace\n", cI->second.getName().c_str()); printf("CServiceManager::CopyCurrentServices: [%s] replace\n", cI->second.getName().c_str());
} }
} }
} }
@@ -865,12 +870,12 @@ printf("CServiceManager::CopyCurrentServices: [%s] replace\n", cI->second.getNam
if(aI->second.getTransponderId() == tpid) { if(aI->second.getTransponderId() == tpid) {
channel_map_iterator_t dI = curchans.find(aI->second.getChannelID()); channel_map_iterator_t dI = curchans.find(aI->second.getChannelID());
if(dI == curchans.end()) { if(dI == curchans.end()) {
aI->second.flags |= CZapitChannel::REMOVED; aI->second.flags = CZapitChannel::REMOVED;
updated = true; updated = true;
printf("CServiceManager::CopyCurrentServices: [%s] remove\n", aI->second.getName().c_str()); printf("CServiceManager::CopyCurrentServices: [%s] remove\n", aI->second.getName().c_str());
} else if(aI->second.flags & CZapitChannel::REMOVED) { } else if(aI->second.flags & CZapitChannel::REMOVED) {
printf("CServiceManager::CopyCurrentServices: [%s] restore\n", aI->second.getName().c_str()); printf("CServiceManager::CopyCurrentServices: [%s] restore\n", aI->second.getName().c_str());
aI->second.flags = 0; aI->second.flags = CZapitChannel::UPDATED;
updated = true; updated = true;
} }
} }

View File

@@ -321,14 +321,13 @@ bool CSdt::ParseServiceDescriptor(ServiceDescription * service, ServiceDescripto
if (channel) { if (channel) {
channel->setName(serviceName); channel->setName(serviceName);
channel->setServiceType(real_type); channel->setServiceType(real_type);
channel->flags &= ~CZapitChannel::REMOVED; channel->flags = CZapitChannel::UPDATED;
channel->flags |= CZapitChannel::UPDATED;
} else { } else {
channel = new CZapitChannel(serviceName, channel_id, channel = new CZapitChannel(serviceName, channel_id,
real_type, satellitePosition, freq_id); real_type, satellitePosition, freq_id);
channel->deltype = cable ? FE_QAM : FE_QPSK;
CServiceManager::getInstance()->AddChannel(channel); CServiceManager::getInstance()->AddChannel(channel);
channel->deltype = cable ? FE_QAM : FE_QPSK;
channel->flags = CZapitChannel::UPDATED;
/* mark channel as new, if this satellite already have channels */ /* mark channel as new, if this satellite already have channels */
if (CServiceScan::getInstance()->SatHaveChannels()) if (CServiceScan::getInstance()->SatHaveChannels())
channel->flags = CZapitChannel::NEW; channel->flags = CZapitChannel::NEW;