1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-07-29 20:22:26 -04:00

Compare commits

..

No commits in common. "de4147b853391aa450fef6ba25fc8a77256fbe27" and "ce007419e8c2493751e7b654e226fac8fe0fd0c6" have entirely different histories.

9 changed files with 11 additions and 91 deletions

View File

@ -576,7 +576,6 @@ void DATVDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& respons
response.getDatvDemodReport()->setChannelPowerDb(CalcDb::dbPower(magsq)); response.getDatvDemodReport()->setChannelPowerDb(CalcDb::dbPower(magsq));
response.getDatvDemodReport()->setAudioActive(audioActive() ? 1 : 0); response.getDatvDemodReport()->setAudioActive(audioActive() ? 1 : 0);
response.getDatvDemodReport()->setAudioDecodeOk(audioDecodeOK() ? 1 : 0); response.getDatvDemodReport()->setAudioDecodeOk(audioDecodeOK() ? 1 : 0);
response.getDatvDemodReport()->setSymbolRate(m_settings.m_symbolRate); // This is repeated from settings for convenience
response.getDatvDemodReport()->setModcodCodeRate(getModcodCodeRate()); response.getDatvDemodReport()->setModcodCodeRate(getModcodCodeRate());
response.getDatvDemodReport()->setModcodModulation(getModcodModulation()); response.getDatvDemodReport()->setModcodModulation(getModcodModulation());
response.getDatvDemodReport()->setSetByModcod(isCstlnSetByModcod() ? 1 : 0); response.getDatvDemodReport()->setSetByModcod(isCstlnSetByModcod() ? 1 : 0);

View File

@ -37,7 +37,7 @@ const unsigned int DATVDemodSink::m_rfFilterFftLength = 512;
DATVDemodSink::DATVDemodSink() : DATVDemodSink::DATVDemodSink() :
m_blnNeedConfigUpdate(false), m_blnNeedConfigUpdate(false),
m_tvScreen(nullptr), m_tvScreen(nullptr),
#ifndef SERVER_MODE #ifndef SERVER_MODE
m_videoRender(nullptr), m_videoRender(nullptr),
#endif #endif
m_videoStream(new DATVideostream()), m_videoStream(new DATVideostream()),
@ -95,7 +95,7 @@ void DATVDemodSink::setTVScreen(TVScreen *tvScreen)
void DATVDemodSink::SetVideoRender(DATVideoRender *screen) void DATVDemodSink::SetVideoRender(DATVideoRender *screen)
{ {
#ifndef SERVER_MODE #ifndef SERVER_MODE
m_videoRender = screen; m_videoRender = screen;
m_videoRender->setAudioFIFO(&m_audioFifo); m_videoRender->setAudioFIFO(&m_audioFifo);
m_videoThread = new DATVideoRenderThread(m_videoRender, m_videoStream); m_videoThread = new DATVideoRenderThread(m_videoRender, m_videoStream);
@ -162,6 +162,7 @@ bool DATVDemodSink::udpRunning()
} }
bool udpRunning = r_videoplayer->isUDPRunning(); bool udpRunning = r_videoplayer->isUDPRunning();
r_videoplayer->resetUDPRunning();
return udpRunning; return udpRunning;
} }
@ -525,7 +526,7 @@ void DATVDemodSink::ResetDATVFrameworkPointers()
r_videoplayer = nullptr; r_videoplayer = nullptr;
//CONSTELLATION //CONSTELLATION
#ifndef SERVER_MODE #ifndef SERVER_MODE
r_scope_symbols = nullptr; r_scope_symbols = nullptr;
#endif #endif
@ -542,7 +543,7 @@ void DATVDemodSink::ResetDATVFrameworkPointers()
r_fecdecsoft = nullptr; r_fecdecsoft = nullptr;
r_fecdechelper = nullptr; r_fecdechelper = nullptr;
p_deframer = nullptr; p_deframer = nullptr;
#ifndef SERVER_MODE #ifndef SERVER_MODE
r_scope_symbols_dvbs2 = nullptr; r_scope_symbols_dvbs2 = nullptr;
#endif #endif
} }
@ -878,7 +879,6 @@ void DATVDemodSink::InitDATVFramework()
r_videoplayer = new leansdr::datvvideoplayer<leansdr::tspacket>(m_objScheduler, *p_tspackets, nullptr, &m_udpStream); r_videoplayer = new leansdr::datvvideoplayer<leansdr::tspacket>(m_objScheduler, *p_tspackets, nullptr, &m_udpStream);
} }
r_videoplayer->setSymbolRate(m_settings.m_symbolRate);
m_blnDVBInitialized = true; m_blnDVBInitialized = true;
} }
@ -1212,7 +1212,6 @@ void DATVDemodSink::InitDATVS2Framework()
r_videoplayer = new leansdr::datvvideoplayer<leansdr::tspacket>(m_objScheduler, *p_tspackets, nullptr, &m_udpStream); r_videoplayer = new leansdr::datvvideoplayer<leansdr::tspacket>(m_objScheduler, *p_tspackets, nullptr, &m_udpStream);
} }
r_videoplayer->setSymbolRate(m_settings.m_symbolRate);
m_blnDVBInitialized = true; m_blnDVBInitialized = true;
} }
@ -1229,7 +1228,7 @@ void DATVDemodSink::feed(const SampleVector::const_iterator& begin, const Sample
qDebug("DATVDemodSink::feed: change by MODCOD detected"); qDebug("DATVDemodSink::feed: change by MODCOD detected");
// Update constellation // Update constellation
#ifndef SERVER_MODE #ifndef SERVER_MODE
if (r_scope_symbols_dvbs2) { if (r_scope_symbols_dvbs2) {
r_scope_symbols_dvbs2->calculate_cstln_points(); r_scope_symbols_dvbs2->calculate_cstln_points();
} }
@ -1420,19 +1419,8 @@ void DATVDemodSink::applySettings(const DATVDemodSettings& settings, bool force)
m_nco.setFreq(-(float) settings.m_centerFrequency, (float) m_channelSampleRate); m_nco.setFreq(-(float) settings.m_centerFrequency, (float) m_channelSampleRate);
} }
if ((m_settings.m_udpTS != settings.m_udpTS) || force) if ((m_settings.m_udpTS != settings.m_udpTS) || force) {
{
m_udpStream.setActive(settings.m_udpTS); m_udpStream.setActive(settings.m_udpTS);
if (r_videoplayer && !settings.m_udpTS) {
r_videoplayer->resetUDPRunning();
}
}
if ((m_settings.m_symbolRate != settings.m_symbolRate) || force) {
if (r_videoplayer) {
r_videoplayer->setSymbolRate(settings.m_symbolRate);
}
} }
if ((m_settings.m_udpTSAddress != settings.m_udpTSAddress) || force) { if ((m_settings.m_udpTSAddress != settings.m_udpTSAddress) || force) {

View File

@ -42,9 +42,7 @@ template<typename T> struct datvvideoplayer: runnable
in(_in), in(_in),
m_videoStream(videoStream), m_videoStream(videoStream),
m_udpStream(udpStream), m_udpStream(udpStream),
m_atomicUDPRunning(0), m_atomicUDPRunning(0)
m_count(0),
m_sr(1500000)
{ {
} }
@ -52,18 +50,7 @@ template<typename T> struct datvvideoplayer: runnable
{ {
int size = in.readable() * sizeof(T); int size = in.readable() * sizeof(T);
if (!size) if (!size) {
{
if (m_count == 0)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
m_atomicUDPRunning.storeRelaxed(0);
#else
m_atomicUDPRunning.store(0);
#endif
} else {
m_count--;
}
return; return;
} }
@ -75,8 +62,6 @@ template<typename T> struct datvvideoplayer: runnable
#else #else
m_atomicUDPRunning.store(m_udpStream->isActive() && (size > 0) ? 1 : 0); m_atomicUDPRunning.store(m_udpStream->isActive() && (size > 0) ? 1 : 0);
#endif #endif
m_count = m_sr / 10000;
if (m_videoStream) if (m_videoStream)
{ {
nw = m_videoStream->pushData((const char *) in.rd(), size); nw = m_videoStream->pushData((const char *) in.rd(), size);
@ -129,18 +114,11 @@ template<typename T> struct datvvideoplayer: runnable
#endif #endif
} }
void setSymbolRate(unsigned int sr)
{
m_sr = sr;
}
private: private:
pipereader<T> in; pipereader<T> in;
DATVideostream *m_videoStream; DATVideostream *m_videoStream;
DATVUDPStream *m_udpStream; DATVUDPStream *m_udpStream;
QAtomicInt m_atomicUDPRunning; QAtomicInt m_atomicUDPRunning;
unsigned int m_count;
unsigned int m_sr; // Symbol rate in S/s used for UDP running detection
}; };
} }

View File

@ -4877,10 +4877,6 @@ margin-bottom: 20px;
"type" : "integer", "type" : "integer",
"description" : "UDP thread (1 running, 0 idle)" "description" : "UDP thread (1 running, 0 idle)"
}, },
"symbolRate" : {
"type" : "integer",
"description" : "Symbol rate in symbols per second - repeated from settings for convenience\n"
},
"modcodModulation" : { "modcodModulation" : {
"type" : "integer", "type" : "integer",
"description" : "Modulation set by DVB-S2 MODCOD\n * -1: Unset\n * 0: BPSK\n * 1: QPSK\n * 2: PSK8\n * 3: APSK16\n * 4: APSK32\n * 5: APSK64E\n * 6: QAM16\n * 7: QAM64\n * 8: QAM256\n" "description" : "Modulation set by DVB-S2 MODCOD\n * -1: Unset\n * 0: BPSK\n * 1: QPSK\n * 2: PSK8\n * 3: APSK16\n * 4: APSK32\n * 5: APSK64E\n * 6: QAM16\n * 7: QAM64\n * 8: QAM256\n"
@ -59472,7 +59468,7 @@ except ApiException as e:
</div> </div>
<div id="generator"> <div id="generator">
<div class="content"> <div class="content">
Generated 2025-05-03T17:59:40.379+02:00 Generated 2025-05-03T03:12:21.688+02:00
</div> </div>
</div> </div>
</div> </div>

View File

@ -145,10 +145,6 @@ DATVDemodReport:
udpRunning: udpRunning:
description: UDP thread (1 running, 0 idle) description: UDP thread (1 running, 0 idle)
type: integer type: integer
symbolRate:
type: integer
description: >
Symbol rate in symbols per second - repeated from settings for convenience
modcodModulation: modcodModulation:
type: integer type: integer
description: > description: >

View File

@ -145,10 +145,6 @@ DATVDemodReport:
udpRunning: udpRunning:
description: UDP thread (1 running, 0 idle) description: UDP thread (1 running, 0 idle)
type: integer type: integer
symbolRate:
type: integer
description: >
Symbol rate in symbols per second - repeated from settings for convenience
modcodModulation: modcodModulation:
type: integer type: integer
description: > description: >

View File

@ -4877,10 +4877,6 @@ margin-bottom: 20px;
"type" : "integer", "type" : "integer",
"description" : "UDP thread (1 running, 0 idle)" "description" : "UDP thread (1 running, 0 idle)"
}, },
"symbolRate" : {
"type" : "integer",
"description" : "Symbol rate in symbols per second - repeated from settings for convenience\n"
},
"modcodModulation" : { "modcodModulation" : {
"type" : "integer", "type" : "integer",
"description" : "Modulation set by DVB-S2 MODCOD\n * -1: Unset\n * 0: BPSK\n * 1: QPSK\n * 2: PSK8\n * 3: APSK16\n * 4: APSK32\n * 5: APSK64E\n * 6: QAM16\n * 7: QAM64\n * 8: QAM256\n" "description" : "Modulation set by DVB-S2 MODCOD\n * -1: Unset\n * 0: BPSK\n * 1: QPSK\n * 2: PSK8\n * 3: APSK16\n * 4: APSK32\n * 5: APSK64E\n * 6: QAM16\n * 7: QAM64\n * 8: QAM256\n"
@ -59472,7 +59468,7 @@ except ApiException as e:
</div> </div>
<div id="generator"> <div id="generator">
<div class="content"> <div class="content">
Generated 2025-05-03T17:59:40.379+02:00 Generated 2025-05-03T03:12:21.688+02:00
</div> </div>
</div> </div>
</div> </div>

View File

@ -40,8 +40,6 @@ SWGDATVDemodReport::SWGDATVDemodReport() {
m_video_decode_ok_isSet = false; m_video_decode_ok_isSet = false;
udp_running = 0; udp_running = 0;
m_udp_running_isSet = false; m_udp_running_isSet = false;
symbol_rate = 0;
m_symbol_rate_isSet = false;
modcod_modulation = 0; modcod_modulation = 0;
m_modcod_modulation_isSet = false; m_modcod_modulation_isSet = false;
modcod_code_rate = 0; modcod_code_rate = 0;
@ -72,8 +70,6 @@ SWGDATVDemodReport::init() {
m_video_decode_ok_isSet = false; m_video_decode_ok_isSet = false;
udp_running = 0; udp_running = 0;
m_udp_running_isSet = false; m_udp_running_isSet = false;
symbol_rate = 0;
m_symbol_rate_isSet = false;
modcod_modulation = 0; modcod_modulation = 0;
m_modcod_modulation_isSet = false; m_modcod_modulation_isSet = false;
modcod_code_rate = 0; modcod_code_rate = 0;
@ -99,7 +95,6 @@ SWGDATVDemodReport::cleanup() {
} }
SWGDATVDemodReport* SWGDATVDemodReport*
@ -125,8 +120,6 @@ SWGDATVDemodReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&udp_running, pJson["udpRunning"], "qint32", ""); ::SWGSDRangel::setValue(&udp_running, pJson["udpRunning"], "qint32", "");
::SWGSDRangel::setValue(&symbol_rate, pJson["symbolRate"], "qint32", "");
::SWGSDRangel::setValue(&modcod_modulation, pJson["modcodModulation"], "qint32", ""); ::SWGSDRangel::setValue(&modcod_modulation, pJson["modcodModulation"], "qint32", "");
::SWGSDRangel::setValue(&modcod_code_rate, pJson["modcodCodeRate"], "qint32", ""); ::SWGSDRangel::setValue(&modcod_code_rate, pJson["modcodCodeRate"], "qint32", "");
@ -171,9 +164,6 @@ SWGDATVDemodReport::asJsonObject() {
if(m_udp_running_isSet){ if(m_udp_running_isSet){
obj->insert("udpRunning", QJsonValue(udp_running)); obj->insert("udpRunning", QJsonValue(udp_running));
} }
if(m_symbol_rate_isSet){
obj->insert("symbolRate", QJsonValue(symbol_rate));
}
if(m_modcod_modulation_isSet){ if(m_modcod_modulation_isSet){
obj->insert("modcodModulation", QJsonValue(modcod_modulation)); obj->insert("modcodModulation", QJsonValue(modcod_modulation));
} }
@ -253,16 +243,6 @@ SWGDATVDemodReport::setUdpRunning(qint32 udp_running) {
this->m_udp_running_isSet = true; this->m_udp_running_isSet = true;
} }
qint32
SWGDATVDemodReport::getSymbolRate() {
return symbol_rate;
}
void
SWGDATVDemodReport::setSymbolRate(qint32 symbol_rate) {
this->symbol_rate = symbol_rate;
this->m_symbol_rate_isSet = true;
}
qint32 qint32
SWGDATVDemodReport::getModcodModulation() { SWGDATVDemodReport::getModcodModulation() {
return modcod_modulation; return modcod_modulation;
@ -336,9 +316,6 @@ SWGDATVDemodReport::isSet(){
if(m_udp_running_isSet){ if(m_udp_running_isSet){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }
if(m_symbol_rate_isSet){
isObjectUpdated = true; break;
}
if(m_modcod_modulation_isSet){ if(m_modcod_modulation_isSet){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }

View File

@ -59,9 +59,6 @@ public:
qint32 getUdpRunning(); qint32 getUdpRunning();
void setUdpRunning(qint32 udp_running); void setUdpRunning(qint32 udp_running);
qint32 getSymbolRate();
void setSymbolRate(qint32 symbol_rate);
qint32 getModcodModulation(); qint32 getModcodModulation();
void setModcodModulation(qint32 modcod_modulation); void setModcodModulation(qint32 modcod_modulation);
@ -99,9 +96,6 @@ private:
qint32 udp_running; qint32 udp_running;
bool m_udp_running_isSet; bool m_udp_running_isSet;
qint32 symbol_rate;
bool m_symbol_rate_isSet;
qint32 modcod_modulation; qint32 modcod_modulation;
bool m_modcod_modulation_isSet; bool m_modcod_modulation_isSet;