mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-07-26 03:54:30 -04:00
Replace separate create channel methods (BS and CS): common plugins
This commit is contained in:
@@ -56,6 +56,22 @@ void RemoteSinkPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(RemoteSink::m_channelIdURI, RemoteSink::m_channelId, this);
|
||||
}
|
||||
|
||||
void RemoteSinkPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const
|
||||
{
|
||||
if (bs || cs)
|
||||
{
|
||||
RemoteSink *instance = new RemoteSink(deviceAPI);
|
||||
|
||||
if (bs) {
|
||||
*bs = instance;
|
||||
}
|
||||
|
||||
if (cs) {
|
||||
*cs = instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SERVER_MODE
|
||||
PluginInstanceGUI* RemoteSinkPlugin::createRxChannelGUI(
|
||||
DeviceUISet *deviceUISet,
|
||||
@@ -70,16 +86,6 @@ PluginInstanceGUI* RemoteSinkPlugin::createRxChannelGUI(DeviceUISet *deviceUISet
|
||||
}
|
||||
#endif
|
||||
|
||||
BasebandSampleSink* RemoteSinkPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new RemoteSink(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelAPI* RemoteSinkPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new RemoteSink(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelWebAPIAdapter* RemoteSinkPlugin::createChannelWebAPIAdapter() const
|
||||
{
|
||||
return new RemoteSinkWebAPIAdapter();
|
||||
|
||||
Reference in New Issue
Block a user