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