mirror of
https://github.com/JvanKatwijk/qt-dab.git
synced 2025-10-06 00:02:40 +02:00
added cmdline parameter
This commit is contained in:
@@ -218,6 +218,7 @@ add_definitions (-D__THREADED_BACKEND__) # uncomment for use for an RPI
|
|||||||
./sources/support/bandpass-filter.h
|
./sources/support/bandpass-filter.h
|
||||||
./sources/support/bit-extractor.h
|
./sources/support/bit-extractor.h
|
||||||
./sources/support/cacheElement.h
|
./sources/support/cacheElement.h
|
||||||
|
./sources/support/charsets.h
|
||||||
./sources/support/content-table.h
|
./sources/support/content-table.h
|
||||||
./sources/support/converter_48000.h
|
./sources/support/converter_48000.h
|
||||||
./sources/support/coordinates.h
|
./sources/support/coordinates.h
|
||||||
@@ -273,7 +274,6 @@ add_definitions (-D__THREADED_BACKEND__) # uncomment for use for an RPI
|
|||||||
./sources/backend/backend.h
|
./sources/backend/backend.h
|
||||||
./sources/backend/backend-deconvolver.h
|
./sources/backend/backend-deconvolver.h
|
||||||
./sources/backend/backend-driver.h
|
./sources/backend/backend-driver.h
|
||||||
./sources/backend/charsets.h
|
|
||||||
./sources/backend/frame-processor.h
|
./sources/backend/frame-processor.h
|
||||||
./sources/backend/msc-handler.h
|
./sources/backend/msc-handler.h
|
||||||
./sources/backend/reed-solomon/galois.h
|
./sources/backend/reed-solomon/galois.h
|
||||||
@@ -353,6 +353,7 @@ add_definitions (-D__THREADED_BACKEND__) # uncomment for use for an RPI
|
|||||||
./sources/protection/uep-protection.cpp
|
./sources/protection/uep-protection.cpp
|
||||||
./sources/protection/eep-protection.cpp
|
./sources/protection/eep-protection.cpp
|
||||||
./sources/support/audiosystem-selector.cpp
|
./sources/support/audiosystem-selector.cpp
|
||||||
|
./sources/support/charsets.cpp
|
||||||
./sources/support/bandpass-filter.cpp
|
./sources/support/bandpass-filter.cpp
|
||||||
./sources/support/content-table.cpp
|
./sources/support/content-table.cpp
|
||||||
./sources/support/converter_48000.cpp
|
./sources/support/converter_48000.cpp
|
||||||
@@ -401,7 +402,6 @@ add_definitions (-D__THREADED_BACKEND__) # uncomment for use for an RPI
|
|||||||
./sources/backend/backend.cpp
|
./sources/backend/backend.cpp
|
||||||
./sources/backend/backend-deconvolver.cpp
|
./sources/backend/backend-deconvolver.cpp
|
||||||
./sources/backend/backend-driver.cpp
|
./sources/backend/backend-driver.cpp
|
||||||
./sources/backend/charsets.cpp
|
|
||||||
./sources/backend/msc-handler.cpp
|
./sources/backend/msc-handler.cpp
|
||||||
./sources/backend/reed-solomon/galois.cpp
|
./sources/backend/reed-solomon/galois.cpp
|
||||||
./sources/backend/reed-solomon/reed-solomon.cpp
|
./sources/backend/reed-solomon/reed-solomon.cpp
|
||||||
|
@@ -8,7 +8,14 @@
|
|||||||
Restructured source tree
|
Restructured source tree
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
|
|
||||||
Note that the sourcetree is now restructured.
|
Note that the sourcetree is now restructured. All sources are now
|
||||||
|
grouped in the directory sources. That one contains three main subdirectories
|
||||||
|
|
||||||
|
* main for the main program (as the name suggests)
|
||||||
|
* frontend for converting input samples into sequences of softbits (-127 .. 127)
|
||||||
|
* backend for the actual decoding of the softbits to either audio, data or both
|
||||||
|
|
||||||
|
Furthermore there are a few other subdirectories with support functions
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
About Qt-DAB
|
About Qt-DAB
|
||||||
|
@@ -152,7 +152,6 @@ HEADERS += ./sources/main/radio.h \
|
|||||||
./sources/backend/msc-handler.h \
|
./sources/backend/msc-handler.h \
|
||||||
./sources/backend/reed-solomon/galois.h \
|
./sources/backend/reed-solomon/galois.h \
|
||||||
./sources/backend/reed-solomon/reed-solomon.h \
|
./sources/backend/reed-solomon/reed-solomon.h \
|
||||||
./sources/backend/charsets.h \
|
|
||||||
./sources/backend/frame-processor.h \
|
./sources/backend/frame-processor.h \
|
||||||
./sources/backend/backend.h \
|
./sources/backend/backend.h \
|
||||||
./sources/backend/backend-driver.h \
|
./sources/backend/backend-driver.h \
|
||||||
@@ -185,6 +184,7 @@ HEADERS += ./sources/main/radio.h \
|
|||||||
./sources/output/audio-player.h \
|
./sources/output/audio-player.h \
|
||||||
./sources/support/dab-constants.h \
|
./sources/support/dab-constants.h \
|
||||||
./sources/support/bit-extractors.h \
|
./sources/support/bit-extractors.h \
|
||||||
|
./sources/support/charsets.h \
|
||||||
./sources/support/crc-handlers.h \
|
./sources/support/crc-handlers.h \
|
||||||
./sources/support/mot-content-types.h \
|
./sources/support/mot-content-types.h \
|
||||||
./sources/support/distances.h \
|
./sources/support/distances.h \
|
||||||
@@ -303,7 +303,6 @@ SOURCES += ./sources/main/main.cpp \
|
|||||||
./sources/backend/msc-handler.cpp \
|
./sources/backend/msc-handler.cpp \
|
||||||
./sources/backend/reed-solomon/galois.cpp \
|
./sources/backend/reed-solomon/galois.cpp \
|
||||||
./sources/backend/reed-solomon/reed-solomon.cpp \
|
./sources/backend/reed-solomon/reed-solomon.cpp \
|
||||||
./sources/backend/charsets.cpp \
|
|
||||||
./sources/backend/backend.cpp \
|
./sources/backend/backend.cpp \
|
||||||
./sources/backend/backend-driver.cpp \
|
./sources/backend/backend-driver.cpp \
|
||||||
./sources/backend/backend-deconvolver.cpp \
|
./sources/backend/backend-deconvolver.cpp \
|
||||||
@@ -331,6 +330,7 @@ SOURCES += ./sources/main/main.cpp \
|
|||||||
./sources/backend/data/epg/epg-compiler.cpp \
|
./sources/backend/data/epg/epg-compiler.cpp \
|
||||||
./sources/backend/data/epg/xml-extractor.cpp \
|
./sources/backend/data/epg/xml-extractor.cpp \
|
||||||
./sources/output/audio-player.cpp \
|
./sources/output/audio-player.cpp \
|
||||||
|
./sources/support/charsets.cpp \
|
||||||
./sources/support/distances.cpp \
|
./sources/support/distances.cpp \
|
||||||
./sources/support/time-converter.cpp \
|
./sources/support/time-converter.cpp \
|
||||||
./sources/support/logger.cpp \
|
./sources/support/logger.cpp \
|
||||||
|
1120
qt-dab-6.9.pro-32
1120
qt-dab-6.9.pro-32
File diff suppressed because it is too large
Load Diff
@@ -132,20 +132,19 @@ uint8_t temp = 0;
|
|||||||
* and adjust the buffer here for the next round
|
* and adjust the buffer here for the next round
|
||||||
* if the firecode check fails, we shift one block
|
* if the firecode check fails, we shift one block
|
||||||
*/
|
*/
|
||||||
handleRS (frameBytes. data (), blockFillIndex * nbits / 8,
|
handleRS (frameBytes, blockFillIndex * nbits / 8,
|
||||||
outVector. data (),
|
outVector, frameErrors, rsErrors);
|
||||||
frameErrors, rsErrors);
|
|
||||||
if (frameErrors > 0) { // cannot fix the potential frame
|
if (frameErrors > 0) { // cannot fix the potential frame
|
||||||
blocksInBuffer = 4;
|
blocksInBuffer = 4;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fc. check (&outVector [0])) {
|
if (!fc. check (outVector. data ())) {
|
||||||
blocksInBuffer = 4;
|
blocksInBuffer = 4;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!processSuperframe (outVector. data ())) {
|
if (!processSuperframe (outVector)) {
|
||||||
frameErrors ++;
|
frameErrors ++;
|
||||||
blocksInBuffer = 0;
|
blocksInBuffer = 0;
|
||||||
return;
|
return;
|
||||||
@@ -175,8 +174,9 @@ uint8_t temp = 0;
|
|||||||
* We correct the errors using RS
|
* We correct the errors using RS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void mp4Processor::handleRS (uint8_t frameBytes [], int16_t base,
|
void mp4Processor::handleRS (const std::vector<uint8_t> &frameBytes,
|
||||||
uint8_t outVector [],
|
int16_t base,
|
||||||
|
std::vector<uint8_t> &outVector,
|
||||||
int16_t &errorLines, int16_t &repairs) {
|
int16_t &errorLines, int16_t &repairs) {
|
||||||
uint8_t rsIn [120];
|
uint8_t rsIn [120];
|
||||||
uint8_t rsOut [110];
|
uint8_t rsOut [110];
|
||||||
@@ -202,7 +202,7 @@ int16_t ler;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mp4Processor::processSuperframe (uint8_t outVector []) {
|
bool mp4Processor::processSuperframe (std::vector<uint8_t> &outVector){
|
||||||
uint8_t num_aus;
|
uint8_t num_aus;
|
||||||
int tmp;
|
int tmp;
|
||||||
stream_parms streamParameters;
|
stream_parms streamParameters;
|
||||||
|
@@ -66,15 +66,16 @@ private:
|
|||||||
faadDecoder aacDecoder;
|
faadDecoder aacDecoder;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void handleRS (uint8_t frameBytes [], int16_t base,
|
void handleRS (const std::vector<uint8_t> &frameBytes,
|
||||||
uint8_t outVector [],
|
int16_t base,
|
||||||
|
std::vector<uint8_t> &outVector,
|
||||||
int16_t &errorLines, int16_t &repairs);
|
int16_t &errorLines, int16_t &repairs);
|
||||||
|
|
||||||
bool processSuperframe (uint8_t []);
|
bool processSuperframe (std::vector<uint8_t> &);
|
||||||
int build_aacFile (int16_t aac_frame_len,
|
int build_aacFile (int16_t aac_frame_len,
|
||||||
stream_parms *sp,
|
stream_parms *sp,
|
||||||
uint8_t *data,
|
uint8_t *data,
|
||||||
std::vector<uint8_t> &fileBuffer);
|
std::vector<uint8_t> &fileBuffer);
|
||||||
|
|
||||||
FILE *dump;
|
FILE *dump;
|
||||||
uint8_t procMode;
|
uint8_t procMode;
|
||||||
|
@@ -81,6 +81,8 @@ bool error_report = false;
|
|||||||
int fmFrequency = 110000;
|
int fmFrequency = 110000;
|
||||||
QString scheduleFile = fullPathfor (SCHEDULE);
|
QString scheduleFile = fullPathfor (SCHEDULE);
|
||||||
|
|
||||||
|
QString tiiFileName = QDir::homePath () + "/" + ".txdata.tii";
|
||||||
|
|
||||||
QTranslator theTranslator;
|
QTranslator theTranslator;
|
||||||
QCoreApplication::setOrganizationName ("Lazy Chair Computing");
|
QCoreApplication::setOrganizationName ("Lazy Chair Computing");
|
||||||
QCoreApplication::setOrganizationDomain ("Lazy Chair Computing");
|
QCoreApplication::setOrganizationDomain ("Lazy Chair Computing");
|
||||||
@@ -93,6 +95,10 @@ QTranslator theTranslator;
|
|||||||
initFileName = fullPathfor (QString (optarg));
|
initFileName = fullPathfor (QString (optarg));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 't':
|
||||||
|
tiiFileName = QDir::homePath () + "/" + QString (optarg);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'P':
|
case 'P':
|
||||||
dataPort = atoi (optarg);
|
dataPort = atoi (optarg);
|
||||||
break;
|
break;
|
||||||
@@ -164,6 +170,7 @@ QTranslator theTranslator;
|
|||||||
presetFile,
|
presetFile,
|
||||||
freqExtension,
|
freqExtension,
|
||||||
scheduleFile,
|
scheduleFile,
|
||||||
|
tiiFileName,
|
||||||
error_report,
|
error_report,
|
||||||
dataPort,
|
dataPort,
|
||||||
clockPort,
|
clockPort,
|
||||||
|
@@ -145,6 +145,7 @@ char LABEL_STYLE [] = "color:lightgreen";
|
|||||||
const QString &presetFile,
|
const QString &presetFile,
|
||||||
const QString &freqExtension,
|
const QString &freqExtension,
|
||||||
const QString &schedule,
|
const QString &schedule,
|
||||||
|
const QString &tiiFile,
|
||||||
bool error_report,
|
bool error_report,
|
||||||
int32_t dataPort,
|
int32_t dataPort,
|
||||||
int32_t clockPort,
|
int32_t clockPort,
|
||||||
@@ -176,7 +177,7 @@ char LABEL_STYLE [] = "color:lightgreen";
|
|||||||
theLogger (Si),
|
theLogger (Si),
|
||||||
theSCANHandler (this, Si,
|
theSCANHandler (this, Si,
|
||||||
freqExtension),
|
freqExtension),
|
||||||
theTIIProcessor (Si),
|
theTIIProcessor (tiiFile),
|
||||||
myTimeTable (this, Si) {
|
myTimeTable (this, Si) {
|
||||||
int16_t k;
|
int16_t k;
|
||||||
QString h;
|
QString h;
|
||||||
|
@@ -223,6 +223,7 @@ public:
|
|||||||
const QString &, //presets
|
const QString &, //presets
|
||||||
const QString &, //freqExt
|
const QString &, //freqExt
|
||||||
const QString &, //schedule
|
const QString &, //schedule
|
||||||
|
const QString &, //tiiFile
|
||||||
bool, // errorreport
|
bool, // errorreport
|
||||||
int32_t dataPort,
|
int32_t dataPort,
|
||||||
int32_t clockPort,
|
int32_t clockPort,
|
||||||
|
@@ -1,8 +1,29 @@
|
|||||||
#
|
#
|
||||||
//
|
/*
|
||||||
// This LUT implementation of atan2 is a C++ translation of
|
* Copyright (C) 2014 .. 2024
|
||||||
// a Java discussion on the net
|
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||||
// http://www.java-gaming.org/index.php?topic=14647.0
|
* Lazy Chair Computing
|
||||||
|
*
|
||||||
|
* This file is part of the Qt-DAB
|
||||||
|
*
|
||||||
|
* Qt-DAB is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Qt-DAB is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Qt-DAB; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* This LUT implementation of atan2 is a C++ translation of
|
||||||
|
* a Java discussion on the net
|
||||||
|
* http://www.java-gaming.org/index.php?topic=14647.0
|
||||||
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2014 .. 2020
|
* Copyright (C) 2014 .. 2025
|
||||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||||
* Lazy Chair Computing
|
* Lazy Chair Computing
|
||||||
*
|
*
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
// struct
|
// struct
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include "distances.h"
|
||||||
class cacheElement {
|
class cacheElement {
|
||||||
public:
|
public:
|
||||||
uint32_t key_1; // Eid + mainId + subId
|
uint32_t key_1; // Eid + mainId + subId
|
||||||
|
@@ -1,4 +1,25 @@
|
|||||||
|
#
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2014 .. 2024
|
||||||
|
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||||
|
* Lazy Chair Computing
|
||||||
|
*
|
||||||
|
* This file is part of the Qt-DAB
|
||||||
|
*
|
||||||
|
* Qt-DAB is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Qt-DAB is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Qt-DAB; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2014 .. 2020
|
* Copyright (C) 2014 .. 2025
|
||||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||||
* Lazy Chair Computing
|
* Lazy Chair Computing
|
||||||
*
|
*
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2014 .. 2017
|
* Copyright (C) 2016 .. 2025
|
||||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||||
* Lazy Chair Computing
|
* Lazy Chair Computing
|
||||||
*
|
*
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2010, 2011, 2012
|
* Copyright (C) 2016 .. 2025
|
||||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||||
* Lazy Chair Computing
|
* Lazy Chair Computing
|
||||||
*
|
*
|
||||||
@@ -19,7 +19,6 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Qt-DAB; if not, write to the Free Software
|
* along with Qt-DAB; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 .. 2017
|
* Copyright (C) 2016 .. 2025
|
||||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||||
* Lazy Chair Computing
|
* Lazy Chair Computing
|
||||||
*
|
*
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015, 2023
|
* Copyright (C) 2016 .. 2025
|
||||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||||
* Lazy Chair Computing
|
* Lazy Chair Computing
|
||||||
*
|
*
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
@@ -21,6 +21,8 @@
|
|||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
// Names of sections
|
// Names of sections
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#define DAB_GENERAL "dab-general"
|
#define DAB_GENERAL "dab-general"
|
||||||
#define CONFIG_HANDLER "configHandler"
|
#define CONFIG_HANDLER "configHandler"
|
||||||
#define ENSEMBLE "ENSEMBLE"
|
#define ENSEMBLE "ENSEMBLE"
|
||||||
|
@@ -25,7 +25,6 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
|
|
||||||
void store (QSettings *s, QString paragraph, QString key, QString v);
|
void store (QSettings *s, QString paragraph, QString key, QString v);
|
||||||
void store (QSettings *s, QString paragraph, QString key, int value);
|
void store (QSettings *s, QString paragraph, QString key, int value);
|
||||||
int value_i (QSettings *s, QString paragraph, QString key, int def);
|
int value_i (QSettings *s, QString paragraph, QString key, int def);
|
||||||
|
@@ -29,28 +29,22 @@
|
|||||||
#include "tii-mapper.h"
|
#include "tii-mapper.h"
|
||||||
#include "ITU_Region_1.h"
|
#include "ITU_Region_1.h"
|
||||||
#include "tii-reader.h"
|
#include "tii-reader.h"
|
||||||
#include <QSettings>
|
|
||||||
#include "tii-reader.h"
|
|
||||||
#include "settingNames.h"
|
|
||||||
#include "settings-handler.h"
|
|
||||||
|
|
||||||
tiiMapper::tiiMapper (QSettings *dabSettings) {
|
tiiMapper::tiiMapper (const QString &tiiFile) {
|
||||||
tiiReader theReader;
|
tiiReader theReader;
|
||||||
tiifileName = QDir::homePath () + "/.txdata.tii";
|
this -> tiiFile = tiiFile;
|
||||||
tiifileName =
|
if (tiiFile != "")
|
||||||
value_s (dabSettings, DAB_GENERAL, "tiiFileName", tiifileName);
|
theDataBase = theReader. readFile (tiiFile);
|
||||||
if (tiifileName != "")
|
|
||||||
theDataBase = theReader. readFile (tiifileName);
|
|
||||||
}
|
}
|
||||||
tiiMapper::~tiiMapper () {
|
tiiMapper::~tiiMapper () {
|
||||||
}
|
}
|
||||||
|
|
||||||
void tiiMapper::reload () {
|
void tiiMapper::reload () {
|
||||||
tiiReader theReader;
|
tiiReader theReader;
|
||||||
if (tiifileName == "")
|
if (tiiFile == "")
|
||||||
return;
|
return;
|
||||||
theDataBase. resize (0);
|
theDataBase. resize (0);
|
||||||
theDataBase = theReader. readFile (tiifileName);
|
theDataBase = theReader. readFile (tiiFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool tiiMapper::has_tiiFile () {
|
bool tiiMapper::has_tiiFile () {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2014 .. 2017
|
* Copyright (C) 2016 .. 2025
|
||||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||||
* Lazy Chair Computing
|
* Lazy Chair Computing
|
||||||
*
|
*
|
||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include "distances.h"
|
|
||||||
#include "cacheElement.h"
|
#include "cacheElement.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -38,7 +37,7 @@ typedef struct {
|
|||||||
|
|
||||||
class tiiMapper {
|
class tiiMapper {
|
||||||
public:
|
public:
|
||||||
tiiMapper (QSettings *);
|
tiiMapper (const QString &);
|
||||||
~tiiMapper ();
|
~tiiMapper ();
|
||||||
bool has_tiiFile ();
|
bool has_tiiFile ();
|
||||||
void reload ();
|
void reload ();
|
||||||
@@ -56,6 +55,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
std::vector<black> blackList;
|
std::vector<black> blackList;
|
||||||
std::vector<cacheElement> theDataBase;
|
std::vector<cacheElement> theDataBase;
|
||||||
QString tiifileName;
|
QString tiiFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2014 .. 2023
|
* Copyright (C) 2016 .. 2023
|
||||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||||
* Lazy Chair Computing
|
* Lazy Chair Computing
|
||||||
*
|
*
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
#include "tii-reader.h"
|
#include "tii-reader.h"
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
#include "scan-handler.h"
|
//#include "scan-handler.h"
|
||||||
|
|
||||||
#define SEPARATOR ';'
|
#define SEPARATOR ';'
|
||||||
#define COUNTRY 1
|
#define COUNTRY 1
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class tiiReader {
|
class tiiReader {
|
||||||
public:
|
public:
|
||||||
tiiReader ();
|
tiiReader ();
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2013 .. 2024
|
* Copyright (C) 2016 .. 2024
|
||||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||||
* Lazy Chair Computing
|
* Lazy Chair Computing
|
||||||
*
|
*
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015, 2023
|
* Copyright (C) 2016 .. 2023
|
||||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||||
* Lazy Chair Computing
|
* Lazy Chair Computing
|
||||||
*
|
*
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2014 .. 2025
|
* Copyright (C) 2016 .. 2025
|
||||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||||
* Lazy Chair Computing
|
* Lazy Chair Computing
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user