add --enable-fastscan configure option

The #define in src/gui/scan_setup.h did not work (undefining
ENABLE_FASTSCAN caused really strange side effects wrt background
scanning in standby mode), and all the unused code was still built.
With this configure option, people who really want this obscure feature
can enable it for their builds.


Origin commit data
------------------
Branch: ni/coolstream
Commit: 6525d1164a
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-02-04 (Sat, 04 Feb 2017)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2017-02-04 12:09:47 +01:00
parent 0f783a671d
commit 4761d15f7b
6 changed files with 32 additions and 6 deletions

View File

@@ -165,6 +165,12 @@ AC_ARG_ENABLE(viasatepg,
[ --enable-viasatepg enable ViaSat EPG code (experimental)],
[AC_DEFINE(ENABLE_VIASATEPG,1,[enable ViaSat EPG code])])
AC_ARG_ENABLE(fastscan,
[ --enable-fastscan enable Fastscan code)],
[AC_DEFINE(ENABLE_FASTSCAN,1,[enable fastscan code])])
AM_CONDITIONAL(ENABLE_FASTSCAN, test "$enable_fastscan" = "yes")
AC_ARG_ENABLE(giflib,
AS_HELP_STRING(--enable-giflib,use giflib instead of libungif),
,[enable_giflib=no])

View File

@@ -2,7 +2,7 @@
Neutrino-GUI - DBoxII-Project
Copyright (C) 2001 Steffen Hehn 'McClean'
Copyright (C) 2011-2012 Stefan Seyfried
Copyright (C) 2011-2013,2015,2017 Stefan Seyfried
License: GPL
@@ -169,6 +169,13 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
bool test = actionKey == "test";
bool manual = (actionKey == "manual") || test;
bool fast = (actionKey == "fast");
#if !ENABLE_FASTSCAN
if (fast) {
/* popup message? But this *should* be impossible to happen anyway */
fprintf(stderr, "CScanTs::exec: fastscan disabled at build-time!\n");
return menu_return::RETURN_REPAINT;
}
#endif
if (CFrontend::isSat(delsys))
pname = scansettings.satName;
@@ -299,8 +306,10 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
} else if(manual)
success = g_Zapit->scan_TP(TP);
else if(fast) {
#if ENABLE_FASTSCAN
CServiceScan::getInstance()->QuietFastScan(false);
success = CZapit::getInstance()->StartFastScan(scansettings.fast_type, scansettings.fast_op);
#endif
}
else
success = g_Zapit->startScan(scan_flags);

View File

@@ -42,8 +42,6 @@
#define scansettings CNeutrinoApp::getInstance()->getScanSettings()
//#define ENABLE_FASTSCAN //don't define this to remove fast scan menu
class CScanSetup : public CMenuTarget, public CChangeObserver
{
protected:

View File

@@ -4,7 +4,7 @@
Copyright (C) 2001 Steffen Hehn 'McClean'
and some other guys
Copyright (C) 2006-2016 Stefan Seyfried
Copyright (C) 2006-2017 Stefan Seyfried
Copyright (C) 2011 CoolStream International Ltd
@@ -4852,6 +4852,7 @@ void CNeutrinoApp::Cleanup()
#endif
}
#if ENABLE_FASTSCAN
void CNeutrinoApp::CheckFastScan(bool standby, bool reload)
{
if (scansettings.fst_update) {
@@ -4883,6 +4884,11 @@ void CNeutrinoApp::CheckFastScan(bool standby, bool reload)
}
}
}
#else
void CNeutrinoApp::CheckFastScan(bool, bool)
{
}
#endif
bool CNeutrinoApp::adjustToChannelID(const t_channel_id channel_id)
{

View File

@@ -109,6 +109,7 @@ class CServiceScan : public OpenThreads::Thread
uint32_t tune_tp_index;
unsigned char fst_version;
#if ENABLE_FASTSCAN
bool quiet_fastscan;
void InitFastscanLnb(int id);
bool FastscanTune(int id);
@@ -120,7 +121,7 @@ class CServiceScan : public OpenThreads::Thread
void process_satellite_delivery_system_descriptor(const unsigned char * const buffer, FrontendParameters * feparams, t_satellite_position * satellitePosition);
bool ScanFast();
void ReportFastScan(FrontendParameters &feparams, t_satellite_position satellitePosition);
#endif
void run();
CFrontend * frontend;
@@ -151,12 +152,14 @@ class CServiceScan : public OpenThreads::Thread
bool isFtaOnly() { return flags & SCAN_FTA; }
int GetFlags() { return flags; }
bool SatHaveChannels() { return satHaveChannels; }
#if ENABLE_FASTSCAN
/* fast-scan */
bool TestDiseqcConfig(int num);
bool ReadFstVersion(int num);
unsigned char GetFstVersion() { return fst_version; }
void QuietFastScan(bool enable) { quiet_fastscan = enable; }
bool ScanFast(int num, bool reload = true);
#endif
};
#endif /* __scan_h__ */

View File

@@ -20,7 +20,6 @@ libzapit_a_SOURCES = \
bouquets.cpp \
capmt.cpp \
channel.cpp \
fastscan.cpp \
femanager.cpp \
frontend.cpp \
getservices.cpp \
@@ -33,6 +32,11 @@ libzapit_a_SOURCES = \
transponder.cpp \
zapit.cpp
if ENABLE_FASTSCAN
libzapit_a_SOURCES += \
fastscan.cpp
endif
bin_PROGRAMS = pzapit
sbin_PROGRAMS = udpstreampes