mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
DATV demod: FIFO status event: pass data by copy instead of reference
This commit is contained in:
parent
f8a512e91b
commit
507b110299
@ -750,18 +750,18 @@ QString DATVDemodGUI::formatBytes(qint64 intBytes)
|
||||
}
|
||||
|
||||
|
||||
void DATVDemodGUI::on_StreamDataAvailable(int *intBytes, int *intPercent, qint64 *intTotalReceived)
|
||||
void DATVDemodGUI::on_StreamDataAvailable(int intBytes, int intPercent, qint64 intTotalReceived)
|
||||
{
|
||||
ui->lblStatus->setText(QString("Data: %1B").arg(formatBytes(*intTotalReceived)));
|
||||
m_intLastDecodedData = *intTotalReceived;
|
||||
ui->lblStatus->setText(QString("Data: %1B").arg(formatBytes(intTotalReceived)));
|
||||
m_intLastDecodedData = intTotalReceived;
|
||||
|
||||
if((*intPercent)<100) {
|
||||
ui->prgSynchro->setValue(*intPercent);
|
||||
if ((intPercent)<100) {
|
||||
ui->prgSynchro->setValue(intPercent);
|
||||
} else {
|
||||
ui->prgSynchro->setValue(100);
|
||||
}
|
||||
|
||||
m_intReadyDecodedData = *intBytes;
|
||||
m_intReadyDecodedData = intBytes;
|
||||
}
|
||||
|
||||
void DATVDemodGUI::on_deltaFrequency_changed(qint64 value)
|
||||
|
@ -78,7 +78,7 @@ private slots:
|
||||
void on_chkAllowDrift_clicked();
|
||||
void on_fullScreen_clicked();
|
||||
void on_mouseEvent(QMouseEvent* obj);
|
||||
void on_StreamDataAvailable(int *intBytes, int *intPercent, qint64 *intTotalReceived);
|
||||
void on_StreamDataAvailable(int intBytes, int intPercent, qint64 intTotalReceived);
|
||||
void on_StreamMetaDataChanged(DataTSMetaData2 *objMetaData);
|
||||
void on_chkFastlock_clicked();
|
||||
void on_cmbFilter_currentIndexChanged(int index);
|
||||
|
@ -56,7 +56,7 @@ void DATVideostream::cleanUp()
|
||||
void DATVideostream::resetTotalReceived()
|
||||
{
|
||||
m_totalReceived = 0;
|
||||
emit fifoData(&m_bytesWaiting, &m_percentBuffer, &m_totalReceived);
|
||||
emit fifoData(m_bytesWaiting, m_percentBuffer, m_totalReceived);
|
||||
}
|
||||
|
||||
void DATVideostream::setMultiThreaded(bool multiThreaded)
|
||||
@ -100,7 +100,7 @@ int DATVideostream::pushData(const char * chrData, int intSize)
|
||||
m_percentBuffer = m_percentBuffer > 100 ? 100 : m_percentBuffer;
|
||||
|
||||
if (m_packetReceived % 10 == 1) {
|
||||
emit fifoData(&m_bytesWaiting, &m_percentBuffer, &m_totalReceived);
|
||||
emit fifoData(m_bytesWaiting, m_percentBuffer, m_totalReceived);
|
||||
}
|
||||
|
||||
return intSize;
|
||||
@ -209,7 +209,7 @@ qint64 DATVideostream::readData(char *data, qint64 len)
|
||||
m_percentBuffer = m_percentBuffer > 100 ? 100 : m_percentBuffer;
|
||||
|
||||
if (m_packetReceived % 10 == 0) {
|
||||
emit fifoData(&m_bytesWaiting, &m_percentBuffer, &m_totalReceived);
|
||||
emit fifoData(m_bytesWaiting, m_percentBuffer, m_totalReceived);
|
||||
}
|
||||
|
||||
//Next available DATA
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
|
||||
signals:
|
||||
void dataAvailable();
|
||||
void fifoData(int *intDataBytes, int *intPercentBuffer, qint64 *intTotalReceived);
|
||||
void fifoData(int intDataBytes, int intPercentBuffer, qint64 intTotalReceived);
|
||||
|
||||
protected:
|
||||
virtual qint64 readData(char *data, qint64 len);
|
||||
|
@ -28,7 +28,6 @@ DATVUDPStream::DATVUDPStream(int tsBlockSize) :
|
||||
m_tsBlockSize(tsBlockSize),
|
||||
m_tsBlockIndex(0),
|
||||
m_dataBytes(0),
|
||||
m_percentBuffer(0),
|
||||
m_totalBytes(0),
|
||||
m_fifoSignalCount(0)
|
||||
{
|
||||
@ -62,7 +61,7 @@ void DATVUDPStream::pushData(const char *chrData, int nbTSBlocks)
|
||||
|
||||
if (++m_fifoSignalCount == 10)
|
||||
{
|
||||
emit fifoData(&m_dataBytes, &m_percentBuffer, &m_totalBytes);
|
||||
emit fifoData(m_dataBytes, 0, m_totalBytes);
|
||||
m_fifoSignalCount = 0;
|
||||
}
|
||||
|
||||
@ -75,5 +74,5 @@ void DATVUDPStream::pushData(const char *chrData, int nbTSBlocks)
|
||||
void DATVUDPStream::resetTotalReceived()
|
||||
{
|
||||
m_totalBytes = 0;
|
||||
emit fifoData(&m_dataBytes, &m_percentBuffer, &m_totalBytes);
|
||||
emit fifoData(m_dataBytes, 0, m_totalBytes);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
static const int m_tsBlocksPerFrame;
|
||||
|
||||
signals:
|
||||
void fifoData(int *dataBytes, int *percentBuffer, qint64 *totalReceived);
|
||||
void fifoData(int dataBytes, int percentBuffer, qint64 totalReceived);
|
||||
|
||||
private:
|
||||
bool m_active;
|
||||
@ -52,7 +52,6 @@ private:
|
||||
int m_tsBlockIndex;
|
||||
char *m_tsBuffer;
|
||||
int m_dataBytes;
|
||||
int m_percentBuffer;
|
||||
qint64 m_totalBytes;
|
||||
int m_fifoSignalCount;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user