diff --git a/plugins/channelrx/demoddatv/CMakeLists.txt b/plugins/channelrx/demoddatv/CMakeLists.txt index 421ac2b0a..100fab375 100644 --- a/plugins/channelrx/demoddatv/CMakeLists.txt +++ b/plugins/channelrx/demoddatv/CMakeLists.txt @@ -56,15 +56,17 @@ if(NOT SERVER_MODE) ${datv_SOURCES} datvdemodgui.ui datvdvbs2ldpcdialog.ui + datvdemodgui.cpp + datvdvbs2ldpcdialog.cpp datvideorender.cpp ) set(datv_HEADERS ${datv_HEADERS} datvdemodgui.h datvdvbs2ldpcdialog.h - datvideorender.h datvconstellation.h datvdvbs2constellation.h - ) + datvideorender.h + ) set(TARGET_NAME ${PLUGINS_PREFIX}demoddatv) set(TARGET_LIB Qt::Widgets Qt::Multimedia Qt::MultimediaWidgets) set(TARGET_LIB_GUI "sdrgui") @@ -107,12 +109,6 @@ target_link_libraries(${TARGET_NAME} PRIVATE ${SWRESAMPLE_LIBRARIES} ) -add_executable(ldpctool - ldpctool/ldpc_tool.cpp - ldpctool/tables_handler.cpp -) -install(TARGETS ldpctool DESTINATION ${INSTALL_BIN_DIR}) - if(DEFINED FFMPEG_DEPENDS) add_dependencies(${TARGET_NAME} ${FFMPEG_DEPENDS}) endif() diff --git a/plugins/channelrx/demoddatv/datvdemod.cpp b/plugins/channelrx/demoddatv/datvdemod.cpp index b6fa69e1b..78fb44057 100644 --- a/plugins/channelrx/demoddatv/datvdemod.cpp +++ b/plugins/channelrx/demoddatv/datvdemod.cpp @@ -212,9 +212,6 @@ void DATVDemod::applySettings(const DATVDemodSettings& settings, bool force) if (settings.m_softLDPC != m_settings.m_softLDPC) { reverseAPIKeys.append("softLDPC"); } - if (settings.m_softLDPCToolPath != m_settings.m_softLDPCToolPath) { - reverseAPIKeys.append("softLDPCToolPath"); - } if (settings.m_softLDPCMaxTrials != m_settings.m_softLDPCMaxTrials) { reverseAPIKeys.append("softLDPCMaxTrials"); } @@ -401,9 +398,6 @@ void DATVDemod::webapiUpdateChannelSettings( if (channelSettingsKeys.contains("softLDPC")) { settings.m_softLDPC = response.getDatvDemodSettings()->getSoftLdpc() == 1; } - if (channelSettingsKeys.contains("softLDPCToolPath")) { - settings.m_softLDPCToolPath = *response.getDatvDemodSettings()->getSoftLdpcToolPath(); - } if (channelSettingsKeys.contains("softLDPCMaxTrials")) { settings.m_softLDPCMaxTrials = response.getDatvDemodSettings()->getSoftLdpcMaxTrials(); } @@ -503,13 +497,6 @@ void DATVDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& res response.getDatvDemodSettings()->setModulation((int) settings.m_modulation); response.getDatvDemodSettings()->setFec((int) settings.m_fec); response.getDatvDemodSettings()->setSoftLdpc((int) settings.m_softLDPC ? 1 : 0); - - if (response.getDatvDemodSettings()->getSoftLdpcToolPath()) { - *response.getDatvDemodSettings()->getSoftLdpcToolPath() = settings.m_softLDPCToolPath; - } else { - response.getDatvDemodSettings()->setSoftLdpcToolPath(new QString(settings.m_softLDPCToolPath)); - } - response.getDatvDemodSettings()->setSoftLdpcMaxTrials(settings.m_softLDPCMaxTrials); response.getDatvDemodSettings()->setMaxBitflips(settings.m_maxBitflips); response.getDatvDemodSettings()->setAudioMute(settings.m_audioMute ? 1 : 0); @@ -664,9 +651,6 @@ void DATVDemod::webapiFormatChannelSettings( if (channelSettingsKeys.contains("softLDPC") || force) { swgDATVDemodSettings->setSoftLdpc(settings.m_softLDPC ? 1 : 0); } - if (channelSettingsKeys.contains("softLDPCToolPath") || force) { - swgDATVDemodSettings->setSoftLdpcToolPath(new QString(settings.m_softLDPCToolPath)); - } if (channelSettingsKeys.contains("softLDPCMaxTrials") || force) { swgDATVDemodSettings->setSoftLdpcMaxTrials(settings.m_softLDPCMaxTrials); } diff --git a/plugins/channelrx/demoddatv/datvdemodgui.cpp b/plugins/channelrx/demoddatv/datvdemodgui.cpp index cc0fb5c22..6fa1805f0 100644 --- a/plugins/channelrx/demoddatv/datvdemodgui.cpp +++ b/plugins/channelrx/demoddatv/datvdemodgui.cpp @@ -532,14 +532,12 @@ void DATVDemodGUI::ldpcToolSelect(const QPoint& p) { qDebug("DATVDemodGUI::ldpcToolSelect"); DatvDvbS2LdpcDialog ldpcDialog; - ldpcDialog.setFileName(m_settings.m_softLDPCToolPath); ldpcDialog.setMaxTrials(m_settings.m_softLDPCMaxTrials); ldpcDialog.move(p); if (ldpcDialog.exec() == QDialog::Accepted) { m_settings.m_softLDPCMaxTrials = ldpcDialog.getMaxTrials(); - m_settings.m_softLDPCToolPath = ldpcDialog.getFileName(); applySettings(); } } diff --git a/plugins/channelrx/demoddatv/datvdemodsettings.cpp b/plugins/channelrx/demoddatv/datvdemodsettings.cpp index b9179e7d3..73b9d5d26 100644 --- a/plugins/channelrx/demoddatv/datvdemodsettings.cpp +++ b/plugins/channelrx/demoddatv/datvdemodsettings.cpp @@ -28,12 +28,6 @@ #include "datvdemodsettings.h" -#ifdef _MSC_VER -#define DEFAULT_LDPCTOOLPATH "C:/Program Files/SDRangel/ldpctool.exe" -#else -#define DEFAULT_LDPCTOOLPATH "/opt/install/sdrangel/bin/ldpctool" -#endif - DATVDemodSettings::DATVDemodSettings() : m_channelMarker(nullptr), m_rollupState(nullptr) @@ -51,7 +45,6 @@ void DATVDemodSettings::resetToDefaults() m_modulation = BPSK; m_fec = FEC12; m_softLDPC = false; - m_softLDPCToolPath = DEFAULT_LDPCTOOLPATH; m_softLDPCMaxTrials = 8; m_maxBitflips = 0; m_symbolRate = 250000; @@ -120,7 +113,6 @@ QByteArray DATVDemodSettings::serialize() const s.writeU32(31, m_reverseAPIChannelIndex); s.writeBool(32, m_softLDPC); s.writeS32(33, m_maxBitflips); - s.writeString(34, m_softLDPCToolPath); s.writeS32(35, m_softLDPCMaxTrials); s.writeBool(36, m_playerEnable); @@ -215,7 +207,6 @@ bool DATVDemodSettings::deserialize(const QByteArray& data) d.readBool(32, &m_softLDPC, false); d.readS32(33, &m_maxBitflips, 0); - d.readString(34, &m_softLDPCToolPath, DEFAULT_LDPCTOOLPATH); d.readS32(35, &tmp, 8); m_softLDPCMaxTrials = tmp < 1 ? 1 : tmp > m_softLDPCMaxMaxTrials ? m_softLDPCMaxMaxTrials : tmp; d.readBool(36, &m_playerEnable, true); @@ -256,7 +247,6 @@ void DATVDemodSettings::debug(const QString& msg) const << " m_fec: " << m_fec << " m_softLDPC: " << m_softLDPC << " m_softLDPCMaxTrials: " << m_softLDPCMaxTrials - << " m_softLDPCToolPath: " << m_softLDPCToolPath << " m_maxBitflips: " << m_maxBitflips << " m_modulation: " << m_modulation << " m_standard: " << m_standard @@ -284,7 +274,6 @@ bool DATVDemodSettings::isDifferent(const DATVDemodSettings& other) || (m_fec != other.m_fec) || (m_softLDPC != other.m_softLDPC) || (m_softLDPCMaxTrials != other.m_softLDPCMaxTrials) - || (m_softLDPCToolPath != other.m_softLDPCToolPath) || (m_maxBitflips != other.m_maxBitflips) || (m_modulation != other.m_modulation) || (m_notchFilters != other.m_notchFilters) diff --git a/plugins/channelrx/demoddatv/datvdemodsettings.h b/plugins/channelrx/demoddatv/datvdemodsettings.h index 301145caf..1d646bf01 100644 --- a/plugins/channelrx/demoddatv/datvdemodsettings.h +++ b/plugins/channelrx/demoddatv/datvdemodsettings.h @@ -84,7 +84,6 @@ struct DATVDemodSettings DATVModulation m_modulation; DATVCodeRate m_fec; bool m_softLDPC; - QString m_softLDPCToolPath; int m_softLDPCMaxTrials; int m_maxBitflips; bool m_audioMute; diff --git a/plugins/channelrx/demoddatv/datvdemodsink.cpp b/plugins/channelrx/demoddatv/datvdemodsink.cpp index 10d7a65ac..b2c4acdb2 100644 --- a/plugins/channelrx/demoddatv/datvdemodsink.cpp +++ b/plugins/channelrx/demoddatv/datvdemodsink.cpp @@ -879,8 +879,7 @@ void DATVDemodSink::InitDATVS2Framework() << " Excursion: " << m_settings.m_excursion << " Channel sample rate: " << m_channelSampleRate << " Input sample rate: " << 2 * m_settings.m_symbolRate - << " m_softLDPCMaxTrials: " << m_settings.m_softLDPCMaxTrials - << " m_softLDPCToolPath: " << m_settings.m_softLDPCToolPath; + << " m_softLDPCMaxTrials: " << m_settings.m_softLDPCMaxTrials; m_objCfg.standard = m_settings.m_standard; @@ -1104,12 +1103,6 @@ void DATVDemodSink::InitDATVS2Framework() // bool commandFileValid = false; - if (QFileInfo::exists(m_settings.m_softLDPCToolPath)) - { - QFileInfo fileInfo = QFileInfo(m_settings.m_softLDPCToolPath); - // commandFileValid = fileInfo.isExecutable(); - } - if (m_settings.m_softLDPC /*&& commandFileValid*/) { #if 0 @@ -1134,8 +1127,6 @@ void DATVDemodSink::InitDATVS2Framework() // External LDPC decoder mode. // Deinterleave into soft bits. // TBD Latency - QByteArray ba = m_settings.m_softLDPCToolPath.toLocal8Bit(); - const char *c_str2 = ba.data(); p_fecframes = new leansdr::pipebuf >(m_objScheduler, "FEC frames", BUF_FRAMES); p_s2_deinterleaver = new leansdr::s2_deinterleaver( m_objScheduler, @@ -1147,7 +1138,6 @@ void DATVDemodSink::InitDATVS2Framework() m_objScheduler, *(leansdr::pipebuf< leansdr::fecframe > *) p_fecframes, *(leansdr::pipebuf *) p_bbframes, - c_str2, p_vbitcount, p_verrcount) ; diff --git a/plugins/channelrx/demoddatv/datvdvbs2ldpcdialog.cpp b/plugins/channelrx/demoddatv/datvdvbs2ldpcdialog.cpp index 33cf263f6..79bae70e3 100644 --- a/plugins/channelrx/demoddatv/datvdvbs2ldpcdialog.cpp +++ b/plugins/channelrx/demoddatv/datvdvbs2ldpcdialog.cpp @@ -42,12 +42,6 @@ void DatvDvbS2LdpcDialog::accept() QDialog::accept(); } -void DatvDvbS2LdpcDialog::setFileName(const QString& fileName) -{ - m_fileName = fileName; - ui->ldpcToolText->setText(m_fileName); -} - void DatvDvbS2LdpcDialog::setMaxTrials(int maxTrials) { m_maxTrials = maxTrials < 1 ? 1 : @@ -55,31 +49,6 @@ void DatvDvbS2LdpcDialog::setMaxTrials(int maxTrials) ui->maxTrials->setValue(m_maxTrials); } -void DatvDvbS2LdpcDialog::on_showFileDialog_clicked(bool checked) -{ - (void) checked; - - QFileDialog fileDialog(this, "Select LDPC tool"); - fileDialog.setOption(QFileDialog::DontUseNativeDialog, true); -#ifdef _MSC_VER - fileDialog.setNameFilter("*.exe"); -#else - fileDialog.setFilter(QDir::Executable | QDir::Files); -#endif - fileDialog.selectFile(m_fileName); - - if (fileDialog.exec() == QDialog::Accepted) - { - QStringList fileNames = fileDialog.selectedFiles(); - - if (fileNames.size() > 0) - { - m_fileName = fileNames[0]; - ui->ldpcToolText->setText(m_fileName); - } - } -} - void DatvDvbS2LdpcDialog::on_maxTrials_valueChanged(int value) { m_maxTrials = value; diff --git a/plugins/channelrx/demoddatv/datvdvbs2ldpcdialog.h b/plugins/channelrx/demoddatv/datvdvbs2ldpcdialog.h index 91745ab17..26a2f3865 100644 --- a/plugins/channelrx/demoddatv/datvdvbs2ldpcdialog.h +++ b/plugins/channelrx/demoddatv/datvdvbs2ldpcdialog.h @@ -33,19 +33,15 @@ public: explicit DatvDvbS2LdpcDialog(QWidget* parent = nullptr); ~DatvDvbS2LdpcDialog(); - void setFileName(const QString& fileName); void setMaxTrials(int maxTrials); - QString& getFileName() { return m_fileName; } int getMaxTrials() { return m_maxTrials; } private: Ui::DatvDvbS2LdpcDialog* ui; - QString m_fileName; int m_maxTrials; private slots: void accept(); - void on_showFileDialog_clicked(bool checked); void on_maxTrials_valueChanged(int value); }; diff --git a/plugins/channelrx/demoddatv/datvdvbs2ldpcdialog.ui b/plugins/channelrx/demoddatv/datvdvbs2ldpcdialog.ui index 52244ce03..753c9b954 100644 --- a/plugins/channelrx/demoddatv/datvdvbs2ldpcdialog.ui +++ b/plugins/channelrx/demoddatv/datvdvbs2ldpcdialog.ui @@ -6,8 +6,8 @@ 0 0 - 461 - 121 + 454 + 80 @@ -63,66 +63,6 @@ - - - - - - LDPC tool - - - - - - - - 24 - 16777215 - - - - Choose a log file - - - - - - - :/preset-load.png:/preset-load.png - - - - - - - - 300 - 0 - - - - Log file - - - ... - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - diff --git a/plugins/channelrx/demoddatv/leansdr/dvbs2.h b/plugins/channelrx/demoddatv/leansdr/dvbs2.h index 9c17afec4..ee4b59830 100644 --- a/plugins/channelrx/demoddatv/leansdr/dvbs2.h +++ b/plugins/channelrx/demoddatv/leansdr/dvbs2.h @@ -3644,7 +3644,6 @@ struct s2_fecdec_helper : runnable scheduler *sch, pipebuf> &_in, pipebuf &_out, - const char *_command, pipebuf *_bitcount = nullptr, pipebuf *_errcount = nullptr ) : @@ -3658,7 +3657,6 @@ struct s2_fecdec_helper : runnable bitcount(opt_writer(_bitcount, 1)), errcount(opt_writer(_errcount, 1)) { - command = strdup(_command); for (int mc = 0; mc < 32; ++mc) { for (int sf = 0; sf < 2; ++sf) { @@ -3669,7 +3667,6 @@ struct s2_fecdec_helper : runnable ~s2_fecdec_helper() { - free(command); killall(); // also deletes pools[mc][sf].procs if necessary } diff --git a/plugins/channelrx/demoddatv/readme.md b/plugins/channelrx/demoddatv/readme.md index 957c51a25..783d006a9 100644 --- a/plugins/channelrx/demoddatv/readme.md +++ b/plugins/channelrx/demoddatv/readme.md @@ -191,7 +191,7 @@ It can be used to decode signals lower that ~10 db MER which is the limit of LDP Right clicking on this control opens a dialog where you can choose: - - The `ldpctool` executable. Obsolete. + - ~~The `ldpctool` executable.~~ Obsolete removed. - The maximum of retries in LDPC decoding from 1 to 8.
B.2b.7: DVB-S2 specific - LDPC maximum number of bit flips allowed