mirror of https://github.com/f4exb/sdrangel.git
SDRdaemonSink: (2)
This commit is contained in:
parent
dec0dbeb4c
commit
ae97f6414b
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2016 Edouard Griffiths, F4EXB //
|
// Copyright (C) 2017 Edouard Griffiths, F4EXB //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// This program is free software; you can redistribute it and/or modify //
|
||||||
// it under the terms of the GNU General Public License as published by //
|
// it under the terms of the GNU General Public License as published by //
|
||||||
|
@ -24,41 +24,41 @@
|
||||||
#include "sdrdaemonsinkgui.h"
|
#include "sdrdaemonsinkgui.h"
|
||||||
#include "sdrdaemonsinkplugin.h"
|
#include "sdrdaemonsinkplugin.h"
|
||||||
|
|
||||||
const PluginDescriptor FileSinkPlugin::m_pluginDescriptor = {
|
const PluginDescriptor SDRdaemonSinkPlugin::m_pluginDescriptor = {
|
||||||
QString("File sink output"),
|
QString("SDRdaemon sink output"),
|
||||||
QString("3.4.0"),
|
QString("3.5.0"),
|
||||||
QString("(c) Edouard Griffiths, F4EXB"),
|
QString("(c) Edouard Griffiths, F4EXB"),
|
||||||
QString("https://github.com/f4exb/sdrangel"),
|
QString("https://github.com/f4exb/sdrangel"),
|
||||||
true,
|
true,
|
||||||
QString("https://github.com/f4exb/sdrangel")
|
QString("https://github.com/f4exb/sdrangel")
|
||||||
};
|
};
|
||||||
|
|
||||||
const QString FileSinkPlugin::m_hardwareID = "FileSink";
|
const QString SDRdaemonSinkPlugin::m_hardwareID = "SDRdaemonSink";
|
||||||
const QString FileSinkPlugin::m_deviceTypeID = FILESINK_DEVICE_TYPE_ID;
|
const QString SDRdaemonSinkPlugin::m_deviceTypeID = SDRDAEMONSINK_DEVICE_TYPE_ID;
|
||||||
|
|
||||||
FileSinkPlugin::FileSinkPlugin(QObject* parent) :
|
SDRdaemonSinkPlugin::SDRdaemonSinkPlugin(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
const PluginDescriptor& FileSinkPlugin::getPluginDescriptor() const
|
const PluginDescriptor& SDRdaemonSinkPlugin::getPluginDescriptor() const
|
||||||
{
|
{
|
||||||
return m_pluginDescriptor;
|
return m_pluginDescriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileSinkPlugin::initPlugin(PluginAPI* pluginAPI)
|
void SDRdaemonSinkPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||||
{
|
{
|
||||||
pluginAPI->registerSampleSink(m_deviceTypeID, this);
|
pluginAPI->registerSampleSink(m_deviceTypeID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInterface::SamplingDevices FileSinkPlugin::enumSampleSinks()
|
PluginInterface::SamplingDevices SDRdaemonSinkPlugin::enumSampleSinks()
|
||||||
{
|
{
|
||||||
SamplingDevices result;
|
SamplingDevices result;
|
||||||
int count = 1;
|
int count = 1;
|
||||||
|
|
||||||
for(int i = 0; i < count; i++)
|
for(int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
QString displayedName(QString("FileSink[%1]").arg(i));
|
QString displayedName(QString("SDRdaemonSink[%1]").arg(i));
|
||||||
|
|
||||||
result.append(SamplingDevice(displayedName,
|
result.append(SamplingDevice(displayedName,
|
||||||
m_hardwareID,
|
m_hardwareID,
|
||||||
|
@ -70,11 +70,11 @@ PluginInterface::SamplingDevices FileSinkPlugin::enumSampleSinks()
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* FileSinkPlugin::createSampleSinkPluginGUI(const QString& sinkId, QWidget **widget, DeviceSinkAPI *deviceAPI)
|
PluginGUI* SDRdaemonSinkPlugin::createSampleSinkPluginGUI(const QString& sinkId, QWidget **widget, DeviceSinkAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
if(sinkId == m_deviceTypeID)
|
if(sinkId == m_deviceTypeID)
|
||||||
{
|
{
|
||||||
FileSinkGui* gui = new FileSinkGui(deviceAPI);
|
SDRDaemonSinkGui* gui = new SDRDaemonSinkGui(deviceAPI);
|
||||||
*widget = gui;
|
*widget = gui;
|
||||||
return gui;
|
return gui;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2016 Edouard Griffiths, F4EXB //
|
// Copyright (C) 2017 Edouard Griffiths, F4EXB //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// This program is free software; you can redistribute it and/or modify //
|
||||||
// it under the terms of the GNU General Public License as published by //
|
// it under the terms of the GNU General Public License as published by //
|
||||||
|
@ -14,24 +14,24 @@
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef INCLUDE_FILESINKPLUGIN_H
|
#ifndef INCLUDE_SDRDAEMONSINKPLUGIN_H
|
||||||
#define INCLUDE_FILESINKPLUGIN_H
|
#define INCLUDE_SDRDAEMONSINKPLUGIN_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include "plugin/plugininterface.h"
|
#include "plugin/plugininterface.h"
|
||||||
|
|
||||||
#define FILESINK_DEVICE_TYPE_ID "sdrangel.samplesink.filesink"
|
#define SDRDAEMONSINK_DEVICE_TYPE_ID "sdrangel.samplesink.sdrdaemonsink"
|
||||||
|
|
||||||
class PluginAPI;
|
class PluginAPI;
|
||||||
class DeviceSinkAPI;
|
class DeviceSinkAPI;
|
||||||
|
|
||||||
class FileSinkPlugin : public QObject, public PluginInterface {
|
class SDRdaemonSinkPlugin : public QObject, public PluginInterface {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(PluginInterface)
|
Q_INTERFACES(PluginInterface)
|
||||||
Q_PLUGIN_METADATA(IID FILESINK_DEVICE_TYPE_ID)
|
Q_PLUGIN_METADATA(IID SDRDAEMONSINK_DEVICE_TYPE_ID)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit FileSinkPlugin(QObject* parent = NULL);
|
explicit SDRdaemonSinkPlugin(QObject* parent = NULL);
|
||||||
|
|
||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
@ -46,4 +46,4 @@ private:
|
||||||
static const PluginDescriptor m_pluginDescriptor;
|
static const PluginDescriptor m_pluginDescriptor;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_FILESOURCEPLUGIN_H
|
#endif // INCLUDE_SDRDAEMONSINKPLUGIN_H
|
||||||
|
|
Loading…
Reference in New Issue