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:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user