src/zapit.cpp: move TP_params TP inside class,

add method to start manual TP scan
This commit is contained in:
[CST] Focus
2012-03-26 17:22:31 +04:00
parent fad27bc5a6
commit 0380fc8f9b
2 changed files with 14 additions and 1 deletions

View File

@@ -79,6 +79,7 @@ class CZapit : public OpenThreads::Thread
CZapitChannel * current_channel;
t_channel_id live_channel_id;
TP_params TP;
audio_map_t audio_map;
bool current_is_nvod;
@@ -140,6 +141,7 @@ class CZapit : public OpenThreads::Thread
bool PrepareChannels();
bool StartScan(int scan_mode);
bool StartScanTP(TP_params * TPparams);
bool StartFastScan(int scan_mode, int opid);
void addChannelToBouquet(const unsigned int bouquet, const t_channel_id channel_id);

View File

@@ -97,7 +97,7 @@ transponder_list_t transponders;
CZapitClient::bouquetMode bouquetMode = CZapitClient::BM_UPDATEBOUQUETS;
CZapitClient::scanType scanType = CZapitClient::ST_TVRADIO;
static TP_params TP;
//static TP_params TP;
static bool update_pmt = true;
/******************************************************************************/
@@ -701,6 +701,14 @@ bool CZapit::StartScan(int scan_mode)
return true;
}
bool CZapit::StartScanTP(TP_params * TPparams)
{
PrepareScan();
CServiceScan::getInstance()->Start(CServiceScan::SCAN_TRANSPONDER, (void *) TPparams);
return true;
}
bool CZapit::StartFastScan(int scan_mode, int opid)
{
fast_scan_type_t scant;
@@ -1059,8 +1067,11 @@ printf("[zapit] TP_id %d freq %d rate %d fec %d pol %d\n", TP.TP_id, TP.feparams
//if(satellitePositions.find(current_channel->getSatellitePosition()) != satellitePositions.end())
current_channel = 0;
}
#if 0
PrepareScan();
CServiceScan::getInstance()->Start(CServiceScan::SCAN_TRANSPONDER, (void *) &TP);
#endif
StartScanTP(&TP);
break;
}