1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-11 13:24:19 -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
@@ -56,6 +56,22 @@ void DSDDemodPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI->registerRxChannel(DSDDemod::m_channelIdURI, DSDDemod::m_channelId, this);
}
void DSDDemodPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const
{
if (bs || cs)
{
DSDDemod *instance = new DSDDemod(deviceAPI);
if (bs) {
*bs = instance;
}
if (cs) {
*cs = instance;
}
}
}
#ifdef SERVER_MODE
PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI(
DeviceUISet *deviceUISet,
@@ -70,16 +86,6 @@ PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet,
}
#endif
BasebandSampleSink* DSDDemodPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const
{
return new DSDDemod(deviceAPI);
}
ChannelAPI* DSDDemodPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const
{
return new DSDDemod(deviceAPI);
}
ChannelWebAPIAdapter* DSDDemodPlugin::createChannelWebAPIAdapter() const
{
return new DSDDemodWebAPIAdapter();