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:
@@ -54,6 +54,22 @@ void FileSourcePlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerTxChannel(FileSource::m_channelIdURI, FileSource::m_channelId, this);
|
||||
}
|
||||
|
||||
void FileSourcePlugin::createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const
|
||||
{
|
||||
if (bs || cs)
|
||||
{
|
||||
FileSource *instance = new FileSource(deviceAPI);
|
||||
|
||||
if (bs) {
|
||||
*bs = instance;
|
||||
}
|
||||
|
||||
if (cs) {
|
||||
*cs = instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SERVER_MODE
|
||||
PluginInstanceGUI* FileSourcePlugin::createTxChannelGUI(
|
||||
DeviceUISet *deviceUISet,
|
||||
@@ -68,16 +84,6 @@ PluginInstanceGUI* FileSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUISet
|
||||
}
|
||||
#endif
|
||||
|
||||
BasebandSampleSource* FileSourcePlugin::createTxChannelBS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new FileSource(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelAPI* FileSourcePlugin::createTxChannelCS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new FileSource(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelWebAPIAdapter* FileSourcePlugin::createChannelWebAPIAdapter() const
|
||||
{
|
||||
return new FileSourceWebAPIAdapter();
|
||||
|
||||
Reference in New Issue
Block a user