1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -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
@@ -54,6 +54,22 @@ void RemoteSourcePlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI->registerTxChannel(RemoteSource::m_channelIdURI, RemoteSource::m_channelId, this);
}
void RemoteSourcePlugin::createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const
{
if (bs || cs)
{
RemoteSource *instance = new RemoteSource(deviceAPI);
if (bs) {
*bs = instance;
}
if (cs) {
*cs = instance;
}
}
}
#ifdef SERVER_MODE
PluginInstanceGUI* RemoteSourcePlugin::createTxChannelGUI(
DeviceUISet *deviceUISet,
@@ -68,16 +84,6 @@ PluginInstanceGUI* RemoteSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUIS
}
#endif
BasebandSampleSource* RemoteSourcePlugin::createTxChannelBS(DeviceAPI *deviceAPI) const
{
return new RemoteSource(deviceAPI);
}
ChannelAPI* RemoteSourcePlugin::createTxChannelCS(DeviceAPI *deviceAPI) const
{
return new RemoteSource(deviceAPI);
}
ChannelWebAPIAdapter* RemoteSourcePlugin::createChannelWebAPIAdapter() const
{
return new RemoteSourceWebAPIAdapter();