1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-04 23:14:47 -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 77955d4dba
commit ef65afea02
52 changed files with 444 additions and 314 deletions
+16 -10
View File
@@ -57,6 +57,22 @@ void BFMPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI->registerRxChannel(BFMDemod::m_channelIdURI, BFMDemod::m_channelId, this);
}
void BFMPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const
{
if (bs || cs)
{
BFMDemod *instance = new BFMDemod(deviceAPI);
if (bs) {
*bs = instance;
}
if (cs) {
*cs = instance;
}
}
}
#ifdef SERVER_MODE
PluginInstanceGUI* BFMPlugin::createRxChannelGUI(
DeviceUISet *deviceUISet,
@@ -71,16 +87,6 @@ PluginInstanceGUI* BFMPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, Baseb
}
#endif
BasebandSampleSink* BFMPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const
{
return new BFMDemod(deviceAPI);
}
ChannelAPI* BFMPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const
{
return new BFMDemod(deviceAPI);
}
ChannelWebAPIAdapter* BFMPlugin::createChannelWebAPIAdapter() const
{
return new BFMDemodWebAPIAdapter();