mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
#66 resolves issue with baseband recorders and loggers not being removed from channel processing chains when processing stops. This is now handled in the channel processing manager where baseband recorders and message/event loggers are added at processing start and removed at processing stop.
This commit is contained in:
@@ -218,8 +218,7 @@ public class ChannelProcessingManager implements ChannelEventListener
|
||||
}
|
||||
|
||||
/* Setup event logging */
|
||||
List<Module> loggers = mEventLogManager.getLoggers(
|
||||
channel.getEventLogConfiguration(), channel.getName());
|
||||
List<Module> loggers = mEventLogManager.getLoggers(channel.getEventLogConfiguration(), channel.getName());
|
||||
|
||||
if (!loggers.isEmpty())
|
||||
{
|
||||
@@ -232,19 +231,15 @@ public class ChannelProcessingManager implements ChannelEventListener
|
||||
if (!recorders.isEmpty())
|
||||
{
|
||||
/* Add baseband recorder */
|
||||
if ((recorders.contains(RecorderType.BASEBAND) &&
|
||||
channel.getChannelType() == ChannelType.STANDARD))
|
||||
if ((recorders.contains(RecorderType.BASEBAND) && channel.getChannelType() == ChannelType.STANDARD))
|
||||
{
|
||||
processingChain.addModule(mRecorderManager.getBasebandRecorder(
|
||||
channel.toString()));
|
||||
processingChain.addModule(mRecorderManager.getBasebandRecorder(channel.toString()));
|
||||
}
|
||||
|
||||
/* Add traffic channel baseband recorder */
|
||||
if (recorders.contains(RecorderType.TRAFFIC_BASEBAND) &&
|
||||
channel.getChannelType() == ChannelType.TRAFFIC)
|
||||
if (recorders.contains(RecorderType.TRAFFIC_BASEBAND) && channel.getChannelType() == ChannelType.TRAFFIC)
|
||||
{
|
||||
processingChain.addModule(mRecorderManager
|
||||
.getBasebandRecorder(channel.toString()));
|
||||
processingChain.addModule(mRecorderManager.getBasebandRecorder(channel.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,9 +270,14 @@ public class ChannelProcessingManager implements ChannelEventListener
|
||||
|
||||
if (mProcessingChains.containsKey(channel.getChannelID()))
|
||||
{
|
||||
ProcessingChain chain = mProcessingChains.get(channel.getChannelID());
|
||||
ProcessingChain processingChain = mProcessingChains.get(channel.getChannelID());
|
||||
|
||||
processingChain.stop();
|
||||
|
||||
processingChain.removeEventLoggingModules();
|
||||
|
||||
processingChain.removeRecordingModules();
|
||||
|
||||
chain.stop();
|
||||
|
||||
mChannelModel.broadcast(new ChannelEvent(channel, Event.NOTIFICATION_PROCESSING_STOP));
|
||||
|
||||
@@ -285,7 +285,7 @@ public class ChannelProcessingManager implements ChannelEventListener
|
||||
{
|
||||
mProcessingChains.remove(channel.getChannelID());
|
||||
|
||||
chain.dispose();
|
||||
processingChain.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user