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