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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user