mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-09-15 13:07:55 -04:00
DATV demod: stop player before initializing DATV framework
This commit is contained in:
parent
fcbb383978
commit
4f9fe7b533
@ -22,6 +22,7 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
#include <QMutexLocker>
|
||||||
|
|
||||||
#include "audio/audiooutputdevice.h"
|
#include "audio/audiooutputdevice.h"
|
||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
@ -49,7 +50,8 @@ DATVDemodSink::DATVDemodSink() :
|
|||||||
m_modcodCodeRate(-1),
|
m_modcodCodeRate(-1),
|
||||||
m_enmModulation(DATVDemodSettings::BPSK /*DATV_FM1*/),
|
m_enmModulation(DATVDemodSettings::BPSK /*DATV_FM1*/),
|
||||||
m_channelSampleRate(1024000),
|
m_channelSampleRate(1024000),
|
||||||
m_messageQueueToGUI(nullptr)
|
m_messageQueueToGUI(nullptr),
|
||||||
|
m_mutex(QMutex::Recursive)
|
||||||
{
|
{
|
||||||
//*************** DATV PARAMETERS ***************
|
//*************** DATV PARAMETERS ***************
|
||||||
m_blnInitialized=false;
|
m_blnInitialized=false;
|
||||||
@ -155,6 +157,8 @@ bool DATVDemodSink::videoDecodeOK()
|
|||||||
|
|
||||||
bool DATVDemodSink::playVideo()
|
bool DATVDemodSink::playVideo()
|
||||||
{
|
{
|
||||||
|
QMutexLocker mlock(&m_mutex);
|
||||||
|
|
||||||
if (m_objVideoStream == nullptr) {
|
if (m_objVideoStream == nullptr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1283,6 +1287,9 @@ void DATVDemodSink::feed(const SampleVector::const_iterator& begin, const Sample
|
|||||||
//********** init leandvb framework **********
|
//********** init leandvb framework **********
|
||||||
if (m_blnNeedConfigUpdate)
|
if (m_blnNeedConfigUpdate)
|
||||||
{
|
{
|
||||||
|
QMutexLocker mlock(&m_mutex);
|
||||||
|
stopVideo();
|
||||||
|
|
||||||
qDebug("DATVDemodSink::feed: Settings applied. Standard : %d...", m_settings.m_standard);
|
qDebug("DATVDemodSink::feed: Settings applied. Standard : %d...", m_settings.m_standard);
|
||||||
m_blnNeedConfigUpdate = false;
|
m_blnNeedConfigUpdate = false;
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
#ifndef INCLUDE_DATVDEMODSINK_H
|
#ifndef INCLUDE_DATVDEMODSINK_H
|
||||||
#define INCLUDE_DATVDEMODSINK_H
|
#define INCLUDE_DATVDEMODSINK_H
|
||||||
|
|
||||||
|
#include <QMutex>
|
||||||
|
|
||||||
//LeanSDR
|
//LeanSDR
|
||||||
#include "leansdr/framework.h"
|
#include "leansdr/framework.h"
|
||||||
#include "leansdr/generic.h"
|
#include "leansdr/generic.h"
|
||||||
@ -317,6 +319,7 @@ private:
|
|||||||
MovingAverageUtil<double, double, 32> m_objMagSqAverage;
|
MovingAverageUtil<double, double, 32> m_objMagSqAverage;
|
||||||
|
|
||||||
MessageQueue *m_messageQueueToGUI;
|
MessageQueue *m_messageQueueToGUI;
|
||||||
|
QMutex m_mutex;
|
||||||
|
|
||||||
static const unsigned int m_rfFilterFftLength;
|
static const unsigned int m_rfFilterFftLength;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user