1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-26 12:04:13 -04:00

Replace separate create channel methods (BS and CS): common plugins

This commit is contained in:
f4exb
2020-10-01 22:52:27 +02:00
parent 88fffa314b
commit 09374da967
52 changed files with 444 additions and 314 deletions
+16 -10
View File
@@ -55,6 +55,22 @@ void FileSinkPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI->registerRxChannel(FileSink::m_channelIdURI, FileSink::m_channelId, this);
}
void FileSinkPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const
{
if (bs || cs)
{
FileSink *instance = new FileSink(deviceAPI);
if (bs) {
*bs = instance;
}
if (cs) {
*cs = instance;
}
}
}
#ifdef SERVER_MODE
PluginInstanceGUI* FileSinkPlugin::createRxChannelGUI(
DeviceUISet *deviceUISet,
@@ -69,16 +85,6 @@ PluginInstanceGUI* FileSinkPlugin::createRxChannelGUI(DeviceUISet *deviceUISet,
}
#endif
BasebandSampleSink* FileSinkPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const
{
return new FileSink(deviceAPI);
}
ChannelAPI* FileSinkPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const
{
return new FileSink(deviceAPI);
}
ChannelWebAPIAdapter* FileSinkPlugin::createChannelWebAPIAdapter() const
{
return new FileSinkWebAPIAdapter();