mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-29 19:28:47 -05:00
Tx ph.1: fixed stream time display in FileSink
This commit is contained in:
parent
3b132cf471
commit
c7bec82677
@ -67,6 +67,7 @@ FileSinkGui::FileSinkGui(DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
|||||||
displaySettings();
|
displaySettings();
|
||||||
|
|
||||||
m_deviceSampleSink = new FileSinkOutput(m_deviceAPI, m_deviceAPI->getMainWindow()->getMasterTimer());
|
m_deviceSampleSink = new FileSinkOutput(m_deviceAPI, m_deviceAPI->getMainWindow()->getMasterTimer());
|
||||||
|
connect(m_deviceSampleSink->getOutputMessageQueueToGUI(), SIGNAL(messageEnqueued()), this, SLOT(handleSinkMessages()));
|
||||||
m_deviceAPI->setSink(m_deviceSampleSink);
|
m_deviceAPI->setSink(m_deviceSampleSink);
|
||||||
|
|
||||||
connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||||
@ -169,6 +170,21 @@ void FileSinkGui::handleDSPMessages()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FileSinkGui::handleSinkMessages()
|
||||||
|
{
|
||||||
|
Message* message;
|
||||||
|
|
||||||
|
while ((message = m_deviceSampleSink->getOutputMessageQueueToGUI()->pop()) != 0)
|
||||||
|
{
|
||||||
|
//qDebug("FileSourceGui::handleSourceMessages: message: %s", message->getIdentifier());
|
||||||
|
|
||||||
|
if (handleMessage(*message))
|
||||||
|
{
|
||||||
|
delete message;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FileSinkGui::updateSampleRateAndFrequency()
|
void FileSinkGui::updateSampleRateAndFrequency()
|
||||||
{
|
{
|
||||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||||
@ -295,6 +311,8 @@ void FileSinkGui::updateWithStreamTime()
|
|||||||
t_sec = m_samplesCount / m_settings.m_sampleRate;
|
t_sec = m_samplesCount / m_settings.m_sampleRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qDebug("FileSinkGui::updateWithStreamTime: m_samplesCount: %d", m_samplesCount);
|
||||||
|
|
||||||
QTime t(0, 0, 0, 0);
|
QTime t(0, 0, 0, 0);
|
||||||
t = t.addSecs(t_sec);
|
t = t.addSecs(t_sec);
|
||||||
t = t.addMSecs(t_msec);
|
t = t.addMSecs(t_msec);
|
||||||
@ -304,7 +322,8 @@ void FileSinkGui::updateWithStreamTime()
|
|||||||
|
|
||||||
void FileSinkGui::tick()
|
void FileSinkGui::tick()
|
||||||
{
|
{
|
||||||
if ((++m_tickCount & 0xf) == 0) {
|
if ((++m_tickCount & 0xf) == 0)
|
||||||
|
{
|
||||||
FileSinkOutput::MsgConfigureFileSinkStreamTiming* message = FileSinkOutput::MsgConfigureFileSinkStreamTiming::create();
|
FileSinkOutput::MsgConfigureFileSinkStreamTiming* message = FileSinkOutput::MsgConfigureFileSinkStreamTiming::create();
|
||||||
m_deviceSampleSink->getInputMessageQueue()->push(message);
|
m_deviceSampleSink->getInputMessageQueue()->push(message);
|
||||||
}
|
}
|
||||||
|
@ -77,6 +77,7 @@ private:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleDSPMessages();
|
void handleDSPMessages();
|
||||||
|
void handleSinkMessages();
|
||||||
void on_centerFrequency_changed(quint64 value);
|
void on_centerFrequency_changed(quint64 value);
|
||||||
void on_startStop_toggled(bool checked);
|
void on_startStop_toggled(bool checked);
|
||||||
void on_showFileDialog_clicked(bool checked);
|
void on_showFileDialog_clicked(bool checked);
|
||||||
|
Loading…
Reference in New Issue
Block a user