1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 01:18:38 -05:00

Replace deprecated QMutex(Recursive) with QRecursiveMutex

This commit is contained in:
Jiří Pinkava 2022-09-15 21:59:42 +02:00
parent b20b3ea343
commit 0df2d75e6d
234 changed files with 310 additions and 432 deletions

View File

@ -7,6 +7,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <QMutex> #include <QMutex>
#include <QRecursiveMutex>
#include <QDateTime> #include <QDateTime>
#include <QThread> #include <QThread>
#include <QObject> #include <QObject>
@ -19,7 +20,7 @@ Logger* Logger::defaultLogger=0;
QThreadStorage<QHash<QString,QString>*> Logger::logVars; QThreadStorage<QHash<QString,QString>*> Logger::logVars;
QMutex Logger::mutex; QRecursiveMutex Logger::mutex;
Logger::Logger(QObject* parent) Logger::Logger(QObject* parent)
@ -43,8 +44,8 @@ Logger::Logger(const QString msgFormat, const QString timestampFormat, const QtM
void Logger::msgHandler(const QtMsgType type, const QString &message, const QString &file, const QString &function, const int line) void Logger::msgHandler(const QtMsgType type, const QString &message, const QString &file, const QString &function, const int line)
{ {
static QMutex recursiveMutex(QMutex::Recursive); static QRecursiveMutex recursiveMutex;
static QMutex nonRecursiveMutex(QMutex::NonRecursive); static QMutex nonRecursiveMutex;
// Prevent multiple threads from calling this method simultaneoulsy. // Prevent multiple threads from calling this method simultaneoulsy.
// But allow recursive calls, which is required to prevent a deadlock // But allow recursive calls, which is required to prevent a deadlock

View File

@ -10,7 +10,7 @@
#include <QThreadStorage> #include <QThreadStorage>
#include <QHash> #include <QHash>
#include <QStringList> #include <QStringList>
#include <QMutex> #include <QRecursiveMutex>
#include <QObject> #include <QObject>
#include "logglobal.h" #include "logglobal.h"
#include "logmessage.h" #include "logmessage.h"
@ -139,7 +139,7 @@ protected:
int bufferSize; int bufferSize;
/** Used to synchronize access of concurrent threads */ /** Used to synchronize access of concurrent threads */
static QMutex mutex; static QRecursiveMutex mutex;
/** /**
Decorate and write a log message to stderr. Override this method Decorate and write a log message to stderr. Override this method

View File

@ -27,8 +27,7 @@
MESSAGE_CLASS_DEFINITION(BeamSteeringCWModBaseband::MsgConfigureBeamSteeringCWModBaseband, Message) MESSAGE_CLASS_DEFINITION(BeamSteeringCWModBaseband::MsgConfigureBeamSteeringCWModBaseband, Message)
MESSAGE_CLASS_DEFINITION(BeamSteeringCWModBaseband::MsgSignalNotification, Message) MESSAGE_CLASS_DEFINITION(BeamSteeringCWModBaseband::MsgSignalNotification, Message)
BeamSteeringCWModBaseband::BeamSteeringCWModBaseband() : BeamSteeringCWModBaseband::BeamSteeringCWModBaseband()
m_mutex(QMutex::Recursive)
{ {
m_sampleMOFifo.init(2, SampleMOFifo::getSizePolicy(48000)); m_sampleMOFifo.init(2, SampleMOFifo::getSizePolicy(48000));
m_vbegin.resize(2); m_vbegin.resize(2);
@ -244,4 +243,4 @@ void BeamSteeringCWModBaseband::applySettings(const BeamSteeringCWModSettings& s
} }
m_settings = settings; m_settings = settings;
} }

View File

@ -19,7 +19,7 @@
#define INCLUDE_BEAMSTEERINGCWMODBASEBAND_H #define INCLUDE_BEAMSTEERINGCWMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplemofifo.h" #include "dsp/samplemofifo.h"
#include "util/message.h" #include "util/message.h"
@ -93,7 +93,7 @@ private:
UpChannelizer *m_channelizers[2]; UpChannelizer *m_channelizers[2];
BeamSteeringCWModStreamSource m_streamSources[2]; BeamSteeringCWModStreamSource m_streamSources[2];
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
QMutex m_mutex; QRecursiveMutex m_mutex;
unsigned int m_lastStream; unsigned int m_lastStream;
private slots: private slots:

View File

@ -42,8 +42,7 @@ DOA2Baseband::DOA2Baseband(int fftSize) :
m_magThreshold(0.0f), m_magThreshold(0.0f),
m_fftAvg(1), m_fftAvg(1),
m_fftAvgCount(0), m_fftAvgCount(0),
m_scopeSink(nullptr), m_scopeSink(nullptr)
m_mutex(QMutex::Recursive)
{ {
m_sampleMIFifo.init(2, 96000 * 8); m_sampleMIFifo.init(2, 96000 * 8);
m_vbegin.resize(2); m_vbegin.resize(2);

View File

@ -19,7 +19,7 @@
#define INCLUDE_DOA2BASEBAND_H #define INCLUDE_DOA2BASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplemififo.h" #include "dsp/samplemififo.h"
#include "util/messagequeue.h" #include "util/messagequeue.h"
@ -137,7 +137,7 @@ private:
DownChannelizer *m_channelizers[2]; DownChannelizer *m_channelizers[2];
ScopeVis *m_scopeSink; ScopeVis *m_scopeSink;
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
QMutex m_mutex; QRecursiveMutex m_mutex;
unsigned int m_lastStream; unsigned int m_lastStream;
private slots: private slots:

View File

@ -33,8 +33,7 @@ MESSAGE_CLASS_DEFINITION(InterferometerBaseband::MsgConfigureCorrelation, Messag
InterferometerBaseband::InterferometerBaseband(int fftSize) : InterferometerBaseband::InterferometerBaseband(int fftSize) :
m_correlator(fftSize), m_correlator(fftSize),
m_spectrumSink(nullptr), m_spectrumSink(nullptr),
m_scopeSink(nullptr), m_scopeSink(nullptr)
m_mutex(QMutex::Recursive)
{ {
m_sampleMIFifo.init(2, 96000 * 8); m_sampleMIFifo.init(2, 96000 * 8);
m_vbegin.resize(2); m_vbegin.resize(2);

View File

@ -19,7 +19,7 @@
#define INCLUDE_INTERFEROMETERBASEBAND_H #define INCLUDE_INTERFEROMETERBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplemififo.h" #include "dsp/samplemififo.h"
#include "util/messagequeue.h" #include "util/messagequeue.h"
@ -126,7 +126,7 @@ private:
BasebandSampleSink *m_spectrumSink; BasebandSampleSink *m_spectrumSink;
ScopeVis *m_scopeSink; ScopeVis *m_scopeSink;
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
QMutex m_mutex; QRecursiveMutex m_mutex;
unsigned int m_lastStream; unsigned int m_lastStream;
private slots: private slots:

View File

@ -26,8 +26,7 @@
MESSAGE_CLASS_DEFINITION(ChannelAnalyzerBaseband::MsgConfigureChannelAnalyzerBaseband, Message) MESSAGE_CLASS_DEFINITION(ChannelAnalyzerBaseband::MsgConfigureChannelAnalyzerBaseband, Message)
ChannelAnalyzerBaseband::ChannelAnalyzerBaseband() : ChannelAnalyzerBaseband::ChannelAnalyzerBaseband() :
m_running(false), m_running(false)
m_mutex(QMutex::Recursive)
{ {
qDebug("ChannelAnalyzerBaseband::ChannelAnalyzerBaseband"); qDebug("ChannelAnalyzerBaseband::ChannelAnalyzerBaseband");
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000));

View File

@ -19,7 +19,7 @@
#define INCLUDE_CHANNELANALYZERBASEBAND_H #define INCLUDE_CHANNELANALYZERBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -81,7 +81,7 @@ private:
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
ChannelAnalyzerSettings m_settings; ChannelAnalyzerSettings m_settings;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const ChannelAnalyzerSettings& settings, bool force = false); void applySettings(const ChannelAnalyzerSettings& settings, bool force = false);

View File

@ -27,8 +27,7 @@
MESSAGE_CLASS_DEFINITION(ADSBDemodBaseband::MsgConfigureADSBDemodBaseband, Message) MESSAGE_CLASS_DEFINITION(ADSBDemodBaseband::MsgConfigureADSBDemodBaseband, Message)
ADSBDemodBaseband::ADSBDemodBaseband() : ADSBDemodBaseband::ADSBDemodBaseband()
m_mutex(QMutex::Recursive)
{ {
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(8000000)); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(8000000));
m_channelizer = new DownChannelizer(&m_sink); m_channelizer = new DownChannelizer(&m_sink);

View File

@ -20,7 +20,7 @@
#define INCLUDE_ADSBDEMODBASEBAND_H #define INCLUDE_ADSBDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -77,7 +77,7 @@ private:
ADSBDemodSink m_sink; ADSBDemodSink m_sink;
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
ADSBDemodSettings m_settings; ADSBDemodSettings m_settings;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const ADSBDemodSettings& settings, bool force = false); void applySettings(const ADSBDemodSettings& settings, bool force = false);

View File

@ -80,8 +80,7 @@ void ADSBBeastServer::discardClient()
} }
ADSBDemodWorker::ADSBDemodWorker() : ADSBDemodWorker::ADSBDemodWorker() :
m_running(false), m_running(false)
m_mutex(QMutex::Recursive)
{ {
connect(&m_heartbeatTimer, SIGNAL(timeout()), this, SLOT(heartbeat())); connect(&m_heartbeatTimer, SIGNAL(timeout()), this, SLOT(heartbeat()));
connect(&m_socket, SIGNAL(readyRead()),this, SLOT(recv())); connect(&m_socket, SIGNAL(readyRead()),this, SLOT(recv()));

View File

@ -92,7 +92,7 @@ private:
MessageQueue m_inputMessageQueue; MessageQueue m_inputMessageQueue;
ADSBDemodSettings m_settings; ADSBDemodSettings m_settings;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
QTimer m_heartbeatTimer; QTimer m_heartbeatTimer;
QTcpSocket m_socket; QTcpSocket m_socket;
QFile m_logFile; QFile m_logFile;

View File

@ -28,8 +28,7 @@ MESSAGE_CLASS_DEFINITION(AISDemodBaseband::MsgConfigureAISDemodBaseband, Message
AISDemodBaseband::AISDemodBaseband(AISDemod *aisDemod) : AISDemodBaseband::AISDemodBaseband(AISDemod *aisDemod) :
m_sink(aisDemod), m_sink(aisDemod),
m_running(false), m_running(false)
m_mutex(QMutex::Recursive)
{ {
qDebug("AISDemodBaseband::AISDemodBaseband"); qDebug("AISDemodBaseband::AISDemodBaseband");

View File

@ -20,7 +20,7 @@
#define INCLUDE_AISDEMODBASEBAND_H #define INCLUDE_AISDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "dsp/scopevis.h" #include "dsp/scopevis.h"
@ -87,7 +87,7 @@ private:
AISDemodSettings m_settings; AISDemodSettings m_settings;
ScopeVis m_scopeSink; ScopeVis m_scopeSink;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void calculateOffset(AISDemodSink *sink); void calculateOffset(AISDemodSink *sink);

View File

@ -26,8 +26,7 @@
MESSAGE_CLASS_DEFINITION(AMDemodBaseband::MsgConfigureAMDemodBaseband, Message) MESSAGE_CLASS_DEFINITION(AMDemodBaseband::MsgConfigureAMDemodBaseband, Message)
AMDemodBaseband::AMDemodBaseband() : AMDemodBaseband::AMDemodBaseband() :
m_running(false), m_running(false)
m_mutex(QMutex::Recursive)
{ {
qDebug("AMDemodBaseband::AMDemodBaseband"); qDebug("AMDemodBaseband::AMDemodBaseband");

View File

@ -19,7 +19,7 @@
#define INCLUDE_AMDEMODBASEBAND_H #define INCLUDE_AMDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -85,7 +85,7 @@ private:
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
AMDemodSettings m_settings; AMDemodSettings m_settings;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const AMDemodSettings& settings, bool force = false); void applySettings(const AMDemodSettings& settings, bool force = false);

View File

@ -29,8 +29,7 @@ MESSAGE_CLASS_DEFINITION(APTDemodBaseband::MsgConfigureAPTDemodBaseband, Message
APTDemodBaseband::APTDemodBaseband(APTDemod *packetDemod) : APTDemodBaseband::APTDemodBaseband(APTDemod *packetDemod) :
m_sink(packetDemod), m_sink(packetDemod),
m_running(false), m_running(false)
m_mutex(QMutex::Recursive)
{ {
qDebug("APTDemodBaseband::APTDemodBaseband"); qDebug("APTDemodBaseband::APTDemodBaseband");

View File

@ -20,7 +20,7 @@
#define INCLUDE_APTDEMODBASEBAND_H #define INCLUDE_APTDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -81,7 +81,7 @@ private:
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
APTDemodSettings m_settings; APTDemodSettings m_settings;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void calculateOffset(APTDemodSink *sink); void calculateOffset(APTDemodSink *sink);

View File

@ -38,8 +38,7 @@ APTDemodImageWorker::APTDemodImageWorker(APTDemod *aptDemod) :
m_messageQueueToGUI(nullptr), m_messageQueueToGUI(nullptr),
m_aptDemod(aptDemod), m_aptDemod(aptDemod),
m_sgp4(nullptr), m_sgp4(nullptr),
m_running(false), m_running(false)
m_mutex(QMutex::Recursive)
{ {
for (int y = 0; y < APT_MAX_HEIGHT; y++) for (int y = 0; y < APT_MAX_HEIGHT; y++)
{ {

View File

@ -20,7 +20,7 @@
#define INCLUDE_APTDEMODIMAGEWORKER_H #define INCLUDE_APTDEMODIMAGEWORKER_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include <QImage> #include <QImage>
#include <apt.h> #include <apt.h>
@ -137,7 +137,7 @@ private:
QList<QImage> m_palettes; QList<QImage> m_palettes;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const APTDemodSettings& settings, bool force = false); void applySettings(const APTDemodSettings& settings, bool force = false);

View File

@ -26,8 +26,7 @@
MESSAGE_CLASS_DEFINITION(ATVDemodBaseband::MsgConfigureATVDemodBaseband, Message) MESSAGE_CLASS_DEFINITION(ATVDemodBaseband::MsgConfigureATVDemodBaseband, Message)
ATVDemodBaseband::ATVDemodBaseband() : ATVDemodBaseband::ATVDemodBaseband() :
m_running(false), m_running(false)
m_mutex(QMutex::Recursive)
{ {
qDebug("ATVDemodBaseband::ATVDemodBaseband"); qDebug("ATVDemodBaseband::ATVDemodBaseband");
m_sink.setScopeSink(&m_scopeSink); m_sink.setScopeSink(&m_scopeSink);

View File

@ -19,7 +19,7 @@
#define INCLUDE_ATVDEMODBASEBAND_H #define INCLUDE_ATVDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "dsp/scopevis.h" #include "dsp/scopevis.h"
@ -82,7 +82,7 @@ private:
ATVDemodSettings m_settings; ATVDemodSettings m_settings;
ScopeVis m_scopeSink; ScopeVis m_scopeSink;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const ATVDemodSettings& settings, bool force = false); void applySettings(const ATVDemodSettings& settings, bool force = false);

View File

@ -28,7 +28,6 @@
MESSAGE_CLASS_DEFINITION(BFMDemodBaseband::MsgConfigureBFMDemodBaseband, Message) MESSAGE_CLASS_DEFINITION(BFMDemodBaseband::MsgConfigureBFMDemodBaseband, Message)
BFMDemodBaseband::BFMDemodBaseband() : BFMDemodBaseband::BFMDemodBaseband() :
m_mutex(QMutex::Recursive),
m_messageQueueToGUI(nullptr), m_messageQueueToGUI(nullptr),
m_spectrumVis(nullptr) m_spectrumVis(nullptr)
{ {

View File

@ -19,7 +19,7 @@
#define INCLUDE_BFMDEMODBASEBAND_H #define INCLUDE_BFMDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -90,7 +90,7 @@ private:
BFMDemodSink m_sink; BFMDemodSink m_sink;
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
BFMDemodSettings m_settings; BFMDemodSettings m_settings;
QMutex m_mutex; QRecursiveMutex m_mutex;
MessageQueue *m_messageQueueToGUI; MessageQueue *m_messageQueueToGUI;
SpectrumVis *m_spectrumVis; SpectrumVis *m_spectrumVis;

View File

@ -25,8 +25,7 @@
MESSAGE_CLASS_DEFINITION(ChirpChatDemodBaseband::MsgConfigureChirpChatDemodBaseband, Message) MESSAGE_CLASS_DEFINITION(ChirpChatDemodBaseband::MsgConfigureChirpChatDemodBaseband, Message)
ChirpChatDemodBaseband::ChirpChatDemodBaseband() : ChirpChatDemodBaseband::ChirpChatDemodBaseband()
m_mutex(QMutex::Recursive)
{ {
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000));
m_channelizer = new DownChannelizer(&m_sink); m_channelizer = new DownChannelizer(&m_sink);

View File

@ -19,7 +19,7 @@
#define INCLUDE_CHIRPCHATDEMODBASEBAND_H #define INCLUDE_CHIRPCHATDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -76,7 +76,7 @@ private:
ChirpChatDemodSink m_sink; ChirpChatDemodSink m_sink;
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
ChirpChatDemodSettings m_settings; ChirpChatDemodSettings m_settings;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const ChirpChatDemodSettings& settings, bool force = false); void applySettings(const ChirpChatDemodSettings& settings, bool force = false);

View File

@ -29,8 +29,7 @@ MESSAGE_CLASS_DEFINITION(DABDemodBaseband::MsgConfigureDABDemodBaseband, Message
DABDemodBaseband::DABDemodBaseband(DABDemod *packetDemod) : DABDemodBaseband::DABDemodBaseband(DABDemod *packetDemod) :
m_sink(packetDemod), m_sink(packetDemod),
m_running(false), m_running(false)
m_mutex(QMutex::Recursive)
{ {
qDebug("DABDemodBaseband::DABDemodBaseband"); qDebug("DABDemodBaseband::DABDemodBaseband");

View File

@ -20,7 +20,7 @@
#define INCLUDE_DABDEMODBASEBAND_H #define INCLUDE_DABDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -85,7 +85,7 @@ private:
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
DABDemodSettings m_settings; DABDemodSettings m_settings;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const DABDemodSettings& settings, bool force = false); void applySettings(const DABDemodSettings& settings, bool force = false);

View File

@ -26,8 +26,7 @@
MESSAGE_CLASS_DEFINITION(DATVDemodBaseband::MsgConfigureDATVDemodBaseband, Message) MESSAGE_CLASS_DEFINITION(DATVDemodBaseband::MsgConfigureDATVDemodBaseband, Message)
DATVDemodBaseband::DATVDemodBaseband() : DATVDemodBaseband::DATVDemodBaseband() :
m_running(false), m_running(false)
m_mutex(QMutex::Recursive)
{ {
qDebug("DATVDemodBaseband::DATVDemodBaseband"); qDebug("DATVDemodBaseband::DATVDemodBaseband");
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000));

View File

@ -19,7 +19,7 @@
#define INCLUDE_DATVDEMODBASEBAND_H #define INCLUDE_DATVDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -101,7 +101,7 @@ private:
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
DATVDemodSettings m_settings; DATVDemodSettings m_settings;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const DATVDemodSettings& settings, bool force = false); void applySettings(const DATVDemodSettings& settings, bool force = false);

View File

@ -46,8 +46,7 @@ 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;

View File

@ -18,7 +18,7 @@
#ifndef INCLUDE_DATVDEMODSINK_H #ifndef INCLUDE_DATVDEMODSINK_H
#define INCLUDE_DATVDEMODSINK_H #define INCLUDE_DATVDEMODSINK_H
#include <QMutex> #include <QRecursiveMutex>
//LeanSDR //LeanSDR
#include "leansdr/framework.h" #include "leansdr/framework.h"
@ -345,7 +345,7 @@ private:
MovingAverageUtil<double, double, 32> m_objMagSqAverage; MovingAverageUtil<double, double, 32> m_objMagSqAverage;
MessageQueue *m_messageQueueToGUI; MessageQueue *m_messageQueueToGUI;
QMutex m_mutex; QRecursiveMutex m_mutex;
static const unsigned int m_rfFilterFftLength; static const unsigned int m_rfFilterFftLength;
}; };

View File

@ -19,8 +19,7 @@
#include "datvideostream.h" #include "datvideostream.h"
#include <stdio.h> #include <stdio.h>
DATVideostream::DATVideostream(): DATVideostream::DATVideostream()
m_mutex(QMutex::NonRecursive)
{ {
cleanUp(); cleanUp();
m_totalReceived = 0; m_totalReceived = 0;

View File

@ -58,7 +58,6 @@ const int DSDDemod::m_udpBlockSize = 512;
DSDDemod::DSDDemod(DeviceAPI *deviceAPI) : DSDDemod::DSDDemod(DeviceAPI *deviceAPI) :
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink), ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink),
m_deviceAPI(deviceAPI), m_deviceAPI(deviceAPI),
m_mutex(QMutex::Recursive),
m_running(false), m_running(false),
m_basebandSampleRate(0) m_basebandSampleRate(0)
{ {

View File

@ -22,7 +22,7 @@
#include <vector> #include <vector>
#include <QNetworkRequest> #include <QNetworkRequest>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/basebandsamplesink.h" #include "dsp/basebandsamplesink.h"
#include "channel/channelapi.h" #include "channel/channelapi.h"
@ -171,7 +171,7 @@ private:
DeviceAPI *m_deviceAPI; DeviceAPI *m_deviceAPI;
QThread *m_thread; QThread *m_thread;
DSDDemodBaseband *m_basebandSink; DSDDemodBaseband *m_basebandSink;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool m_running; bool m_running;
DSDDemodSettings m_settings; DSDDemodSettings m_settings;
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink int m_basebandSampleRate; //!< stored from device message used when starting baseband sink

View File

@ -25,8 +25,7 @@
MESSAGE_CLASS_DEFINITION(DSDDemodBaseband::MsgConfigureDSDDemodBaseband, Message) MESSAGE_CLASS_DEFINITION(DSDDemodBaseband::MsgConfigureDSDDemodBaseband, Message)
DSDDemodBaseband::DSDDemodBaseband() : DSDDemodBaseband::DSDDemodBaseband() :
m_channelizer(&m_sink), m_channelizer(&m_sink)
m_mutex(QMutex::Recursive)
{ {
qDebug("DSDDemodBaseband::DSDDemodBaseband"); qDebug("DSDDemodBaseband::DSDDemodBaseband");
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000));

View File

@ -19,7 +19,7 @@
#define INCLUDE_DSDDEMODBASEBAND_H #define INCLUDE_DSDDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "dsp/downchannelizer.h" #include "dsp/downchannelizer.h"
@ -85,7 +85,7 @@ private:
DSDDemodSink m_sink; DSDDemodSink m_sink;
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
DSDDemodSettings m_settings; DSDDemodSettings m_settings;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const DSDDemodSettings& settings, bool force = false); void applySettings(const DSDDemodSettings& settings, bool force = false);

View File

@ -27,7 +27,6 @@ MESSAGE_CLASS_DEFINITION(FreeDVDemodBaseband::MsgConfigureFreeDVDemodBaseband, M
MESSAGE_CLASS_DEFINITION(FreeDVDemodBaseband::MsgResyncFreeDVDemod, Message) MESSAGE_CLASS_DEFINITION(FreeDVDemodBaseband::MsgResyncFreeDVDemod, Message)
FreeDVDemodBaseband::FreeDVDemodBaseband() : FreeDVDemodBaseband::FreeDVDemodBaseband() :
m_mutex(QMutex::Recursive),
m_messageQueueToGUI(nullptr) m_messageQueueToGUI(nullptr)
{ {
qDebug("FreeDVDemodBaseband::FreeDVDemodBaseband"); qDebug("FreeDVDemodBaseband::FreeDVDemodBaseband");

View File

@ -19,7 +19,7 @@
#define INCLUDE_FREEDVDEMODBASEBAND_H #define INCLUDE_FREEDVDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -107,7 +107,7 @@ private:
FreeDVDemodSink m_sink; FreeDVDemodSink m_sink;
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
FreeDVDemodSettings m_settings; FreeDVDemodSettings m_settings;
QMutex m_mutex; QRecursiveMutex m_mutex;
MessageQueue *m_messageQueueToGUI; MessageQueue *m_messageQueueToGUI;
MessageQueue *getMessageQueueToGUI() { return m_messageQueueToGUI; } MessageQueue *getMessageQueueToGUI() { return m_messageQueueToGUI; }

View File

@ -150,8 +150,7 @@ FreeDVDemodSink::FreeDVDemodSink() :
m_iModem(0), m_iModem(0),
m_speechOut(nullptr), m_speechOut(nullptr),
m_modIn(nullptr), m_modIn(nullptr),
m_levelInNbSamples(480), // 10ms @ 48 kS/s m_levelInNbSamples(480) // 10ms @ 48 kS/s
m_mutex(QMutex::Recursive)
{ {
m_audioBuffer.resize(1<<14); m_audioBuffer.resize(1<<14);
m_audioBufferFill = 0; m_audioBufferFill = 0;

View File

@ -21,7 +21,7 @@
#include <vector> #include <vector>
#include <QTimer> #include <QTimer>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/channelsamplesink.h" #include "dsp/channelsamplesink.h"
#include "dsp/ncof.h" #include "dsp/ncof.h"
@ -200,7 +200,7 @@ private:
int m_levelInNbSamples; int m_levelInNbSamples;
Real m_rmsLevel; Real m_rmsLevel;
Real m_peakLevel; Real m_peakLevel;
QMutex m_mutex; QRecursiveMutex m_mutex;
static const unsigned int m_ssbFftLen; static const unsigned int m_ssbFftLen;
static const float m_agcTarget; static const float m_agcTarget;

View File

@ -25,8 +25,7 @@
MESSAGE_CLASS_DEFINITION(M17DemodBaseband::MsgConfigureM17DemodBaseband, Message) MESSAGE_CLASS_DEFINITION(M17DemodBaseband::MsgConfigureM17DemodBaseband, Message)
M17DemodBaseband::M17DemodBaseband() : M17DemodBaseband::M17DemodBaseband()
m_mutex(QMutex::Recursive)
{ {
qDebug("M17DemodBaseband::M17DemodBaseband"); qDebug("M17DemodBaseband::M17DemodBaseband");
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000));

View File

@ -19,7 +19,7 @@
#define INCLUDE_M17DEMODBASEBAND_H #define INCLUDE_M17DEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -129,7 +129,7 @@ private:
M17DemodSink m_sink; M17DemodSink m_sink;
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
M17DemodSettings m_settings; M17DemodSettings m_settings;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const M17DemodSettings& settings, const QList<QString>& settingsKeys, bool force = false); void applySettings(const M17DemodSettings& settings, const QList<QString>& settingsKeys, bool force = false);

View File

@ -28,8 +28,7 @@ DCSDetector::DCSDetector() :
m_low(0.0f), m_low(0.0f),
m_mid(0.0f), m_mid(0.0f),
m_prevSample(0.0f), m_prevSample(0.0f),
m_dcsWord(0), m_dcsWord(0)
m_mutex(QMutex::Recursive)
{ {
setBitrate(134.3); setBitrate(134.3);
setEqWindow(23); setEqWindow(23);

View File

@ -18,7 +18,7 @@
#ifndef INCLUDE_DSP_DCSDETECTOR_H_ #ifndef INCLUDE_DSP_DCSDETECTOR_H_
#define INCLUDE_DSP_DCSDETECTOR_H_ #define INCLUDE_DSP_DCSDETECTOR_H_
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/dsptypes.h" #include "dsp/dsptypes.h"
#include "util/golay2312.h" #include "util/golay2312.h"
@ -49,7 +49,7 @@ private:
float m_prevSample; float m_prevSample;
unsigned int m_dcsWord; //!< 23 bit DCS code word unsigned int m_dcsWord; //!< 23 bit DCS code word
Golay2312 m_golay2312; Golay2312 m_golay2312;
QMutex m_mutex; QRecursiveMutex m_mutex;
}; };
#endif // INCLUDE_DSP_DCSDETECTOR_H_ #endif // INCLUDE_DSP_DCSDETECTOR_H_

View File

@ -25,8 +25,7 @@
MESSAGE_CLASS_DEFINITION(NFMDemodBaseband::MsgConfigureNFMDemodBaseband, Message) MESSAGE_CLASS_DEFINITION(NFMDemodBaseband::MsgConfigureNFMDemodBaseband, Message)
NFMDemodBaseband::NFMDemodBaseband() : NFMDemodBaseband::NFMDemodBaseband() :
m_channelizer(&m_sink), m_channelizer(&m_sink)
m_mutex(QMutex::Recursive)
{ {
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000));

View File

@ -19,7 +19,7 @@
#define INCLUDE_NFMDEMODBASEBAND_H #define INCLUDE_NFMDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "dsp/downchannelizer.h" #include "dsp/downchannelizer.h"
@ -80,7 +80,7 @@ private:
NFMDemodSink m_sink; NFMDemodSink m_sink;
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
NFMDemodSettings m_settings; NFMDemodSettings m_settings;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const NFMDemodSettings& settings, bool force = false); void applySettings(const NFMDemodSettings& settings, bool force = false);

View File

@ -28,8 +28,7 @@ MESSAGE_CLASS_DEFINITION(PacketDemodBaseband::MsgConfigurePacketDemodBaseband, M
PacketDemodBaseband::PacketDemodBaseband(PacketDemod *packetDemod) : PacketDemodBaseband::PacketDemodBaseband(PacketDemod *packetDemod) :
m_sink(packetDemod), m_sink(packetDemod),
m_running(false), m_running(false)
m_mutex(QMutex::Recursive)
{ {
qDebug("PacketDemodBaseband::PacketDemodBaseband"); qDebug("PacketDemodBaseband::PacketDemodBaseband");

View File

@ -20,7 +20,7 @@
#define INCLUDE_PACKETDEMODBASEBAND_H #define INCLUDE_PACKETDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -84,7 +84,7 @@ private:
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
PacketDemodSettings m_settings; PacketDemodSettings m_settings;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void calculateOffset(PacketDemodSink *sink); void calculateOffset(PacketDemodSink *sink);

View File

@ -28,8 +28,7 @@ MESSAGE_CLASS_DEFINITION(PagerDemodBaseband::MsgConfigurePagerDemodBaseband, Mes
PagerDemodBaseband::PagerDemodBaseband(PagerDemod *pagerDemod) : PagerDemodBaseband::PagerDemodBaseband(PagerDemod *pagerDemod) :
m_sink(pagerDemod), m_sink(pagerDemod),
m_running(false), m_running(false)
m_mutex(QMutex::Recursive)
{ {
qDebug("PagerDemodBaseband::PagerDemodBaseband"); qDebug("PagerDemodBaseband::PagerDemodBaseband");

View File

@ -20,7 +20,7 @@
#define INCLUDE_PAGERDEMODBASEBAND_H #define INCLUDE_PAGERDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "dsp/scopevis.h" #include "dsp/scopevis.h"
@ -88,7 +88,7 @@ private:
PagerDemodSettings m_settings; PagerDemodSettings m_settings;
ScopeVis m_scopeSink; ScopeVis m_scopeSink;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void calculateOffset(PagerDemodSink *sink); void calculateOffset(PagerDemodSink *sink);

View File

@ -28,8 +28,7 @@ MESSAGE_CLASS_DEFINITION(RadiosondeDemodBaseband::MsgConfigureRadiosondeDemodBas
RadiosondeDemodBaseband::RadiosondeDemodBaseband(RadiosondeDemod *radiosondeDemod) : RadiosondeDemodBaseband::RadiosondeDemodBaseband(RadiosondeDemod *radiosondeDemod) :
m_sink(radiosondeDemod), m_sink(radiosondeDemod),
m_running(false), m_running(false)
m_mutex(QMutex::Recursive)
{ {
qDebug("RadiosondeDemodBaseband::RadiosondeDemodBaseband"); qDebug("RadiosondeDemodBaseband::RadiosondeDemodBaseband");

View File

@ -20,7 +20,7 @@
#define INCLUDE_RADIOSONDEDEMODBASEBAND_H #define INCLUDE_RADIOSONDEDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "dsp/scopevis.h" #include "dsp/scopevis.h"
@ -87,7 +87,7 @@ private:
RadiosondeDemodSettings m_settings; RadiosondeDemodSettings m_settings;
ScopeVis m_scopeSink; ScopeVis m_scopeSink;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void calculateOffset(RadiosondeDemodSink *sink); void calculateOffset(RadiosondeDemodSink *sink);

View File

@ -52,7 +52,6 @@ const char* const SSBDemod::m_channelId = "SSBDemod";
SSBDemod::SSBDemod(DeviceAPI *deviceAPI) : SSBDemod::SSBDemod(DeviceAPI *deviceAPI) :
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink), ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink),
m_deviceAPI(deviceAPI), m_deviceAPI(deviceAPI),
m_mutex(QMutex::Recursive),
m_running(false), m_running(false),
m_spectrumVis(SDR_RX_SCALEF), m_spectrumVis(SDR_RX_SCALEF),
m_basebandSampleRate(0) m_basebandSampleRate(0)

View File

@ -21,7 +21,7 @@
#include <vector> #include <vector>
#include <QMutex> #include <QRecursiveMutex>
#include <QNetworkRequest> #include <QNetworkRequest>
#include "dsp/basebandsamplesink.h" #include "dsp/basebandsamplesink.h"
@ -143,7 +143,7 @@ private:
DeviceAPI *m_deviceAPI; DeviceAPI *m_deviceAPI;
QThread *m_thread; QThread *m_thread;
SSBDemodBaseband* m_basebandSink; SSBDemodBaseband* m_basebandSink;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool m_running; bool m_running;
SSBDemodSettings m_settings; SSBDemodSettings m_settings;
SpectrumVis m_spectrumVis; SpectrumVis m_spectrumVis;

View File

@ -28,8 +28,7 @@ MESSAGE_CLASS_DEFINITION(SSBDemodBaseband::MsgConfigureSSBDemodBaseband, Message
SSBDemodBaseband::SSBDemodBaseband() : SSBDemodBaseband::SSBDemodBaseband() :
m_channelizer(&m_sink), m_channelizer(&m_sink),
m_messageQueueToGUI(nullptr), m_messageQueueToGUI(nullptr),
m_spectrumVis(nullptr), m_spectrumVis(nullptr)
m_mutex(QMutex::Recursive)
{ {
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000));

View File

@ -19,7 +19,7 @@
#define INCLUDE_SSBDEMODBASEBAND_H #define INCLUDE_SSBDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "dsp/downchannelizer.h" #include "dsp/downchannelizer.h"
@ -85,7 +85,7 @@ private:
int m_channelSampleRate; int m_channelSampleRate;
MessageQueue *m_messageQueueToGUI; MessageQueue *m_messageQueueToGUI;
SpectrumVis *m_spectrumVis; SpectrumVis *m_spectrumVis;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const SSBDemodSettings& settings, bool force = false); void applySettings(const SSBDemodSettings& settings, bool force = false);

View File

@ -29,8 +29,7 @@ MESSAGE_CLASS_DEFINITION(VORDemodBaseband::MsgConfigureVORDemodBaseband, Message
VORDemodBaseband::VORDemodBaseband() : VORDemodBaseband::VORDemodBaseband() :
m_messageQueueToGUI(nullptr), m_messageQueueToGUI(nullptr),
m_running(false), m_running(false)
m_mutex(QMutex::Recursive)
{ {
qDebug("VORDemodBaseband::VORDemodBaseband"); qDebug("VORDemodBaseband::VORDemodBaseband");
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000));

View File

@ -20,7 +20,7 @@
#define INCLUDE_VORDEMODSCBASEBAND_H #define INCLUDE_VORDEMODSCBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -82,7 +82,7 @@ private:
VORDemodSettings m_settings; VORDemodSettings m_settings;
MessageQueue *m_messageQueueToGUI; MessageQueue *m_messageQueueToGUI;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const VORDemodSettings& settings, bool force = false); void applySettings(const VORDemodSettings& settings, bool force = false);

View File

@ -29,7 +29,6 @@ MESSAGE_CLASS_DEFINITION(VORDemodMCBaseband::MsgConfigureVORDemodBaseband, Messa
VORDemodMCBaseband::VORDemodMCBaseband() : VORDemodMCBaseband::VORDemodMCBaseband() :
m_running(false), m_running(false),
m_mutex(QMutex::Recursive),
m_messageQueueToGUI(nullptr), m_messageQueueToGUI(nullptr),
m_basebandSampleRate(0) m_basebandSampleRate(0)
{ {

View File

@ -20,7 +20,7 @@
#define INCLUDE_VORDEMODBASEBAND_H #define INCLUDE_VORDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -120,7 +120,7 @@ private:
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
VORDemodMCSettings m_settings; VORDemodMCSettings m_settings;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
MessageQueue *m_messageQueueToGUI; MessageQueue *m_messageQueueToGUI;
int m_basebandSampleRate; int m_basebandSampleRate;
int m_centerFrequency; int m_centerFrequency;

View File

@ -25,8 +25,7 @@
MESSAGE_CLASS_DEFINITION(WFMDemodBaseband::MsgConfigureWFMDemodBaseband, Message) MESSAGE_CLASS_DEFINITION(WFMDemodBaseband::MsgConfigureWFMDemodBaseband, Message)
WFMDemodBaseband::WFMDemodBaseband() : WFMDemodBaseband::WFMDemodBaseband()
m_mutex(QMutex::Recursive)
{ {
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000));
m_channelizer = new DownChannelizer(&m_sink); m_channelizer = new DownChannelizer(&m_sink);

View File

@ -19,7 +19,7 @@
#define INCLUDE_WFMDEMODBASEBAND_H #define INCLUDE_WFMDEMODBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -81,7 +81,7 @@ private:
WFMDemodSink m_sink; WFMDemodSink m_sink;
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
WFMDemodSettings m_settings; WFMDemodSettings m_settings;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const WFMDemodSettings& settings, bool force = false); void applySettings(const WFMDemodSettings& settings, bool force = false);

View File

@ -54,7 +54,6 @@ const char* const FileSink::m_channelId = "FileSink";
FileSink::FileSink(DeviceAPI *deviceAPI) : FileSink::FileSink(DeviceAPI *deviceAPI) :
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink), ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink),
m_deviceAPI(deviceAPI), m_deviceAPI(deviceAPI),
m_mutex(QMutex::Recursive),
m_running(false), m_running(false),
m_spectrumVis(SDR_RX_SCALEF), m_spectrumVis(SDR_RX_SCALEF),
m_centerFrequency(0), m_centerFrequency(0),

View File

@ -19,7 +19,7 @@
#define INCLUDE_FILESINK_H_ #define INCLUDE_FILESINK_H_
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include <QNetworkRequest> #include <QNetworkRequest>
#include "dsp/basebandsamplesink.h" #include "dsp/basebandsamplesink.h"
@ -161,7 +161,7 @@ private:
DeviceAPI *m_deviceAPI; DeviceAPI *m_deviceAPI;
QThread *m_thread; QThread *m_thread;
FileSinkBaseband *m_basebandSink; FileSinkBaseband *m_basebandSink;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool m_running; bool m_running;
FileSinkSettings m_settings; FileSinkSettings m_settings;
SpectrumVis m_spectrumVis; SpectrumVis m_spectrumVis;

View File

@ -33,8 +33,7 @@ FileSinkBaseband::FileSinkBaseband() :
m_channelizer(&m_sink), m_channelizer(&m_sink),
m_specMax(0), m_specMax(0),
m_squelchLevel(0), m_squelchLevel(0),
m_squelchOpen(false), m_squelchOpen(false)
m_mutex(QMutex::Recursive)
{ {
qDebug("FileSinkBaseband::FileSinkBaseband"); qDebug("FileSinkBaseband::FileSinkBaseband");
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000));

View File

@ -19,7 +19,7 @@
#define INCLUDE_FILESINKBASEBAND_H_ #define INCLUDE_FILESINKBASEBAND_H_
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "dsp/downchannelizer.h" #include "dsp/downchannelizer.h"
@ -113,7 +113,7 @@ private:
float m_squelchLevel; float m_squelchLevel;
bool m_squelchOpen; bool m_squelchOpen;
int64_t m_centerFrequency; int64_t m_centerFrequency;
QMutex m_mutex; QRecursiveMutex m_mutex;
QTimer *m_timer; QTimer *m_timer;
void stopWork(); void stopWork();

View File

@ -26,8 +26,7 @@
MESSAGE_CLASS_DEFINITION(FreqTrackerBaseband::MsgConfigureFreqTrackerBaseband, Message) MESSAGE_CLASS_DEFINITION(FreqTrackerBaseband::MsgConfigureFreqTrackerBaseband, Message)
FreqTrackerBaseband::FreqTrackerBaseband() : FreqTrackerBaseband::FreqTrackerBaseband()
m_mutex(QMutex::Recursive)
{ {
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000));
m_channelizer = new DownChannelizer(&m_sink); m_channelizer = new DownChannelizer(&m_sink);

View File

@ -19,7 +19,7 @@
#define INCLUDE_FREQTRACKERBASEBAND_H #define INCLUDE_FREQTRACKERBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -84,7 +84,7 @@ private:
FreqTrackerSettings m_settings; FreqTrackerSettings m_settings;
unsigned int m_basebandSampleRate; unsigned int m_basebandSampleRate;
SpectrumVis *m_spectrumVis; SpectrumVis *m_spectrumVis;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const FreqTrackerSettings& settings, bool force = false); void applySettings(const FreqTrackerSettings& settings, bool force = false);

View File

@ -28,8 +28,7 @@ MESSAGE_CLASS_DEFINITION(LocalSinkBaseband::MsgConfigureLocalSinkWork, Message)
MESSAGE_CLASS_DEFINITION(LocalSinkBaseband::MsgConfigureLocalDeviceSampleSource, Message) MESSAGE_CLASS_DEFINITION(LocalSinkBaseband::MsgConfigureLocalDeviceSampleSource, Message)
LocalSinkBaseband::LocalSinkBaseband() : LocalSinkBaseband::LocalSinkBaseband() :
m_localSampleSource(nullptr), m_localSampleSource(nullptr)
m_mutex(QMutex::Recursive)
{ {
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000));
m_channelizer = new DownChannelizer(&m_sink); m_channelizer = new DownChannelizer(&m_sink);

View File

@ -19,7 +19,7 @@
#define INCLUDE_LOCALSINKBASEBAND_H #define INCLUDE_LOCALSINKBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -114,7 +114,7 @@ private:
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
LocalSinkSettings m_settings; LocalSinkSettings m_settings;
DeviceSampleSource *m_localSampleSource; DeviceSampleSource *m_localSampleSource;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const LocalSinkSettings& settings, bool force = false); void applySettings(const LocalSinkSettings& settings, bool force = false);

View File

@ -28,8 +28,7 @@ MESSAGE_CLASS_DEFINITION(NoiseFigureBaseband::MsgConfigureNoiseFigureBaseband, M
NoiseFigureBaseband::NoiseFigureBaseband(NoiseFigure *aisDemod) : NoiseFigureBaseband::NoiseFigureBaseband(NoiseFigure *aisDemod) :
m_sink(aisDemod), m_sink(aisDemod),
m_running(false), m_running(false)
m_mutex(QMutex::Recursive)
{ {
qDebug("NoiseFigureBaseband::NoiseFigureBaseband"); qDebug("NoiseFigureBaseband::NoiseFigureBaseband");

View File

@ -20,7 +20,7 @@
#define INCLUDE_NOISEFIGUREBASEBAND_H #define INCLUDE_NOISEFIGUREBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "dsp/scopevis.h" #include "dsp/scopevis.h"
@ -85,7 +85,7 @@ private:
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
NoiseFigureSettings m_settings; NoiseFigureSettings m_settings;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void calculateOffset(NoiseFigureSink *sink); void calculateOffset(NoiseFigureSink *sink);

View File

@ -29,8 +29,7 @@ MESSAGE_CLASS_DEFINITION(RadioAstronomyBaseband::MsgConfigureRadioAstronomyBaseb
RadioAstronomyBaseband::RadioAstronomyBaseband(RadioAstronomy *aisDemod) : RadioAstronomyBaseband::RadioAstronomyBaseband(RadioAstronomy *aisDemod) :
m_sink(aisDemod), m_sink(aisDemod),
m_running(false), m_running(false)
m_mutex(QMutex::Recursive)
{ {
qDebug("RadioAstronomyBaseband::RadioAstronomyBaseband"); qDebug("RadioAstronomyBaseband::RadioAstronomyBaseband");

View File

@ -20,7 +20,7 @@
#define INCLUDE_RADIOASTRONOMYBASEBAND_H #define INCLUDE_RADIOASTRONOMYBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "dsp/scopevis.h" #include "dsp/scopevis.h"
@ -84,7 +84,7 @@ private:
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
RadioAstronomySettings m_settings; RadioAstronomySettings m_settings;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void calculateOffset(RadioAstronomySink *sink); void calculateOffset(RadioAstronomySink *sink);

View File

@ -30,7 +30,6 @@ RadioAstronomyWorker::RadioAstronomyWorker(RadioAstronomy* radioAstronomy) :
m_msgQueueToChannel(nullptr), m_msgQueueToChannel(nullptr),
m_msgQueueToGUI(nullptr), m_msgQueueToGUI(nullptr),
m_running(false), m_running(false),
m_mutex(QMutex::Recursive),
m_sensorTimer(this) m_sensorTimer(this)
{ {
connect(&m_sensorTimer, SIGNAL(timeout()), this, SLOT(measureSensors())); connect(&m_sensorTimer, SIGNAL(timeout()), this, SLOT(measureSensors()));

View File

@ -75,7 +75,7 @@ private:
MessageQueue *m_msgQueueToGUI; MessageQueue *m_msgQueueToGUI;
RadioAstronomySettings m_settings; RadioAstronomySettings m_settings;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
VISA m_visa; VISA m_visa;
ViSession m_session[RADIOASTRONOMY_SENSORS]; ViSession m_session[RADIOASTRONOMY_SENSORS];

View File

@ -29,8 +29,7 @@ MESSAGE_CLASS_DEFINITION(RadioClockBaseband::MsgConfigureRadioClockBaseband, Mes
RadioClockBaseband::RadioClockBaseband(RadioClock *radioClock) : RadioClockBaseband::RadioClockBaseband(RadioClock *radioClock) :
m_sink(radioClock), m_sink(radioClock),
m_running(false), m_running(false)
m_mutex(QMutex::Recursive)
{ {
qDebug("RadioClockBaseband::RadioClockBaseband"); qDebug("RadioClockBaseband::RadioClockBaseband");

View File

@ -20,7 +20,7 @@
#define INCLUDE_RADIOCLOCKBASEBAND_H #define INCLUDE_RADIOCLOCKBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "dsp/scopevis.h" #include "dsp/scopevis.h"
@ -87,7 +87,7 @@ private:
RadioClockSettings m_settings; RadioClockSettings m_settings;
ScopeVis m_scopeSink; ScopeVis m_scopeSink;
bool m_running; bool m_running;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const RadioClockSettings& settings, bool force = false); void applySettings(const RadioClockSettings& settings, bool force = false);

View File

@ -25,8 +25,7 @@
MESSAGE_CLASS_DEFINITION(RemoteSinkBaseband::MsgConfigureRemoteSinkBaseband, Message) MESSAGE_CLASS_DEFINITION(RemoteSinkBaseband::MsgConfigureRemoteSinkBaseband, Message)
RemoteSinkBaseband::RemoteSinkBaseband() : RemoteSinkBaseband::RemoteSinkBaseband()
m_mutex(QMutex::Recursive)
{ {
qDebug("RemoteSinkBaseband::RemoteSinkBaseband"); qDebug("RemoteSinkBaseband::RemoteSinkBaseband");
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000));

View File

@ -19,7 +19,7 @@
#define INCLUDE_REMOTESINKBASEBAND_H #define INCLUDE_REMOTESINKBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -82,7 +82,7 @@ private:
RemoteSinkSink m_sink; RemoteSinkSink m_sink;
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
RemoteSinkSettings m_settings; RemoteSinkSettings m_settings;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const RemoteSinkSettings& settings, bool force = false); void applySettings(const RemoteSinkSettings& settings, bool force = false);

View File

@ -25,8 +25,7 @@
#include "remotetcpsinkbaseband.h" #include "remotetcpsinkbaseband.h"
#include "remotetcpsink.h" #include "remotetcpsink.h"
RemoteTCPSinkBaseband::RemoteTCPSinkBaseband() : RemoteTCPSinkBaseband::RemoteTCPSinkBaseband()
m_mutex(QMutex::Recursive)
{ {
qDebug("RemoteTCPSinkBaseband::RemoteTCPSinkBaseband"); qDebug("RemoteTCPSinkBaseband::RemoteTCPSinkBaseband");
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000));

View File

@ -20,7 +20,7 @@
#define INCLUDE_REMOTETCPSINKBASEBAND_H #define INCLUDE_REMOTETCPSINKBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -60,7 +60,7 @@ private:
RemoteTCPSinkSink m_sink; RemoteTCPSinkSink m_sink;
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
RemoteTCPSinkSettings m_settings; RemoteTCPSinkSettings m_settings;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const RemoteTCPSinkSettings& settings, bool force = false, bool remoteChange = false); void applySettings(const RemoteTCPSinkSettings& settings, bool force = false, bool remoteChange = false);

View File

@ -36,7 +36,6 @@ RemoteTCPSinkSink::RemoteTCPSinkSink() :
m_channelFrequencyOffset(0), m_channelFrequencyOffset(0),
m_channelSampleRate(48000), m_channelSampleRate(48000),
m_linearGain(1.0f), m_linearGain(1.0f),
m_mutex(QMutex::Recursive),
m_server(nullptr) m_server(nullptr)
{ {
qDebug("RemoteTCPSinkSink::RemoteTCPSinkSink"); qDebug("RemoteTCPSinkSink::RemoteTCPSinkSink");

View File

@ -75,7 +75,7 @@ private:
uint32_t m_channelIndex; uint32_t m_channelIndex;
float m_linearGain; float m_linearGain;
QMutex m_mutex; QRecursiveMutex m_mutex;
QTcpServer *m_server; QTcpServer *m_server;
QList<QTcpSocket *> m_clients; QList<QTcpSocket *> m_clients;

View File

@ -54,7 +54,6 @@ const char* const SigMFFileSink::m_channelId = "SigMFFileSink";
SigMFFileSink::SigMFFileSink(DeviceAPI *deviceAPI) : SigMFFileSink::SigMFFileSink(DeviceAPI *deviceAPI) :
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink), ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink),
m_deviceAPI(deviceAPI), m_deviceAPI(deviceAPI),
m_mutex(QMutex::Recursive),
m_running(false), m_running(false),
m_spectrumVis(SDR_RX_SCALEF), m_spectrumVis(SDR_RX_SCALEF),
m_centerFrequency(0), m_centerFrequency(0),

View File

@ -19,7 +19,7 @@
#define INCLUDE_SIGMFFILESINK_H_ #define INCLUDE_SIGMFFILESINK_H_
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include <QNetworkRequest> #include <QNetworkRequest>
#include "dsp/basebandsamplesink.h" #include "dsp/basebandsamplesink.h"
@ -161,7 +161,7 @@ private:
DeviceAPI *m_deviceAPI; DeviceAPI *m_deviceAPI;
QThread *m_thread; QThread *m_thread;
SigMFFileSinkBaseband *m_basebandSink; SigMFFileSinkBaseband *m_basebandSink;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool m_running; bool m_running;
SigMFFileSinkSettings m_settings; SigMFFileSinkSettings m_settings;
SpectrumVis m_spectrumVis; SpectrumVis m_spectrumVis;

View File

@ -33,8 +33,7 @@ SigMFFileSinkBaseband::SigMFFileSinkBaseband() :
m_channelizer(&m_sink), m_channelizer(&m_sink),
m_specMax(0), m_specMax(0),
m_squelchLevel(0), m_squelchLevel(0),
m_squelchOpen(false), m_squelchOpen(false)
m_mutex(QMutex::Recursive)
{ {
qDebug("SigMFFileSinkBaseband::SigMFFileSinkBaseband"); qDebug("SigMFFileSinkBaseband::SigMFFileSinkBaseband");
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000));

View File

@ -19,7 +19,7 @@
#define INCLUDE_SIFMFFILESINKBASEBAND_H_ #define INCLUDE_SIFMFFILESINKBASEBAND_H_
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "dsp/downchannelizer.h" #include "dsp/downchannelizer.h"
@ -113,7 +113,7 @@ private:
float m_squelchLevel; float m_squelchLevel;
bool m_squelchOpen; bool m_squelchOpen;
int64_t m_centerFrequency; int64_t m_centerFrequency;
QMutex m_mutex; QRecursiveMutex m_mutex;
QTimer *m_timer; QTimer *m_timer;
void stopWork(); void stopWork();

View File

@ -26,8 +26,7 @@
MESSAGE_CLASS_DEFINITION(UDPSinkBaseband::MsgConfigureUDPSinkBaseband, Message) MESSAGE_CLASS_DEFINITION(UDPSinkBaseband::MsgConfigureUDPSinkBaseband, Message)
MESSAGE_CLASS_DEFINITION(UDPSinkBaseband::MsgEnableSpectrum, Message) MESSAGE_CLASS_DEFINITION(UDPSinkBaseband::MsgEnableSpectrum, Message)
UDPSinkBaseband::UDPSinkBaseband() : UDPSinkBaseband::UDPSinkBaseband()
m_mutex(QMutex::Recursive)
{ {
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000));
m_channelizer = new DownChannelizer(&m_sink); m_channelizer = new DownChannelizer(&m_sink);

View File

@ -19,7 +19,7 @@
#define INCLUDE_UDPSINKBASEBAND_H #define INCLUDE_UDPSINKBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesinkfifo.h" #include "dsp/samplesinkfifo.h"
#include "util/message.h" #include "util/message.h"
@ -97,7 +97,7 @@ private:
UDPSinkSink m_sink; UDPSinkSink m_sink;
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
UDPSinkSettings m_settings; UDPSinkSettings m_settings;
QMutex m_mutex; QRecursiveMutex m_mutex;
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);
void applySettings(const UDPSinkSettings& settings, bool force = false); void applySettings(const UDPSinkSettings& settings, bool force = false);

View File

@ -53,7 +53,6 @@ const char* const FileSource::m_channelId ="FileSource";
FileSource::FileSource(DeviceAPI *deviceAPI) : FileSource::FileSource(DeviceAPI *deviceAPI) :
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSource), ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSource),
m_deviceAPI(deviceAPI), m_deviceAPI(deviceAPI),
m_settingsMutex(QMutex::Recursive),
m_frequencyOffset(0), m_frequencyOffset(0),
m_basebandSampleRate(0), m_basebandSampleRate(0),
m_linearGain(0.0) m_linearGain(0.0)

View File

@ -228,7 +228,7 @@ private:
FileSourceSettings m_settings; FileSourceSettings m_settings;
SampleVector m_sampleBuffer; SampleVector m_sampleBuffer;
QMutex m_settingsMutex; QRecursiveMutex m_settingsMutex;
uint64_t m_frequencyOffset; uint64_t m_frequencyOffset;
uint32_t m_basebandSampleRate; uint32_t m_basebandSampleRate;
double m_linearGain; double m_linearGain;

View File

@ -31,8 +31,7 @@ MESSAGE_CLASS_DEFINITION(FileSourceBaseband::MsgConfigureFileSourceSeek, Message
FileSourceBaseband::FileSourceBaseband() : FileSourceBaseband::FileSourceBaseband() :
m_avg(0.0), m_avg(0.0),
m_peak(0.0), m_peak(0.0),
m_nbSamples(1), m_nbSamples(1)
m_mutex(QMutex::Recursive)
{ {
m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(48000)); m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(48000));
m_channelizer = new UpChannelizer(&m_source); m_channelizer = new UpChannelizer(&m_source);
@ -216,4 +215,4 @@ int FileSourceBaseband::getChannelSampleRate() const
quint64 FileSourceBaseband::getSamplesCount() const quint64 FileSourceBaseband::getSamplesCount() const
{ {
return m_source.getSamplesCount(); return m_source.getSamplesCount();
} }

View File

@ -19,7 +19,7 @@
#define INCLUDE_FILESOURCEBASEBAND_H #define INCLUDE_FILESOURCEBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesourcefifo.h" #include "dsp/samplesourcefifo.h"
#include "util/message.h" #include "util/message.h"
@ -147,7 +147,7 @@ private:
double m_avg; double m_avg;
double m_peak; double m_peak;
int m_nbSamples; int m_nbSamples;
QMutex m_mutex; QRecursiveMutex m_mutex;
void processFifo(SampleVector& data, unsigned int iBegin, unsigned int iEnd); void processFifo(SampleVector& data, unsigned int iBegin, unsigned int iEnd);
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);

View File

@ -28,8 +28,7 @@ MESSAGE_CLASS_DEFINITION(LocalSourceBaseband::MsgConfigureLocalSourceWork, Messa
MESSAGE_CLASS_DEFINITION(LocalSourceBaseband::MsgConfigureLocalDeviceSampleSink, Message) MESSAGE_CLASS_DEFINITION(LocalSourceBaseband::MsgConfigureLocalDeviceSampleSink, Message)
LocalSourceBaseband::LocalSourceBaseband() : LocalSourceBaseband::LocalSourceBaseband() :
m_localSampleSink(nullptr), m_localSampleSink(nullptr)
m_mutex(QMutex::Recursive)
{ {
m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(48000)); m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(48000));
m_channelizer = new UpChannelizer(&m_source); m_channelizer = new UpChannelizer(&m_source);

View File

@ -19,7 +19,7 @@
#define INCLUDE_LOCALSOURCEBASEBAND_H #define INCLUDE_LOCALSOURCEBASEBAND_H
#include <QObject> #include <QObject>
#include <QMutex> #include <QRecursiveMutex>
#include "dsp/samplesourcefifo.h" #include "dsp/samplesourcefifo.h"
#include "util/message.h" #include "util/message.h"
@ -113,7 +113,7 @@ private:
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
LocalSourceSettings m_settings; LocalSourceSettings m_settings;
DeviceSampleSink *m_localSampleSink; DeviceSampleSink *m_localSampleSink;
QMutex m_mutex; QRecursiveMutex m_mutex;
void processFifo(SampleVector& data, unsigned int iBegin, unsigned int iEnd); void processFifo(SampleVector& data, unsigned int iBegin, unsigned int iEnd);
bool handleMessage(const Message& cmd); bool handleMessage(const Message& cmd);

View File

@ -57,8 +57,7 @@ const char* const IEEE_802_15_4_Mod::m_channelId = "IEEE_802_15_4_Mod";
IEEE_802_15_4_Mod::IEEE_802_15_4_Mod(DeviceAPI *deviceAPI) : IEEE_802_15_4_Mod::IEEE_802_15_4_Mod(DeviceAPI *deviceAPI) :
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSource), ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSource),
m_deviceAPI(deviceAPI), m_deviceAPI(deviceAPI),
m_spectrumVis(SDR_TX_SCALEF), m_spectrumVis(SDR_TX_SCALEF)
m_settingsMutex(QMutex::Recursive)
{ {
setObjectName(m_channelId); setObjectName(m_channelId);

Some files were not shown because too many files have changed in this diff Show More