Ensuring live recording output completes when shutting down the server
I am currently writing a server side module to do live recording. When I shutdown the server in the middle of a live recording, the last "segment" of the live recording is incomplete (the .tmp file remains).
Is there a way to ensure that the last segment recorded can finish writing to file properly so that it is playable?
By shutdown of the server, I mean stopping the eclipse debugger, or closing the "console" window if I used the startup.bat in the [install-dir]/bin folder.
I was looking at calling vhost.getLiveStreamRecordManager().stopRecording(appInstance);
in the onServerShutdownStart(IServer) or onServerShutdownComplete(IServer) event listeners for IServerNotify3 to ensure the recording is stopped before shutdown. Would this work? If so, how could I get reference to the appInstance and vhost from the IServerNotify3 event listeners?