mirror of
https://github.com/JvanKatwijk/qt-dab.git
synced 2025-10-05 15:52:39 +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/bit-extractor.h
|
||||
./sources/support/cacheElement.h
|
||||
./sources/support/charsets.h
|
||||
./sources/support/content-table.h
|
||||
./sources/support/converter_48000.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-deconvolver.h
|
||||
./sources/backend/backend-driver.h
|
||||
./sources/backend/charsets.h
|
||||
./sources/backend/frame-processor.h
|
||||
./sources/backend/msc-handler.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/eep-protection.cpp
|
||||
./sources/support/audiosystem-selector.cpp
|
||||
./sources/support/charsets.cpp
|
||||
./sources/support/bandpass-filter.cpp
|
||||
./sources/support/content-table.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-deconvolver.cpp
|
||||
./sources/backend/backend-driver.cpp
|
||||
./sources/backend/charsets.cpp
|
||||
./sources/backend/msc-handler.cpp
|
||||
./sources/backend/reed-solomon/galois.cpp
|
||||
./sources/backend/reed-solomon/reed-solomon.cpp
|
||||
|
@@ -8,7 +8,14 @@
|
||||
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
|
||||
|
@@ -152,7 +152,6 @@ HEADERS += ./sources/main/radio.h \
|
||||
./sources/backend/msc-handler.h \
|
||||
./sources/backend/reed-solomon/galois.h \
|
||||
./sources/backend/reed-solomon/reed-solomon.h \
|
||||
./sources/backend/charsets.h \
|
||||
./sources/backend/frame-processor.h \
|
||||
./sources/backend/backend.h \
|
||||
./sources/backend/backend-driver.h \
|
||||
@@ -185,6 +184,7 @@ HEADERS += ./sources/main/radio.h \
|
||||
./sources/output/audio-player.h \
|
||||
./sources/support/dab-constants.h \
|
||||
./sources/support/bit-extractors.h \
|
||||
./sources/support/charsets.h \
|
||||
./sources/support/crc-handlers.h \
|
||||
./sources/support/mot-content-types.h \
|
||||
./sources/support/distances.h \
|
||||
@@ -303,7 +303,6 @@ SOURCES += ./sources/main/main.cpp \
|
||||
./sources/backend/msc-handler.cpp \
|
||||
./sources/backend/reed-solomon/galois.cpp \
|
||||
./sources/backend/reed-solomon/reed-solomon.cpp \
|
||||
./sources/backend/charsets.cpp \
|
||||
./sources/backend/backend.cpp \
|
||||
./sources/backend/backend-driver.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/xml-extractor.cpp \
|
||||
./sources/output/audio-player.cpp \
|
||||
./sources/support/charsets.cpp \
|
||||
./sources/support/distances.cpp \
|
||||
./sources/support/time-converter.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
|
||||
* if the firecode check fails, we shift one block
|
||||
*/
|
||||
handleRS (frameBytes. data (), blockFillIndex * nbits / 8,
|
||||
outVector. data (),
|
||||
frameErrors, rsErrors);
|
||||
handleRS (frameBytes, blockFillIndex * nbits / 8,
|
||||
outVector, frameErrors, rsErrors);
|
||||
if (frameErrors > 0) { // cannot fix the potential frame
|
||||
blocksInBuffer = 4;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!fc. check (&outVector [0])) {
|
||||
if (!fc. check (outVector. data ())) {
|
||||
blocksInBuffer = 4;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!processSuperframe (outVector. data ())) {
|
||||
if (!processSuperframe (outVector)) {
|
||||
frameErrors ++;
|
||||
blocksInBuffer = 0;
|
||||
return;
|
||||
@@ -175,8 +174,9 @@ uint8_t temp = 0;
|
||||
* We correct the errors using RS
|
||||
*/
|
||||
|
||||
void mp4Processor::handleRS (uint8_t frameBytes [], int16_t base,
|
||||
uint8_t outVector [],
|
||||
void mp4Processor::handleRS (const std::vector<uint8_t> &frameBytes,
|
||||
int16_t base,
|
||||
std::vector<uint8_t> &outVector,
|
||||
int16_t &errorLines, int16_t &repairs) {
|
||||
uint8_t rsIn [120];
|
||||
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;
|
||||
int tmp;
|
||||
stream_parms streamParameters;
|
||||
|
@@ -66,15 +66,16 @@ private:
|
||||
faadDecoder aacDecoder;
|
||||
#endif
|
||||
|
||||
void handleRS (uint8_t frameBytes [], int16_t base,
|
||||
uint8_t outVector [],
|
||||
void handleRS (const std::vector<uint8_t> &frameBytes,
|
||||
int16_t base,
|
||||
std::vector<uint8_t> &outVector,
|
||||
int16_t &errorLines, int16_t &repairs);
|
||||
|
||||
bool processSuperframe (uint8_t []);
|
||||
bool processSuperframe (std::vector<uint8_t> &);
|
||||
int build_aacFile (int16_t aac_frame_len,
|
||||
stream_parms *sp,
|
||||
uint8_t *data,
|
||||
std::vector<uint8_t> &fileBuffer);
|
||||
stream_parms *sp,
|
||||
uint8_t *data,
|
||||
std::vector<uint8_t> &fileBuffer);
|
||||
|
||||
FILE *dump;
|
||||
uint8_t procMode;
|
||||
|
@@ -81,6 +81,8 @@ bool error_report = false;
|
||||
int fmFrequency = 110000;
|
||||
QString scheduleFile = fullPathfor (SCHEDULE);
|
||||
|
||||
QString tiiFileName = QDir::homePath () + "/" + ".txdata.tii";
|
||||
|
||||
QTranslator theTranslator;
|
||||
QCoreApplication::setOrganizationName ("Lazy Chair Computing");
|
||||
QCoreApplication::setOrganizationDomain ("Lazy Chair Computing");
|
||||
@@ -93,6 +95,10 @@ QTranslator theTranslator;
|
||||
initFileName = fullPathfor (QString (optarg));
|
||||
break;
|
||||
|
||||
case 't':
|
||||
tiiFileName = QDir::homePath () + "/" + QString (optarg);
|
||||
break;
|
||||
|
||||
case 'P':
|
||||
dataPort = atoi (optarg);
|
||||
break;
|
||||
@@ -164,6 +170,7 @@ QTranslator theTranslator;
|
||||
presetFile,
|
||||
freqExtension,
|
||||
scheduleFile,
|
||||
tiiFileName,
|
||||
error_report,
|
||||
dataPort,
|
||||
clockPort,
|
||||
|
@@ -145,6 +145,7 @@ char LABEL_STYLE [] = "color:lightgreen";
|
||||
const QString &presetFile,
|
||||
const QString &freqExtension,
|
||||
const QString &schedule,
|
||||
const QString &tiiFile,
|
||||
bool error_report,
|
||||
int32_t dataPort,
|
||||
int32_t clockPort,
|
||||
@@ -176,7 +177,7 @@ char LABEL_STYLE [] = "color:lightgreen";
|
||||
theLogger (Si),
|
||||
theSCANHandler (this, Si,
|
||||
freqExtension),
|
||||
theTIIProcessor (Si),
|
||||
theTIIProcessor (tiiFile),
|
||||
myTimeTable (this, Si) {
|
||||
int16_t k;
|
||||
QString h;
|
||||
|
@@ -223,6 +223,7 @@ public:
|
||||
const QString &, //presets
|
||||
const QString &, //freqExt
|
||||
const QString &, //schedule
|
||||
const QString &, //tiiFile
|
||||
bool, // errorreport
|
||||
int32_t dataPort,
|
||||
int32_t clockPort,
|
||||
|
@@ -1,8 +1,29 @@
|
||||
#
|
||||
//
|
||||
// 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
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
* 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
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
/*
|
||||
* Copyright (C) 2014 .. 2020
|
||||
* Copyright (C) 2014 .. 2025
|
||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||
* Lazy Chair Computing
|
||||
*
|
||||
|
@@ -28,7 +28,7 @@
|
||||
// struct
|
||||
#include <string>
|
||||
#include <QString>
|
||||
|
||||
#include "distances.h"
|
||||
class cacheElement {
|
||||
public:
|
||||
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
|
||||
|
||||
#include <cstdint>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
/*
|
||||
* Copyright (C) 2014 .. 2020
|
||||
* Copyright (C) 2014 .. 2025
|
||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||
* Lazy Chair Computing
|
||||
*
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
/*
|
||||
* Copyright (C) 2014 .. 2017
|
||||
* Copyright (C) 2016 .. 2025
|
||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||
* Lazy Chair Computing
|
||||
*
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
/*
|
||||
* Copyright (C) 2010, 2011, 2012
|
||||
* Copyright (C) 2016 .. 2025
|
||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||
* Lazy Chair Computing
|
||||
*
|
||||
@@ -19,7 +19,6 @@
|
||||
* 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
|
||||
|
@@ -1,6 +1,6 @@
|
||||
|
||||
/*
|
||||
* Copyright (C) 2015 .. 2017
|
||||
* Copyright (C) 2016 .. 2025
|
||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||
* Lazy Chair Computing
|
||||
*
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
/*
|
||||
* Copyright (C) 2015, 2023
|
||||
* Copyright (C) 2016 .. 2025
|
||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||
* Lazy Chair Computing
|
||||
*
|
||||
|
@@ -21,6 +21,7 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
@@ -21,6 +21,8 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
// Names of sections
|
||||
#pragma once
|
||||
|
||||
#define DAB_GENERAL "dab-general"
|
||||
#define CONFIG_HANDLER "configHandler"
|
||||
#define ENSEMBLE "ENSEMBLE"
|
||||
|
@@ -25,7 +25,6 @@
|
||||
#include <QString>
|
||||
#include <QSettings>
|
||||
|
||||
|
||||
void store (QSettings *s, QString paragraph, QString key, QString v);
|
||||
void store (QSettings *s, QString paragraph, QString key, int value);
|
||||
int value_i (QSettings *s, QString paragraph, QString key, int def);
|
||||
|
@@ -29,28 +29,22 @@
|
||||
#include "tii-mapper.h"
|
||||
#include "ITU_Region_1.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;
|
||||
tiifileName = QDir::homePath () + "/.txdata.tii";
|
||||
tiifileName =
|
||||
value_s (dabSettings, DAB_GENERAL, "tiiFileName", tiifileName);
|
||||
if (tiifileName != "")
|
||||
theDataBase = theReader. readFile (tiifileName);
|
||||
this -> tiiFile = tiiFile;
|
||||
if (tiiFile != "")
|
||||
theDataBase = theReader. readFile (tiiFile);
|
||||
}
|
||||
tiiMapper::~tiiMapper () {
|
||||
}
|
||||
|
||||
void tiiMapper::reload () {
|
||||
tiiReader theReader;
|
||||
if (tiifileName == "")
|
||||
if (tiiFile == "")
|
||||
return;
|
||||
theDataBase. resize (0);
|
||||
theDataBase = theReader. readFile (tiifileName);
|
||||
theDataBase = theReader. readFile (tiiFile);
|
||||
}
|
||||
|
||||
bool tiiMapper::has_tiiFile () {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
/*
|
||||
* Copyright (C) 2014 .. 2017
|
||||
* Copyright (C) 2016 .. 2025
|
||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||
* Lazy Chair Computing
|
||||
*
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <stdio.h>
|
||||
#include <vector>
|
||||
#include <QSettings>
|
||||
#include "distances.h"
|
||||
#include "cacheElement.h"
|
||||
|
||||
typedef struct {
|
||||
@@ -38,7 +37,7 @@ typedef struct {
|
||||
|
||||
class tiiMapper {
|
||||
public:
|
||||
tiiMapper (QSettings *);
|
||||
tiiMapper (const QString &);
|
||||
~tiiMapper ();
|
||||
bool has_tiiFile ();
|
||||
void reload ();
|
||||
@@ -56,6 +55,6 @@ public:
|
||||
private:
|
||||
std::vector<black> blackList;
|
||||
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)
|
||||
* Lazy Chair Computing
|
||||
*
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "tii-reader.h"
|
||||
#include <QSettings>
|
||||
|
||||
#include "scan-handler.h"
|
||||
//#include "scan-handler.h"
|
||||
|
||||
#define SEPARATOR ';'
|
||||
#define COUNTRY 1
|
||||
|
@@ -33,6 +33,7 @@
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
class tiiReader {
|
||||
public:
|
||||
tiiReader ();
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
/*
|
||||
* Copyright (C) 2013 .. 2024
|
||||
* Copyright (C) 2016 .. 2024
|
||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||
* Lazy Chair Computing
|
||||
*
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
/*
|
||||
* Copyright (C) 2015, 2023
|
||||
* Copyright (C) 2016 .. 2023
|
||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||
* Lazy Chair Computing
|
||||
*
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
/*
|
||||
* Copyright (C) 2014 .. 2025
|
||||
* Copyright (C) 2016 .. 2025
|
||||
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
||||
* Lazy Chair Computing
|
||||
*
|
||||
|
Reference in New Issue
Block a user