mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-07-17 08:15:21 -04:00
Input core creation method implementation in all source plugins
This commit is contained in:
parent
25c150c3c5
commit
aa5c6c59a5
@ -23,7 +23,7 @@
|
|||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
#include <device/devicesourceapi.h>
|
#include <device/devicesourceapi.h>
|
||||||
|
|
||||||
#include "../bladerfinput/bladerfinputgui.h"
|
#include "bladerfinputgui.h"
|
||||||
|
|
||||||
const PluginDescriptor BlderfInputPlugin::m_pluginDescriptor = {
|
const PluginDescriptor BlderfInputPlugin::m_pluginDescriptor = {
|
||||||
QString("BladerRF Input"),
|
QString("BladerRF Input"),
|
||||||
@ -91,3 +91,17 @@ PluginInstanceUI* BlderfInputPlugin::createSampleSourcePluginInstanceGUI(const Q
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeviceSampleSource *BlderfInputPlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
|
||||||
|
{
|
||||||
|
if (sourceId == m_deviceTypeID)
|
||||||
|
{
|
||||||
|
BladerfInput *input = new BladerfInput(deviceAPI);
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "plugin/plugininterface.h"
|
#include "plugin/plugininterface.h"
|
||||||
|
|
||||||
class PluginAPI;
|
class PluginAPI;
|
||||||
|
class DeviceSourceAPI;
|
||||||
|
|
||||||
#define BLADERF_DEVICE_TYPE_ID "sdrangel.samplesource.bladerf"
|
#define BLADERF_DEVICE_TYPE_ID "sdrangel.samplesource.bladerf"
|
||||||
|
|
||||||
@ -37,6 +38,7 @@ public:
|
|||||||
|
|
||||||
virtual SamplingDevices enumSampleSources();
|
virtual SamplingDevices enumSampleSources();
|
||||||
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||||
|
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
static const QString m_hardwareID;
|
static const QString m_hardwareID;
|
||||||
static const QString m_deviceTypeID;
|
static const QString m_deviceTypeID;
|
||||||
|
@ -84,6 +84,19 @@ PluginInstanceUI* FCDProPlugin::createSampleSourcePluginInstanceGUI(const QStrin
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeviceSampleSource *FCDProPlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
|
||||||
|
{
|
||||||
|
if (sourceId == fcd_traits<Pro>::interfaceIID)
|
||||||
|
{
|
||||||
|
FCDProInput* input = new FCDProInput(deviceAPI);
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -21,6 +21,7 @@ public:
|
|||||||
|
|
||||||
virtual SamplingDevices enumSampleSources();
|
virtual SamplingDevices enumSampleSources();
|
||||||
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||||
|
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const PluginDescriptor m_pluginDescriptor;
|
static const PluginDescriptor m_pluginDescriptor;
|
||||||
|
@ -86,6 +86,19 @@ PluginInstanceUI* FCDProPlusPlugin::createSampleSourcePluginInstanceGUI(const QS
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeviceSampleSource *FCDProPlusPlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
|
||||||
|
{
|
||||||
|
if(sourceId == fcd_traits<ProPlus>::interfaceIID)
|
||||||
|
{
|
||||||
|
FCDProPlusInput* input = new FCDProPlusInput(deviceAPI);
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -21,6 +21,7 @@ public:
|
|||||||
|
|
||||||
virtual SamplingDevices enumSampleSources();
|
virtual SamplingDevices enumSampleSources();
|
||||||
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||||
|
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
static const QString m_deviceTypeID;
|
static const QString m_deviceTypeID;
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ FileSourceGui::FileSourceGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
|||||||
ui->playLoop->setChecked(true); // FIXME: always play in a loop
|
ui->playLoop->setChecked(true); // FIXME: always play in a loop
|
||||||
ui->playLoop->setEnabled(false);
|
ui->playLoop->setEnabled(false);
|
||||||
|
|
||||||
m_sampleSource = new FileSourceInput(m_deviceAPI->getMainWindow()->getMasterTimer());
|
m_sampleSource = new FileSourceInput(m_deviceAPI);
|
||||||
connect(m_sampleSource->getOutputMessageQueueToGUI(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
connect(m_sampleSource->getOutputMessageQueueToGUI(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
||||||
m_deviceAPI->setSource(m_sampleSource);
|
m_deviceAPI->setSource(m_sampleSource);
|
||||||
|
|
||||||
|
@ -21,11 +21,11 @@
|
|||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
#include "dsp/dspcommands.h"
|
#include "dsp/dspcommands.h"
|
||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
|
#include "dsp/filerecord.h"
|
||||||
|
#include "device/devicesourceapi.h"
|
||||||
|
|
||||||
#include "filesourcegui.h"
|
#include "filesourcegui.h"
|
||||||
#include "filesourceinput.h"
|
#include "filesourceinput.h"
|
||||||
|
|
||||||
#include <dsp/filerecord.h>
|
|
||||||
|
|
||||||
#include "filesourcethread.h"
|
#include "filesourcethread.h"
|
||||||
|
|
||||||
MESSAGE_CLASS_DEFINITION(FileSourceInput::MsgConfigureFileSource, Message)
|
MESSAGE_CLASS_DEFINITION(FileSourceInput::MsgConfigureFileSource, Message)
|
||||||
@ -72,7 +72,8 @@ bool FileSourceInput::Settings::deserialize(const QByteArray& data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FileSourceInput::FileSourceInput(const QTimer& masterTimer) :
|
FileSourceInput::FileSourceInput(DeviceSourceAPI *deviceAPI) :
|
||||||
|
m_deviceAPI(deviceAPI),
|
||||||
m_settings(),
|
m_settings(),
|
||||||
m_fileSourceThread(NULL),
|
m_fileSourceThread(NULL),
|
||||||
m_deviceDescription(),
|
m_deviceDescription(),
|
||||||
@ -80,8 +81,8 @@ FileSourceInput::FileSourceInput(const QTimer& masterTimer) :
|
|||||||
m_sampleRate(0),
|
m_sampleRate(0),
|
||||||
m_centerFrequency(0),
|
m_centerFrequency(0),
|
||||||
m_recordLength(0),
|
m_recordLength(0),
|
||||||
m_startingTimeStamp(0),
|
m_startingTimeStamp(0),
|
||||||
m_masterTimer(masterTimer)
|
m_masterTimer(deviceAPI->getMasterTimer())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
class FileSourceThread;
|
class FileSourceThread;
|
||||||
|
class DeviceSourceAPI;
|
||||||
|
|
||||||
class FileSourceInput : public DeviceSampleSource {
|
class FileSourceInput : public DeviceSampleSource {
|
||||||
public:
|
public:
|
||||||
@ -209,7 +210,7 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
FileSourceInput(const QTimer& masterTimer);
|
FileSourceInput(DeviceSourceAPI *deviceAPI);
|
||||||
virtual ~FileSourceInput();
|
virtual ~FileSourceInput();
|
||||||
|
|
||||||
virtual bool start();
|
virtual bool start();
|
||||||
@ -223,6 +224,7 @@ public:
|
|||||||
virtual bool handleMessage(const Message& message);
|
virtual bool handleMessage(const Message& message);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
DeviceSourceAPI *m_deviceAPI;
|
||||||
QMutex m_mutex;
|
QMutex m_mutex;
|
||||||
Settings m_settings;
|
Settings m_settings;
|
||||||
std::ifstream m_ifstream;
|
std::ifstream m_ifstream;
|
||||||
|
@ -79,6 +79,20 @@ PluginInstanceUI* FileSourcePlugin::createSampleSourcePluginInstanceGUI(const QS
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeviceSampleSource *FileSourcePlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
|
||||||
|
{
|
||||||
|
if (sourceId == m_deviceTypeID)
|
||||||
|
{
|
||||||
|
FileSourceInput* input = new FileSourceInput(deviceAPI);
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ public:
|
|||||||
|
|
||||||
virtual SamplingDevices enumSampleSources();
|
virtual SamplingDevices enumSampleSources();
|
||||||
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||||
|
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
static const QString m_hardwareID;
|
static const QString m_hardwareID;
|
||||||
static const QString m_deviceTypeID;
|
static const QString m_deviceTypeID;
|
||||||
|
@ -130,3 +130,16 @@ PluginInstanceUI* HackRFInputPlugin::createSampleSourcePluginInstanceGUI(const Q
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeviceSampleSource *HackRFInputPlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
|
||||||
|
{
|
||||||
|
if (sourceId == m_deviceTypeID)
|
||||||
|
{
|
||||||
|
HackRFInput* input = new HackRFInput(deviceAPI);
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -37,6 +37,7 @@ public:
|
|||||||
|
|
||||||
virtual SamplingDevices enumSampleSources();
|
virtual SamplingDevices enumSampleSources();
|
||||||
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||||
|
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
static const QString m_hardwareID;
|
static const QString m_hardwareID;
|
||||||
static const QString m_deviceTypeID;
|
static const QString m_deviceTypeID;
|
||||||
|
@ -129,3 +129,16 @@ bool LimeSDRInputPlugin::findSerial(const char *lmsInfoStr, std::string& serial)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeviceSampleSource *LimeSDRInputPlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
|
||||||
|
{
|
||||||
|
if (sourceId == m_deviceTypeID)
|
||||||
|
{
|
||||||
|
LimeSDRInput* input = new LimeSDRInput(deviceAPI);
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ public:
|
|||||||
|
|
||||||
virtual SamplingDevices enumSampleSources();
|
virtual SamplingDevices enumSampleSources();
|
||||||
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||||
|
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
static const QString m_hardwareID;
|
static const QString m_hardwareID;
|
||||||
static const QString m_deviceTypeID;
|
static const QString m_deviceTypeID;
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "plutosdr/deviceplutosdr.h"
|
#include "plutosdr/deviceplutosdr.h"
|
||||||
|
|
||||||
#include "plutosdrinputgui.h"
|
#include "plutosdrinputgui.h"
|
||||||
|
#include "plutosdrinput.h"
|
||||||
#include "plutosdrinputplugin.h"
|
#include "plutosdrinputplugin.h"
|
||||||
|
|
||||||
class DeviceSourceAPI;
|
class DeviceSourceAPI;
|
||||||
@ -93,3 +94,17 @@ PluginInstanceUI* PlutoSDRInputPlugin::createSampleSourcePluginInstanceGUI(const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeviceSampleSource *PlutoSDRInputPlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
|
||||||
|
{
|
||||||
|
if (sourceId == m_deviceTypeID)
|
||||||
|
{
|
||||||
|
PlutoSDRInput* input = new PlutoSDRInput(deviceAPI);
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ public:
|
|||||||
|
|
||||||
virtual SamplingDevices enumSampleSources();
|
virtual SamplingDevices enumSampleSources();
|
||||||
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||||
|
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
static const QString m_hardwareID;
|
static const QString m_hardwareID;
|
||||||
static const QString m_deviceTypeID;
|
static const QString m_deviceTypeID;
|
||||||
|
@ -69,6 +69,20 @@ PluginInstanceUI* RTLSDRPlugin::createSampleSourcePluginInstanceGUI(const QStrin
|
|||||||
*widget = gui;
|
*widget = gui;
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeviceSampleSource *RTLSDRPlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
|
||||||
|
{
|
||||||
|
if (sourceId == m_deviceTypeID)
|
||||||
|
{
|
||||||
|
RTLSDRInput* input = new RTLSDRInput(deviceAPI);
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ public:
|
|||||||
|
|
||||||
virtual SamplingDevices enumSampleSources();
|
virtual SamplingDevices enumSampleSources();
|
||||||
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||||
|
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
static const QString m_hardwareID;
|
static const QString m_hardwareID;
|
||||||
static const QString m_deviceTypeID;
|
static const QString m_deviceTypeID;
|
||||||
|
@ -97,7 +97,7 @@ SDRdaemonSourceGui::SDRdaemonSourceGui(DeviceSourceAPI *deviceAPI, QWidget* pare
|
|||||||
connect(&(deviceAPI->getMainWindow()->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
|
connect(&(deviceAPI->getMainWindow()->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
|
||||||
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
|
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
|
||||||
|
|
||||||
m_sampleSource = new SDRdaemonSourceInput(deviceAPI->getMainWindow()->getMasterTimer(), m_deviceAPI);
|
m_sampleSource = new SDRdaemonSourceInput(m_deviceAPI);
|
||||||
connect(m_sampleSource->getOutputMessageQueueToGUI(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
connect(m_sampleSource->getOutputMessageQueueToGUI(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
||||||
m_deviceAPI->setSource(m_sampleSource);
|
m_deviceAPI->setSource(m_sampleSource);
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ MESSAGE_CLASS_DEFINITION(SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamDat
|
|||||||
MESSAGE_CLASS_DEFINITION(SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming, Message)
|
MESSAGE_CLASS_DEFINITION(SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(SDRdaemonSourceInput::MsgFileRecord, Message)
|
MESSAGE_CLASS_DEFINITION(SDRdaemonSourceInput::MsgFileRecord, Message)
|
||||||
|
|
||||||
SDRdaemonSourceInput::SDRdaemonSourceInput(const QTimer& masterTimer, DeviceSourceAPI *deviceAPI) :
|
SDRdaemonSourceInput::SDRdaemonSourceInput(DeviceSourceAPI *deviceAPI) :
|
||||||
m_deviceAPI(deviceAPI),
|
m_deviceAPI(deviceAPI),
|
||||||
m_address("127.0.0.1"),
|
m_address("127.0.0.1"),
|
||||||
m_port(9090),
|
m_port(9090),
|
||||||
@ -47,7 +47,7 @@ SDRdaemonSourceInput::SDRdaemonSourceInput(const QTimer& masterTimer, DeviceSour
|
|||||||
m_sampleRate(0),
|
m_sampleRate(0),
|
||||||
m_centerFrequency(0),
|
m_centerFrequency(0),
|
||||||
m_startingTimeStamp(0),
|
m_startingTimeStamp(0),
|
||||||
m_masterTimer(masterTimer),
|
m_masterTimer(deviceAPI->getMasterTimer()),
|
||||||
m_autoFollowRate(false),
|
m_autoFollowRate(false),
|
||||||
m_autoCorrBuffer(false)
|
m_autoCorrBuffer(false)
|
||||||
{
|
{
|
||||||
|
@ -303,7 +303,7 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
SDRdaemonSourceInput(const QTimer& masterTimer, DeviceSourceAPI *deviceAPI);
|
SDRdaemonSourceInput(DeviceSourceAPI *deviceAPI);
|
||||||
virtual ~SDRdaemonSourceInput();
|
virtual ~SDRdaemonSourceInput();
|
||||||
|
|
||||||
virtual bool start();
|
virtual bool start();
|
||||||
|
@ -80,6 +80,19 @@ PluginInstanceUI* SDRdaemonSourcePlugin::createSampleSourcePluginInstanceGUI(con
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeviceSampleSource *SDRdaemonSourcePlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
|
||||||
|
{
|
||||||
|
if (sourceId == m_deviceTypeID)
|
||||||
|
{
|
||||||
|
SDRdaemonSourceInput* input = new SDRdaemonSourceInput(deviceAPI);
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -37,6 +37,7 @@ public:
|
|||||||
|
|
||||||
virtual SamplingDevices enumSampleSources();
|
virtual SamplingDevices enumSampleSources();
|
||||||
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||||
|
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
static const QString m_hardwareID;
|
static const QString m_hardwareID;
|
||||||
static const QString m_deviceTypeID;
|
static const QString m_deviceTypeID;
|
||||||
|
@ -96,3 +96,17 @@ PluginInstanceUI* SDRPlayPlugin::createSampleSourcePluginInstanceGUI(const QStri
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeviceSampleSource *SDRPlayPlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
|
||||||
|
{
|
||||||
|
if (sourceId == m_deviceTypeID)
|
||||||
|
{
|
||||||
|
SDRPlayInput* input = new SDRPlayInput(deviceAPI);
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ public:
|
|||||||
|
|
||||||
virtual SamplingDevices enumSampleSources();
|
virtual SamplingDevices enumSampleSources();
|
||||||
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
virtual PluginInstanceUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||||
|
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
static const QString m_hardwareID;
|
static const QString m_hardwareID;
|
||||||
static const QString m_deviceTypeID;
|
static const QString m_deviceTypeID;
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "settings/preset.h"
|
#include "settings/preset.h"
|
||||||
|
|
||||||
|
// TODO: extract GUI dependencies in a separate object
|
||||||
DeviceSourceAPI::DeviceSourceAPI(MainWindow *mainWindow,
|
DeviceSourceAPI::DeviceSourceAPI(MainWindow *mainWindow,
|
||||||
int deviceTabIndex,
|
int deviceTabIndex,
|
||||||
DSPDeviceSourceEngine *deviceSourceEngine,
|
DSPDeviceSourceEngine *deviceSourceEngine,
|
||||||
@ -37,7 +38,8 @@ DeviceSourceAPI::DeviceSourceAPI(MainWindow *mainWindow,
|
|||||||
m_sampleSourceSequence(0),
|
m_sampleSourceSequence(0),
|
||||||
m_sampleSourcePluginInstanceUI(0),
|
m_sampleSourcePluginInstanceUI(0),
|
||||||
m_buddySharedPtr(0),
|
m_buddySharedPtr(0),
|
||||||
m_isBuddyLeader(false)
|
m_isBuddyLeader(false),
|
||||||
|
m_masterTimer(mainWindow->getMasterTimer()) // TODO: get master timer directly not from main window
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,6 +103,8 @@ public:
|
|||||||
bool isBuddyLeader() const { return m_isBuddyLeader; }
|
bool isBuddyLeader() const { return m_isBuddyLeader; }
|
||||||
void setBuddyLeader(bool isBuddyLeader) { m_isBuddyLeader = isBuddyLeader; }
|
void setBuddyLeader(bool isBuddyLeader) { m_isBuddyLeader = isBuddyLeader; }
|
||||||
|
|
||||||
|
const QTimer& getMasterTimer() const { return m_masterTimer; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
struct ChannelInstanceRegistration
|
struct ChannelInstanceRegistration
|
||||||
{
|
{
|
||||||
@ -151,6 +153,7 @@ protected:
|
|||||||
std::vector<DeviceSinkAPI*> m_sinkBuddies; //!< Device sink APIs referencing the same physical device
|
std::vector<DeviceSinkAPI*> m_sinkBuddies; //!< Device sink APIs referencing the same physical device
|
||||||
void *m_buddySharedPtr;
|
void *m_buddySharedPtr;
|
||||||
bool m_isBuddyLeader;
|
bool m_isBuddyLeader;
|
||||||
|
const QTimer& m_masterTimer;
|
||||||
|
|
||||||
friend class MainWindow;
|
friend class MainWindow;
|
||||||
friend class DeviceSinkAPI;
|
friend class DeviceSinkAPI;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user