VDR Plugin 'wirbelscan' Revision History
----------------------------------------

2006-10-28: Version 0.0.1
-------------------------------------------------------------------------------
- Initial revision. Alpha Status up to now.


2006-12-01: Version 0.0.2
-------------------------------------------------------------------------------
- removed unused header from common.c
- added missing setup property 'logfile' in setup (menusetup.c)
- added some internationalization (i18n.c)
- fixed compiler warning in satfrequencies.c and frequencies.c
- setting liveView=true if dvb card used is not free;
  either the only card or receiving/recording. (scanner.c)
- moved "memset(&frontend_status,0, sizeof(frontend_status));"
  into GetStatus(void) (scanner.c) to be shure that
  frontend_status is *always* resetted.
- while scanning now the channels.conf is cleared 
  (and refilled after last scan with the old channel data)
- Added EITScanner.ForceScan(); at the End of dvb scans to
  enshure Adding channels.
- now switching to all new transponders after last scan
- changed transponder scan routines in scanner.c
- now tuning (by purpose!) to a invalid transponder before
  tuning to other data; this should enshure that tuning is successful.
- slightly changed cUpdateThread::Action()
- osd: remains now open while scanning
- osd: removed inversion setting dvb-c
- osd: added symbolrate setting dvb-c
- osd: added stop scan button
- speed up dvb-t scan
- speed up dvb-s scan
- fixed d(const int level, const char *fmt, ...) for syslog


- still Alpha Status.


2006-12-XX: Version 0.0.2a
-------------------------------------------------------------------------------
- now deleting transponders Searchlist in AfterScan(void)
- fixed osd handling during scan (OK, Back)
- scanning not possible if recordings are running.
- added Channels.SetModified() in AfterScan to avoid duplicate channels. -> has to be checked.



2007-02-XX: Version 0.0.2b
-------------------------------------------------------------------------------
- first SVDRP support: S_TERR, S_CABL, S_SAT, S_PVR, S_STOP


2007-09-03: Version 0.0.3-20070903
-------------------------------------------------------------------------------
- changed device handling to lowlevel functions
- new SVDRP functions: M_AUTO, M64, M128, M256, SR_AUTO, SR6900, SR6875 
- started Internationalization with xgettext as in VDR>=1.5.7
- fixed compiling on vdr-1.5.x
- started freq offset support for DVB-T (france)
- changes to frequency tables (see above and cSatFreqlist)
- fixed wrong message  in cTerrScanner "C %d has lock.." into "T %d has lock.."
- fixed wrong internationalization "PVR x50 scan done"
- PVR x50 support for external input scan
- new function stopScanners
- new functions DoScan and DoStop for SVDRP support
- DVB-C added missing Symbolrate 6111 (only manual mode)
- now using Skins.QueueMessage instead of Skins.Message



2008-05-12: Version 0.0.4-20080512
-------------------------------------------------------------------------------
- added some Copyright Remark to README as proposed from Debian VDR Packaging Team
- removed PAL SE1 105250/107500
  see http://de.wikipedia.org/wiki/Kabelfernsehen:
  "Der Sonderkanal S01 kann wegen der Überschneidung mit dem UKW-Radio-Frequenzband nicht genutzt werden"
- added 73.00 MHz for DVB-C PAL
- italian translations (Diego Pierotto <vdr-italian@tiscali.it>)
- removed obsolete ptv plugin option
- minor changes to osd
- now start searching dvb devices at highest device number (often first device at dvb-c is a full-featured card -> QAM256 problems).



2008-09-10ff: version 0.0.5-preXX
-------------------------------------------------------------------------------
- applied updated italian translations (thanks to Diego Pierotto), renamed "Gringo" to Diego's real name
- completely restructured dvb scanners
- no longer deleting channel list during scan, but rather applying receiver
- added pat, pmt, nit, nit_other, sdt filters (adapted versions of VDRs own scan filters, see <vdr>/{pat,nit,sdt}.c)
- scans are now handled with state machine which is initialized from transponder lists
- new dvb wrapper for easier following dvb/vdr variants next versions (not complete up to now)
   (multiproto jusst, multiproto stoth, vdr-1.6 vs. vdr-1.7, channel syntax vdr-1.7.0 vs vdr-1.7.1, multiproto-wrapper, whatever..)
- added support for channel names on pvr-x50 channels using VBI network readout (needs libzbvi, which is part of Zapper)
- support for new pvrinput syntax
- added cx88_blackbird analogue scan support + input names (still under test)
- new patch for disabling libzvbi support, if not available/not needed (see sub folder patches)
- updated satellite lists, now including system and modulation_type
- new files vbi.{h,c}, scanfilter.{h,c}, dvb_wrapper.{h,c}, statemachine.{h,c}, caDescriptor.{h,c}
- remove about dlg
- compiling on 1.7.13, 1.7.14, 1.4.7
- check compiling
   1.4.7 *)
   1.6.0
   1.7.2 .. 1.7.14
  *) support may be dropped sometime
- add: DVB-C SRates 5156, 5483, Finland add QAM128
- add: preliminary ATSC support
- add missing default switches
- fix unsigned vs signed
- fix floating point comparisons
- DVB-C scan: FEC_NONE, fix: setting Inversion
- DVB-T scan: UK changed from TM_2k to TM_8k, fix check DVB-T Bandwidth
- pvrinput syntax adaption (may change further depending on development of pvrinput)
- remove files vbi.{h,c} and related autotools setup (zvbi introduced more problems than usability :-( )
- update README
- add: S97W0 telstar5, S160E0 Optus D1
- upd: S30W0 Hispasat 1C/1D
- upd. S23E5 Astra 1E/1G/3A
- improve human readability of log output
- GetFrontendStrength: 'value' is now uint16_t
- pvrinput syntax changes, remove pvrinput syntax choice
- improve storing of setup
- fix color keys on setup page
- cMenuScanning::SetStr: fix displayed value
- enhAC3 Tag adds now DPids
- during scan: update also existing channels, no longer skip those.
- decrease verbosity on LinkageChannels.
- gcc-4.5 fix (Edgar Hucek <gimli@dark-green.com>)
- add wirbelscan service API && add SERVICES.html
- improve SVDRP interface
- added descriptors STREAMTYPE_13818_AUDIO_ADTS, STREAMTYPE_14496_AUDIO_LATM
- vdr-1.7.15 changed SetPid: add Atypes, Dtypes
- 0.0.5-pre12b
  - service interface:
     * add user transponder scan (SUser)
     * status: add SUser version
- 0.0.5-pre12c
  - improve setup storage key handling
  - move hexdump to common
  - move SwReceiver to ttext
  - pvrinput:
     * scan channel names from cni && teletext
       (needs pvrinput from 09/2010 and enabling teletext)
     * add external inputs (svideo, composite,...)
- 0.0.5-pre12d
  - bugfix counting queued transponders
  - bugfix dvb-c auto symbolrates stopped at sr 6900
  - ttext: timeout counter in seconds.
  - 0.0.5-pre12d == version 0.0.5
- 0.0.5-1
  - bugfix: segfault on vdr-1.6.0
- 0.0.5-2
  - bugfix: reading dvb capability flags
  - improved receiver handling in statemachine.c to avoid loosing control of receiving device
  - simplified eit scanner && deadlock fix.
  - throw compilation warning on outdated dvb api 3.2 
  - throw compilation error on unsupported/outdated dvb api 3.3 
- 0.0.5-3
  - cleanup && cosmetics
  - update README



2011-02-06: version 0.0.6
-------------------------------------------------------------------------------
- whitespace && minor code cleanups.
- don't throw error on start scan if timers on schedule;
  check wether next timer is at least 2hours in future and of the same
  type as the scan requested.
- pvrinput scan: move channel check for pvrinput into IsPvrinput and
  fix misuse of sscanf (old plugin param patch only)
- remove wrong "fuzzy" translations



2011-03-24: version 0.0.7
-------------------------------------------------------------------------------
- 0.0.7-pre01
  - fix memory leak: ext_math.c:112
  - fix memory leak: scanner.c:609
  - remove unused #include videodev.h from countries.c (file used by w_scan and wirbelscan)
  - replace DeleteAndNull by DELETENULL (defined in <vdr/tools.h>)
  - replace all remaining 'delete' by 'DELETENULL'
  - check return value of asprintf in cPluginWirbelscan::Service
  - countries.c: remove octals.
  - common.c: change inititialization of char arrays to avoid memset
  - common.c: hexdump, check for buf != NULL
  - update S41E9 + rename to S42E0
  - fix compiling vdr-1.6.0-2
  - fix SetTerrTransponderDataFromDVB to set DVB-T Bandwidth for VDR > 10712 correctly.
- 0.0.7-pre02
  - don't set shortname and provider on analog channels anymore
  - wirbelscan_services: cast for Bandwidth to avoid float to int conversion, increase service user version to 0002
  - common.c: FileExists(), dont cast arg1 of stat() to char * (unsafe conversion losses 'const' attribute)
  - scanfilter.c: cast to unsigned in switch(d->getDescriptorTag())
  - move setup class 'cWirbelscan' to common.{c,h} and rename to 'wSetup'
  - move defines from menusetup.h to common.h
  - disable now pvrinput support by default, enabling needs new command line option '--use-pvrinput'.
  - disable unused DVB Types in settings menu. Only DVB types with matching devices (pvrinput similar)
    are now visible in settings menu. This should help newbees finding their settings.
  - SERVICE and SVDRP connections will now reject DVB/pvrinput without devices; in case of pvrinput also
    if not explicitly enabled by command line option. 
  - skip support of VDR Versions before 1.6.0; remove po2i18n.pl, i18n.h, i18n-template.c
  - remove clean_code folder from dist package
  - update Makefile; now using LDFLAGS, Make.global and -O3 optimisation, force permissions on make dist.
  - GetPreferredDevice: dont stop if Device(i) doesnt exist, continue up to MAXDEVICES (was: MAXDVBDEVICES and stopping if Device(i) missed)
- 0.0.7
  - 0.0.7 == 0.0.7-pre02



2016-xx-xx
-------------------------------------------------------------------------------
* pvrinput support is removed, as no analog channels available anymore.
* build using VDRs Makefile is no longer used by me. It may work or not.
  Feel free to edit the Makefile stub.
* version numbering is now YYYY.MM.DD
* new version dont care about vdr before 2.3 as the changes in VDRs core
  are too large to keep compat. If using old VDR, use old plugin.
* also plugin interface changed a bit - considered broken at the moment.
* now trying to avoid cChannel and cString VDR classes - too deep changes
  in vdr core.
* avoid as much as possible vdrs global lists (Channels, Timers, etc.)
  This one has consequences for the whole plugin - the scan algorithm
  changed and updates (new channels counting etc.) are not possible any
  longer during scan.
* T2: add scan loop



2018-11-04
-------------------------------------------------------------------------------
* fix possible segfault, if remotely controlled (thanks to Luca Olivetti)
* allow operation from positioner (thanks to Luca Olivetti)
* silence a few useless vdr warnings during scan: "ERROR: channel data results in invalid ID!";
  as a channel scanner doesnt have any valid channel IDs at the beginning of its work.



2020-05-03
-------------------------------------------------------------------------------
* plugin maintainance after a few years
* check for compat with vdr-2.4.1
* changes in core VDR 2.4.1 cause now segfaults together with wirbelscan together
  with rofafors SAT>IP plugin.

  -> Solution: no longer try to query device information in case of SAT>IP.
  Otherwise, complete Astra-19.2E is scanned using SAT>IP in 8 minutes, 15 seconds.
  Not that bad for an very old dtv scanner inside VDR's jail, using an
  emulated dvb device. :)



2020-05-03
-------------------------------------------------------------------------------
* simplify InitSystems



2020-12-06/2020-12-13
-------------------------------------------------------------------------------
* add channel export feature to wirbelscan_services for w_scan_cpp support
* fix bugs if cDevice* casted c-Style to cDvbDevice*
  Thanks to MarkusE @ vdr-portal.de
* fix error messages if cast to cDvbDevice failed and device coulnt be opened.
  Thanks to MarkusE @ vdr-portal.de
* remove a few DVB-T/T2 freqs in DE (700M Band)
* scan plp 0..3 for T2 (not an real fix, but should work good enough)
* move {VERSION,DESCRIPTION,MAINMENUENTRY} to WIRBELSCAN_*
* enable SAT>IP for C/T(2)
* fix bug introduced by wrong packaging
  Thanks to MarkusE @ vdr-portal.de



2020-12-17
-------------------------------------------------------------------------------
* dynamite support broke satip support :(, fixed by removing dvb dev check.



2020-12-22
-------------------------------------------------------------------------------
* add PMT Pid to TChannel - no change if used as a VDR Plugin.



2021-02-18
-------------------------------------------------------------------------------
* scanfilter.c:
  - modify message for SatelliteDeliverySystemDescriptor from wrong
    satellites to be more readable and remove superfluous newline
  - report PAT timeout, if 3 secs no data from PAT
* statemachine.c:
  - if PAT scanner exits without data, set it to NULL and clear PmtData.
    Otherwise next PatScanners are not created. 
  - add line numbers for {New,Scanned}Transponders.Add for debug
  - move ScannedTransponders.Add from eAddChannels to eTune, to catch
    any retuning to the same tp in case of broken NIT and updated tp
  - remove commented code in statemachine.c
* increase version to 2021.02.18



2021-03-07
-------------------------------------------------------------------------------
* countries.c:
  - reorder DVBC_QAM frequencies, thanks for pointing out issue to
    Michael Kaufmann
* countries.c:
  - swap sequence of DVB-C modulations, now preferring QAM256 to QAM64
* scanner.c:
  - skip DVB-C loops after first one, if card has QAM_AUTO support.
* increase version to 2021.03.07
* feed several files tru dos2unix - fixing line end. Why did it happen..?



2021-07-14
-------------------------------------------------------------------------------
* common.c:
  - hexdump to stderr instead of stdout



2021-10-09
-------------------------------------------------------------------------------
* review whole plugin after many years in service:
  - update contact address and homepage, outdated on a few files.
  - build system: change from VDR style *.c file names to *.cpp
  - build system: sort includes to be bare minimum
  - build system: prefer c++ includes to c includes (stdint.h -> cstdint)
  - review code formatting and indentation
  - replace NULL by c++ style nullptr
  - replace any unistd or BSD-style integers by standard integers
  - replace any *sleep functions by mSleep(), which uses C++11
  - replace DELETENULL by DeleteNullptr(), to get rid of macro style
  - remove as much as possible *printf and sscanf style and logging
* remove dvb_wrapper.{h,c} and move remains to common.{h,cpp}
* wirbelscan_services.h
  - remove deprecated entry Satsystem.
* tlist.h:
  - replace VDR's cMutex by std::lock_guard<std::mutex>
* statemachine.{h,cpp}
  - add ThreadBase.h from easyvdr and series plugin.
  - change cStateMachine's base class to ThreadBase, to get rid of VDR's class cThread
  - change cScanReceiver's base class to ThreadBase, to get rid of VDR's class cThread
* scanner.{h,cpp}
  - replace TThread by ThreadBase
  - replace BCD2INT() by BCDtoDecimal()
  - remove vdr/tools.h
  - simplify satellites.dat lookup
* scanfilter.{h,cpp}
  - replace TThread by ThreadBase
  - remove pthread.h
  - replace BCD2INT() by BCDtoDecimal()
  - fix rounding of frequencies
  - is_different_transponder_deep_scan(): disable rolloff comparison
  - is_different_transponder_deep_scan(): prefer lambda instead of C Macro.
* satellites.{h,cpp}
  - move SAT_TRANSPONDER_COUNT and SAT_COUNT to cpp src
  - adapt to newer dat version
* countries.{h,cpp}
  - remove COUNTRY_COUNT
  - convert get_user_country() to c++ style
  - move country_t, offset_type_t and SKIP_CHANNEL to countries.cpp
* common.{h,cpp}
  - remove FREENULL macro.
  - remove struct satellite_transponder
  - remove struct tuning_parameters
  - add BCDtoDecimal template
  - add IntToStr(), IntToHex(), FloatToStr()
  - remove va_*, vsnprint and remove cstdarg
  - remove HEXDUMP() macro, used in two places only
* wirbelscan.cpp
  - convert as much as possible to std::string, std::stringstream
  - bump version



2021-11-28
-------------------------------------------------------------------------------
* wirbelscan.cpp
  - found old bug: invalid country or satellite settings in setup.conf could
         crash the plugin, if used inside VDR, but not inside w_scan_cpp.
  - apply range checks to setup.conf stored variables.
  - replace atoi by std::sto{i,l,ll}
* menusetup.cpp
  - convert SatNames and CountryNames to std::vector, this avoids duplicating
    those const char *, while opening the menu.
  - convert DVB_Types, logfiles, Symbolrates, Qams, inversions, atsc_types
    to std::array
* wirbelscan.cpp, common.cpp, menusetup.cpp
  - wSetup.logFile == 0 was used in the past to turn off logging,
    but was different in common.c/cpp. Restore it.
    Similarly, wSetup.logFile == 3 is logging to stderr, make it avail from
    GUI.
  - remove uppercase() and split() and use librepfunc
* menusetup.cpp
  - in cMenuScanning::SetStatus(), protect st using constrain
* satellites.dat
  - regen with updated generator on LFS, now 152 sats.
* scanner.cpp
  - now choose the first sat device, which supports any item in scanlist.
    Otherwise, with mixed Ku-band and C-band items in list, no device may be
    found.
* statemachine.cpp
  - show signal strength also for satip, no longer assuming lock = 100%.
    The satip plugin added signal strength long time ago.
* common.{h,cpp}
  - TChannel::ValidSatIf() takes care of spectral inversion case
  - hexdump() is now a wrapper to librepfunc's HexDump()
  - FileExists(), IntToStr(), IntToHex(), FloatToStr(),
    mSleep(), BCDtoDecimal()
    have been moved to librepfunc (https://github.com/wirbel-at-vdr-portal/librepfunc)
* ThreadBase.h
  - delete file and use librepfunc
* Makefile
  - check availability and version of librepfunc and link to it.
* New: preferred device per scan type, ie. sat, cable,..
* bump version.



2021-12-11
-------------------------------------------------------------------------------
* scanner.cpp
  - satellite fix: ValidSatIf() needs source to be set



2022-01-05
-------------------------------------------------------------------------------
* scanner.cpp
  - modify preferred device search messages
* countries.cpp
  - revise countries
* scanner.cpp
  - fix terr device search
* scanner.cpp
  - fix DVB-T only loop for non T2 devices



2022-10-15
-------------------------------------------------------------------------------
* fix typos
* Update README.md
* remove unused func/variable 



2022-10-16
-------------------------------------------------------------------------------
* fix typos



2022-12-31
-------------------------------------------------------------------------------
* countries.{h,cpp}
  - provide currently selected Alpha-3
  - add Alpha-3 to cCountry
* countries.cpp
  - restore DVB-T* for France
* si_ext.h
  - add private_data_specifier values



2022-01-21
-------------------------------------------------------------------------------
* prepare for private descriptors, outside of 300468 v1.15
* use more distinct initialisation
* Add notice about private descriptors
* add parts of logical channel numbering
* LogicalChannel doesnt need pure virtual
* store current status: V2 to be modified
* renamed loop member
* add LCNs to TNitData
* now we need #include <vector>
* v2023.01.21



2023-02-19
-------------------------------------------------------------------------------
* new setup option ParseLCN
* preserve current state
* debug, add unknown descriptors id
* convert lcn list to global
* add comparison operators
* add new setup option parsing
* remove duplicate LCNs
* LCN assignment function
* assign LCN to TChannel
* ease LCN to service match
* improve debug output
* bump version



2023-06-04
-------------------------------------------------------------------------------
* add <cstdint> to countries.h, thanks to Manuel Reimer for pinging me
* bump version



2023-10-15
-------------------------------------------------------------------------------
* use std::atomic<bool> for scanfilters instead of bool
* move {active,isActive} to end of scanfilters Action()
* early delete and set to nullptr any of the scanfilters
  in statemachine.cpp (less memory required)
* detach aReceiver from dev, before deleting it
* bump version



2024-0x-xx
-------------------------------------------------------------------------------
* added configuration for signal wait time and lock timeout.
* bumped service version for get/set setup, GetSetup#XXXX/SetSetup#XXXX;
  plugins using the wirbelscan service interface member 'setup' should be
  recompiled with the current version of wirbelscan_services.h.
  Otherwise, any call to
     bool cPluginWirbelscan::Service(const char* id, void* Data)
  with id = GetSetup or SetSetup will fail.
  Ideally, their sources should be also touched, such that the new members of
  cWirbelscanScanSetup named SignalWaitTime and LockTimeout are available in the
  controlling plugin.
* TP update on S19E2
* fixed the case when a language descriptor is empty (random incorrect lang)
* removed cSectionSyncer::Sync(), the plugin needs now at least vdr-2.5.2

