mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-08 00:44:48 -04:00
Input core creation method implementation in all source plugins
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
#include "util/simpleserializer.h"
|
||||
#include <device/devicesourceapi.h>
|
||||
|
||||
#include "../bladerfinput/bladerfinputgui.h"
|
||||
#include "bladerfinputgui.h"
|
||||
|
||||
const PluginDescriptor BlderfInputPlugin::m_pluginDescriptor = {
|
||||
QString("BladerRF Input"),
|
||||
@@ -91,3 +91,17 @@ PluginInstanceUI* BlderfInputPlugin::createSampleSourcePluginInstanceGUI(const Q
|
||||
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"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSourceAPI;
|
||||
|
||||
#define BLADERF_DEVICE_TYPE_ID "sdrangel.samplesource.bladerf"
|
||||
|
||||
@@ -37,6 +38,7 @@ public:
|
||||
|
||||
virtual SamplingDevices enumSampleSources();
|
||||
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_deviceTypeID;
|
||||
|
||||
Reference in New Issue
Block a user