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