From 0380fc8f9ba0ab90b7479d5cb4189e6c99cea24e Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Mon, 26 Mar 2012 17:22:31 +0400 Subject: [PATCH] src/zapit.cpp: move TP_params TP inside class, add method to start manual TP scan --- src/zapit/include/zapit/zapit.h | 2 ++ src/zapit/src/zapit.cpp | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/zapit/include/zapit/zapit.h b/src/zapit/include/zapit/zapit.h index 67c1032b2..4ee25b8f1 100644 --- a/src/zapit/include/zapit/zapit.h +++ b/src/zapit/include/zapit/zapit.h @@ -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); diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index 78e9bae00..8eade5cef 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -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; }