CubicSDR/src/demod/DemodulatorMgr.h

38 lines
818 B
C
Raw Normal View History

#pragma once
#include <vector>
#include <map>
#include "DemodulatorThread.h"
class DemodulatorInstance {
public:
DemodulatorThread *demodulatorThread;
std::thread *t_Demod;
DemodulatorThreadInputQueue* threadQueueDemod;
DemodulatorThreadCommandQueue* threadQueueCommand;
2014-11-22 22:33:32 -05:00
DemodulatorInstance();
~DemodulatorInstance();
2014-11-22 22:33:32 -05:00
void setVisualOutputQueue(DemodulatorThreadOutputQueue *tQueue);
DemodulatorThreadCommandQueue *getCommandQueue();
DemodulatorThreadParameters &getParams();
void run();
void terminate();
};
class DemodulatorMgr {
public:
2014-11-22 22:33:32 -05:00
DemodulatorMgr();
~DemodulatorMgr();
2014-11-22 22:33:32 -05:00
DemodulatorInstance *newThread();
std::vector<DemodulatorInstance *> &getDemodulators();
void terminateAll();
2014-11-22 22:33:32 -05:00
private:
std::vector<DemodulatorInstance *> demods;
};