1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 06:04:39 -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 UDPSourcePlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI->registerTxChannel(UDPSource::m_channelIdURI, UDPSource::m_channelId, this);
}
void UDPSourcePlugin::createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const
{
if (bs || cs)
{
UDPSource *instance = new UDPSource(deviceAPI);
if (bs) {
*bs = instance;
}
if (cs) {
*cs = instance;
}
}
}
#ifdef SERVER_MODE
PluginInstanceGUI* UDPSourcePlugin::createTxChannelGUI(
DeviceUISet *deviceUISet,
@@ -71,16 +87,6 @@ PluginInstanceGUI* UDPSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUISet,
}
#endif
BasebandSampleSource* UDPSourcePlugin::createTxChannelBS(DeviceAPI *deviceAPI) const
{
return new UDPSource(deviceAPI);
}
ChannelAPI* UDPSourcePlugin::createTxChannelCS(DeviceAPI *deviceAPI) const
{
return new UDPSource(deviceAPI);
}
ChannelWebAPIAdapter* UDPSourcePlugin::createChannelWebAPIAdapter() const
{
return new UDPSourceWebAPIAdapter();