mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-06-13 03:52:30 -04:00
Compare commits
2 Commits
ce007419e8
...
de4147b853
Author | SHA1 | Date | |
---|---|---|---|
|
de4147b853 | ||
|
002f5e8af3 |
@ -576,6 +576,7 @@ void DATVDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& respons
|
||||
response.getDatvDemodReport()->setChannelPowerDb(CalcDb::dbPower(magsq));
|
||||
response.getDatvDemodReport()->setAudioActive(audioActive() ? 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()->setModcodModulation(getModcodModulation());
|
||||
response.getDatvDemodReport()->setSetByModcod(isCstlnSetByModcod() ? 1 : 0);
|
||||
|
@ -37,7 +37,7 @@ const unsigned int DATVDemodSink::m_rfFilterFftLength = 512;
|
||||
DATVDemodSink::DATVDemodSink() :
|
||||
m_blnNeedConfigUpdate(false),
|
||||
m_tvScreen(nullptr),
|
||||
#ifndef SERVER_MODE
|
||||
#ifndef SERVER_MODE
|
||||
m_videoRender(nullptr),
|
||||
#endif
|
||||
m_videoStream(new DATVideostream()),
|
||||
@ -95,7 +95,7 @@ void DATVDemodSink::setTVScreen(TVScreen *tvScreen)
|
||||
|
||||
void DATVDemodSink::SetVideoRender(DATVideoRender *screen)
|
||||
{
|
||||
#ifndef SERVER_MODE
|
||||
#ifndef SERVER_MODE
|
||||
m_videoRender = screen;
|
||||
m_videoRender->setAudioFIFO(&m_audioFifo);
|
||||
m_videoThread = new DATVideoRenderThread(m_videoRender, m_videoStream);
|
||||
@ -162,7 +162,6 @@ bool DATVDemodSink::udpRunning()
|
||||
}
|
||||
|
||||
bool udpRunning = r_videoplayer->isUDPRunning();
|
||||
r_videoplayer->resetUDPRunning();
|
||||
|
||||
return udpRunning;
|
||||
}
|
||||
@ -526,7 +525,7 @@ void DATVDemodSink::ResetDATVFrameworkPointers()
|
||||
r_videoplayer = nullptr;
|
||||
|
||||
//CONSTELLATION
|
||||
#ifndef SERVER_MODE
|
||||
#ifndef SERVER_MODE
|
||||
r_scope_symbols = nullptr;
|
||||
#endif
|
||||
|
||||
@ -543,7 +542,7 @@ void DATVDemodSink::ResetDATVFrameworkPointers()
|
||||
r_fecdecsoft = nullptr;
|
||||
r_fecdechelper = nullptr;
|
||||
p_deframer = nullptr;
|
||||
#ifndef SERVER_MODE
|
||||
#ifndef SERVER_MODE
|
||||
r_scope_symbols_dvbs2 = nullptr;
|
||||
#endif
|
||||
}
|
||||
@ -879,6 +878,7 @@ void DATVDemodSink::InitDATVFramework()
|
||||
r_videoplayer = new leansdr::datvvideoplayer<leansdr::tspacket>(m_objScheduler, *p_tspackets, nullptr, &m_udpStream);
|
||||
}
|
||||
|
||||
r_videoplayer->setSymbolRate(m_settings.m_symbolRate);
|
||||
m_blnDVBInitialized = true;
|
||||
}
|
||||
|
||||
@ -1212,6 +1212,7 @@ void DATVDemodSink::InitDATVS2Framework()
|
||||
r_videoplayer = new leansdr::datvvideoplayer<leansdr::tspacket>(m_objScheduler, *p_tspackets, nullptr, &m_udpStream);
|
||||
}
|
||||
|
||||
r_videoplayer->setSymbolRate(m_settings.m_symbolRate);
|
||||
m_blnDVBInitialized = true;
|
||||
}
|
||||
|
||||
@ -1228,7 +1229,7 @@ void DATVDemodSink::feed(const SampleVector::const_iterator& begin, const Sample
|
||||
qDebug("DATVDemodSink::feed: change by MODCOD detected");
|
||||
|
||||
// Update constellation
|
||||
#ifndef SERVER_MODE
|
||||
#ifndef SERVER_MODE
|
||||
if (r_scope_symbols_dvbs2) {
|
||||
r_scope_symbols_dvbs2->calculate_cstln_points();
|
||||
}
|
||||
@ -1419,8 +1420,19 @@ void DATVDemodSink::applySettings(const DATVDemodSettings& settings, bool force)
|
||||
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);
|
||||
|
||||
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) {
|
||||
|
@ -42,7 +42,9 @@ template<typename T> struct datvvideoplayer: runnable
|
||||
in(_in),
|
||||
m_videoStream(videoStream),
|
||||
m_udpStream(udpStream),
|
||||
m_atomicUDPRunning(0)
|
||||
m_atomicUDPRunning(0),
|
||||
m_count(0),
|
||||
m_sr(1500000)
|
||||
{
|
||||
}
|
||||
|
||||
@ -50,7 +52,18 @@ template<typename T> struct datvvideoplayer: runnable
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
@ -62,6 +75,8 @@ template<typename T> struct datvvideoplayer: runnable
|
||||
#else
|
||||
m_atomicUDPRunning.store(m_udpStream->isActive() && (size > 0) ? 1 : 0);
|
||||
#endif
|
||||
m_count = m_sr / 10000;
|
||||
|
||||
if (m_videoStream)
|
||||
{
|
||||
nw = m_videoStream->pushData((const char *) in.rd(), size);
|
||||
@ -114,11 +129,18 @@ template<typename T> struct datvvideoplayer: runnable
|
||||
#endif
|
||||
}
|
||||
|
||||
void setSymbolRate(unsigned int sr)
|
||||
{
|
||||
m_sr = sr;
|
||||
}
|
||||
|
||||
private:
|
||||
pipereader<T> in;
|
||||
DATVideostream *m_videoStream;
|
||||
DATVUDPStream *m_udpStream;
|
||||
QAtomicInt m_atomicUDPRunning;
|
||||
unsigned int m_count;
|
||||
unsigned int m_sr; // Symbol rate in S/s used for UDP running detection
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -4877,6 +4877,10 @@ margin-bottom: 20px;
|
||||
"type" : "integer",
|
||||
"description" : "UDP thread (1 running, 0 idle)"
|
||||
},
|
||||
"symbolRate" : {
|
||||
"type" : "integer",
|
||||
"description" : "Symbol rate in symbols per second - repeated from settings for convenience\n"
|
||||
},
|
||||
"modcodModulation" : {
|
||||
"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"
|
||||
@ -59468,7 +59472,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2025-05-03T03:12:21.688+02:00
|
||||
Generated 2025-05-03T17:59:40.379+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -145,6 +145,10 @@ DATVDemodReport:
|
||||
udpRunning:
|
||||
description: UDP thread (1 running, 0 idle)
|
||||
type: integer
|
||||
symbolRate:
|
||||
type: integer
|
||||
description: >
|
||||
Symbol rate in symbols per second - repeated from settings for convenience
|
||||
modcodModulation:
|
||||
type: integer
|
||||
description: >
|
||||
|
@ -145,6 +145,10 @@ DATVDemodReport:
|
||||
udpRunning:
|
||||
description: UDP thread (1 running, 0 idle)
|
||||
type: integer
|
||||
symbolRate:
|
||||
type: integer
|
||||
description: >
|
||||
Symbol rate in symbols per second - repeated from settings for convenience
|
||||
modcodModulation:
|
||||
type: integer
|
||||
description: >
|
||||
|
@ -4877,6 +4877,10 @@ margin-bottom: 20px;
|
||||
"type" : "integer",
|
||||
"description" : "UDP thread (1 running, 0 idle)"
|
||||
},
|
||||
"symbolRate" : {
|
||||
"type" : "integer",
|
||||
"description" : "Symbol rate in symbols per second - repeated from settings for convenience\n"
|
||||
},
|
||||
"modcodModulation" : {
|
||||
"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"
|
||||
@ -59468,7 +59472,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2025-05-03T03:12:21.688+02:00
|
||||
Generated 2025-05-03T17:59:40.379+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -40,6 +40,8 @@ SWGDATVDemodReport::SWGDATVDemodReport() {
|
||||
m_video_decode_ok_isSet = false;
|
||||
udp_running = 0;
|
||||
m_udp_running_isSet = false;
|
||||
symbol_rate = 0;
|
||||
m_symbol_rate_isSet = false;
|
||||
modcod_modulation = 0;
|
||||
m_modcod_modulation_isSet = false;
|
||||
modcod_code_rate = 0;
|
||||
@ -70,6 +72,8 @@ SWGDATVDemodReport::init() {
|
||||
m_video_decode_ok_isSet = false;
|
||||
udp_running = 0;
|
||||
m_udp_running_isSet = false;
|
||||
symbol_rate = 0;
|
||||
m_symbol_rate_isSet = false;
|
||||
modcod_modulation = 0;
|
||||
m_modcod_modulation_isSet = false;
|
||||
modcod_code_rate = 0;
|
||||
@ -95,6 +99,7 @@ SWGDATVDemodReport::cleanup() {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
SWGDATVDemodReport*
|
||||
@ -120,6 +125,8 @@ SWGDATVDemodReport::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&udp_running, pJson["udpRunning"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&symbol_rate, pJson["symbolRate"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&modcod_modulation, pJson["modcodModulation"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&modcod_code_rate, pJson["modcodCodeRate"], "qint32", "");
|
||||
@ -164,6 +171,9 @@ SWGDATVDemodReport::asJsonObject() {
|
||||
if(m_udp_running_isSet){
|
||||
obj->insert("udpRunning", QJsonValue(udp_running));
|
||||
}
|
||||
if(m_symbol_rate_isSet){
|
||||
obj->insert("symbolRate", QJsonValue(symbol_rate));
|
||||
}
|
||||
if(m_modcod_modulation_isSet){
|
||||
obj->insert("modcodModulation", QJsonValue(modcod_modulation));
|
||||
}
|
||||
@ -243,6 +253,16 @@ SWGDATVDemodReport::setUdpRunning(qint32 udp_running) {
|
||||
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
|
||||
SWGDATVDemodReport::getModcodModulation() {
|
||||
return modcod_modulation;
|
||||
@ -316,6 +336,9 @@ SWGDATVDemodReport::isSet(){
|
||||
if(m_udp_running_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_symbol_rate_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_modcod_modulation_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
|
@ -59,6 +59,9 @@ public:
|
||||
qint32 getUdpRunning();
|
||||
void setUdpRunning(qint32 udp_running);
|
||||
|
||||
qint32 getSymbolRate();
|
||||
void setSymbolRate(qint32 symbol_rate);
|
||||
|
||||
qint32 getModcodModulation();
|
||||
void setModcodModulation(qint32 modcod_modulation);
|
||||
|
||||
@ -96,6 +99,9 @@ private:
|
||||
qint32 udp_running;
|
||||
bool m_udp_running_isSet;
|
||||
|
||||
qint32 symbol_rate;
|
||||
bool m_symbol_rate_isSet;
|
||||
|
||||
qint32 modcod_modulation;
|
||||
bool m_modcod_modulation_isSet;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user