writeVideo
Triggers a poll of the inputSurface to save any new frames to the video.
Parameters
endOfStream
Signals that this is the end of the video stream, the video file is finalized and any further calls to this method will do nothing.