Search in sources :

Example 1 with StreamShutdownException

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;
    });
}
Also used : StreamShutdownException(org.codice.alliance.video.stream.mpegts.plugins.StreamShutdownException) Security(org.codice.ddf.security.common.Security)

Aggregations

StreamShutdownException (org.codice.alliance.video.stream.mpegts.plugins.StreamShutdownException)1 Security (org.codice.ddf.security.common.Security)1