mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-28 05:02:25 -04:00
SDRdaemon plugin: report LZ4 compression status
This commit is contained in:
parent
16c3e3e72f
commit
23750b10f6
@ -73,6 +73,7 @@ public:
|
||||
bool isSync() const { return m_sync; }
|
||||
bool isSyncLocked() const { return m_syncLock; }
|
||||
uint32_t getFrameSize() const { return m_frameSize; }
|
||||
bool isLz4Compressed() const { return m_lz4; }
|
||||
|
||||
static const int m_udpPayloadSize;
|
||||
static const int m_sampleSize;
|
||||
|
@ -201,6 +201,7 @@ bool SDRdaemonGui::handleMessage(const Message& message)
|
||||
m_startingTimeStamp.tv_usec = ((SDRdaemonInput::MsgReportSDRdaemonStreamTiming&)message).get_tv_usec();
|
||||
m_syncLocked = ((SDRdaemonInput::MsgReportSDRdaemonStreamTiming&)message).getSyncLock();
|
||||
m_frameSize = ((SDRdaemonInput::MsgReportSDRdaemonStreamTiming&)message).getFrameSize();
|
||||
m_lz4 = ((SDRdaemonInput::MsgReportSDRdaemonStreamTiming&)message).getLz4Compression();
|
||||
updateWithStreamTime();
|
||||
return true;
|
||||
}
|
||||
@ -312,6 +313,12 @@ void SDRdaemonGui::updateWithStreamTime()
|
||||
|
||||
QString s = QString::number(m_frameSize / 1024.0, 'f', 0);
|
||||
ui->frameSizeText->setText(tr("%1").arg(s));
|
||||
|
||||
if (m_lz4) {
|
||||
ui->lz4Compressed->setStyleSheet("QToolButton { background-color : green; }");
|
||||
} else {
|
||||
ui->lz4Compressed->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonGui::tick()
|
||||
|
@ -61,6 +61,7 @@ private:
|
||||
struct timeval m_startingTimeStamp;
|
||||
bool m_syncLocked;
|
||||
uint32_t m_frameSize;
|
||||
bool m_lz4;
|
||||
|
||||
int m_samplesCount;
|
||||
std::size_t m_tickCount;
|
||||
|
@ -314,7 +314,7 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="lz4Layout">
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton">
|
||||
<widget class="QToolButton" name="lz4Compressed">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
@ -170,16 +170,19 @@ public:
|
||||
uint32_t get_tv_usec() const { return m_tv_usec; }
|
||||
bool getSyncLock() const { return m_syncLock; }
|
||||
uint32_t getFrameSize() const { return m_frameSize; }
|
||||
bool getLz4Compression() const { return m_lz4; }
|
||||
|
||||
static MsgReportSDRdaemonStreamTiming* create(uint32_t tv_sec,
|
||||
uint32_t tv_usec,
|
||||
bool syncLock,
|
||||
uint32_t frameSize)
|
||||
uint32_t frameSize,
|
||||
bool lz4)
|
||||
{
|
||||
return new MsgReportSDRdaemonStreamTiming(tv_sec,
|
||||
tv_usec,
|
||||
syncLock,
|
||||
frameSize);
|
||||
frameSize,
|
||||
lz4);
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -187,16 +190,19 @@ public:
|
||||
uint32_t m_tv_usec;
|
||||
bool m_syncLock;
|
||||
uint32_t m_frameSize;
|
||||
bool m_lz4;
|
||||
|
||||
MsgReportSDRdaemonStreamTiming(uint32_t tv_sec,
|
||||
uint32_t tv_usec,
|
||||
bool syncLock,
|
||||
uint32_t frameSize) :
|
||||
uint32_t frameSize,
|
||||
bool lz4) :
|
||||
Message(),
|
||||
m_tv_sec(tv_sec),
|
||||
m_tv_usec(tv_usec),
|
||||
m_syncLock(syncLock),
|
||||
m_frameSize(frameSize)
|
||||
m_frameSize(frameSize),
|
||||
m_lz4(lz4)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
@ -210,7 +210,8 @@ void SDRdaemonUDPHandler::tick()
|
||||
m_tv_sec,
|
||||
m_tv_usec,
|
||||
m_sdrDaemonBuffer.isSyncLocked(),
|
||||
m_sdrDaemonBuffer.getFrameSize());
|
||||
m_sdrDaemonBuffer.getFrameSize(),
|
||||
m_sdrDaemonBuffer.isLz4Compressed());
|
||||
m_outputMessageQueueToGUI->push(report);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user