1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-03 06:24:48 -04:00

DATV Mod: Add UDP buffer utiliziation in GUI on Windows

This commit is contained in:
Jon Beniston
2021-07-28 16:10:04 +01:00
parent 147e3881e6
commit 2f5d3dd2f7
10 changed files with 118 additions and 1 deletions
+14
View File
@@ -98,6 +98,12 @@ DATVModGUI::DATVModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandS
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
#ifndef _WIN32
// Only currently works on Windows, so hide on other OSes
ui->udpBufferUtilization->setVisible(false);
ui->udpBufferUtilizationLine->setVisible(false);
#endif
displaySettings();
applySettings(true);
if (!m_settings.m_tsFileName.isEmpty())
@@ -174,6 +180,13 @@ bool DATVModGUI::handleMessage(const Message& message)
m_tickMsgOutstanding = false;
return true;
}
else if (DATVModReport::MsgReportUDPBufferUtilization::match(message))
{
DATVModReport::MsgReportUDPBufferUtilization& report = (DATVModReport::MsgReportUDPBufferUtilization&)message;
ui->udpBufferUtilization->setText(tr("%1%").arg(report.getUtilization(), 0, 'f', 1));
m_tickMsgOutstanding = false;
return true;
}
else if (DATVMod::MsgConfigureDATVMod::match(message))
{
const DATVMod::MsgConfigureDATVMod& cfg = (DATVMod::MsgConfigureDATVMod&) message;
@@ -602,6 +615,7 @@ void DATVModGUI::tick()
{
m_tickMsgOutstanding = true;
m_datvMod->getInputMessageQueue()->push(DATVMod::MsgGetUDPBitrate::create());
m_datvMod->getInputMessageQueue()->push(DATVMod::MsgGetUDPBufferUtilization::create());
}
}
}