use of org.codice.alliance.video.stream.mpegts.plugins.StreamShutdownException in project alliance by codice.
the class UdpStreamProcessor method shutdown.
/**
* Shutdown the stream processor. Attempts to flush and ingest any partial stream data regardless
* of IDR boundaries.
*/
public void shutdown() {
LOGGER.trace("Shutting down stream processor.");
packetBuffer.cancelTimer();
Security security = Security.getInstance();
security.runAsAdmin(() -> {
if (streamCreationSubject == null) {
streamCreationSubject = security.getSystemSubject();
}
streamCreationSubject.execute(() -> {
try {
streamShutdownPlugin.onShutdown(context);
} catch (StreamShutdownException e) {
LOGGER.debug("unable to run stream shutdown plugin", e);
}
return null;
});
return null;
});
}
Aggregations