1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-09-30 08:46:46 -04:00

SDRdaemonFEC support. removed output meta

This commit is contained in:
f4exb 2016-07-07 02:25:32 +02:00
parent c7751062c3
commit 57231cdb32
3 changed files with 1 additions and 10 deletions

View File

@ -37,7 +37,6 @@ SDRdaemonFECBuffer::SDRdaemonFECBuffer(uint32_t throttlems) :
m_bufferLenSec(0.0f) m_bufferLenSec(0.0f)
{ {
m_currentMeta.init(); m_currentMeta.init();
m_outputMeta.init();
m_framesNbBytes = nbDecoderSlots * sizeof(BufferFrame); m_framesNbBytes = nbDecoderSlots * sizeof(BufferFrame);
m_wrDeltaEstimate = m_framesNbBytes / 2; m_wrDeltaEstimate = m_framesNbBytes / 2;
m_paramsCM256.BlockBytes = sizeof(ProtectedBlock); // never changes m_paramsCM256.BlockBytes = sizeof(ProtectedBlock); // never changes
@ -95,12 +94,6 @@ void SDRdaemonFECBuffer::initDecodeSlot(int slotIndex)
int pseudoWriteIndex = slotIndex * sizeof(BufferFrame); int pseudoWriteIndex = slotIndex * sizeof(BufferFrame);
m_wrDeltaEstimate = pseudoWriteIndex - m_readIndex; m_wrDeltaEstimate = pseudoWriteIndex - m_readIndex;
if (m_decoderSlots[slotIndex].m_metaRetrieved) { // meta data was retrieved in the current slot
m_outputMeta = m_decoderSlots[slotIndex].m_blockZero.m_metaData;
} else {
m_outputMeta = m_currentMeta; // use stored current meta
}
// collect stats before voiding the slot // collect stats before voiding the slot
m_curNbBlocks = m_decoderSlots[slotIndex].m_blockCount; m_curNbBlocks = m_decoderSlots[slotIndex].m_blockCount;
m_curNbRecovery = m_decoderSlots[slotIndex].m_recoveryCount; m_curNbRecovery = m_decoderSlots[slotIndex].m_recoveryCount;

View File

@ -96,7 +96,6 @@ public:
// meta data // meta data
const MetaDataFEC& getCurrentMeta() const { return m_currentMeta; } const MetaDataFEC& getCurrentMeta() const { return m_currentMeta; }
const MetaDataFEC& getOutputMeta() const { return m_outputMeta; }
// stats // stats
int getCurNbBlocks() const { return m_curNbBlocks; } int getCurNbBlocks() const { return m_curNbBlocks; }
@ -156,7 +155,6 @@ private:
}; };
MetaDataFEC m_currentMeta; //!< Stored current meta data MetaDataFEC m_currentMeta; //!< Stored current meta data
MetaDataFEC m_outputMeta; //!< Meta data corresponding to currently served frame
cm256_encoder_params m_paramsCM256; //!< CM256 decoder parameters block cm256_encoder_params m_paramsCM256; //!< CM256 decoder parameters block
DecoderSlot m_decoderSlots[nbDecoderSlots]; //!< CM256 decoding control/buffer slots DecoderSlot m_decoderSlots[nbDecoderSlots]; //!< CM256 decoding control/buffer slots
BufferFrame m_frames[nbDecoderSlots]; //!< Samples buffer BufferFrame m_frames[nbDecoderSlots]; //!< Samples buffer

View File

@ -143,7 +143,7 @@ void SDRdaemonFECUDPHandler::dataReadyRead()
void SDRdaemonFECUDPHandler::processData() void SDRdaemonFECUDPHandler::processData()
{ {
m_sdrDaemonBuffer.writeData(m_udpBuf, m_udpReadBytes); m_sdrDaemonBuffer.writeData(m_udpBuf, m_udpReadBytes);
const SDRdaemonFECBuffer::MetaDataFEC& metaData = m_sdrDaemonBuffer.getOutputMeta(); const SDRdaemonFECBuffer::MetaDataFEC& metaData = m_sdrDaemonBuffer.getCurrentMeta();
bool change = false; bool change = false;
m_tv_sec = metaData.m_tv_sec; m_tv_sec = metaData.m_tv_sec;