1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 16:08:39 -05:00

DATV demod: Do video stream cleamup when re-initializing DATV framework. Reduce videoThreadTimeoutMs to 500 ms

This commit is contained in:
f4exb 2021-04-01 06:14:56 +02:00
parent 688386e5ef
commit 428128118a
3 changed files with 7 additions and 4 deletions

View File

@ -173,7 +173,6 @@ bool DATVDemodSink::playVideo()
if (m_objVideoStream->bytesAvailable() > 0)
{
m_objRenderThread->setStreamAndRenderer(m_objRegisteredVideoRender, m_objVideoStream);
m_objVideoStream->MultiThreaded = true;
m_objVideoStream->ThreadTimeOut = DATVideoRenderThread::videoThreadTimeoutMs;
m_objRenderThread->start();
@ -184,6 +183,10 @@ bool DATVDemodSink::playVideo()
void DATVDemodSink::CleanUpDATVFramework()
{
if (m_objVideoStream) {
m_objVideoStream->cleanUp();
}
if (m_objScheduler != nullptr)
{
m_objScheduler->shutdown();
@ -892,7 +895,7 @@ void DATVDemodSink::InitDATVS2Framework()
m_objCfg.fastlock = m_settings.m_fastLock;
m_objCfg.sampler = m_settings.m_filter;
m_objCfg.rolloff = m_settings.m_rollOff * 1.001f; //0...1 and correct 0.2 bug
m_objCfg.rolloff = m_settings.m_rollOff * 0.999f; //0...1 and correct 0.2 bug
m_objCfg.rrc_rej = (float) m_settings.m_excursion; //dB
m_objCfg.rrc_steps = 0; //auto

View File

@ -238,7 +238,7 @@ class DATVideoRenderThread : public QThread
m_renderingVideo = false;
}
static const int videoThreadTimeoutMs = 2000;
static const int videoThreadTimeoutMs = 500;
private:
DATVideoRender *m_renderer;

View File

@ -43,6 +43,7 @@ public:
int pushData(const char * chrData, int intSize);
bool setMemoryLimit(int intMemoryLimit);
void resetTotalReceived();
void cleanUp();
virtual bool isSequential() const;
virtual qint64 bytesAvailable() const;
@ -74,7 +75,6 @@ private:
qint64 m_intTotalReceived;
qint64 m_intPacketReceived;
void cleanUp();
};
#endif // DATVIDEOSTREAM_H