Stop recording: ffmpeg finishes the file. The window's time goes on
from where the video was, on the wall clock again. frames: the
frames written. Returns false if not recording or if the recording
failed (ffmpeg's messages are on the standard error).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(WindowProxy), | intent(inout) | :: | self | |||
| integer(kind=int64), | intent(out), | optional | :: | frames |
frames written to the video |
logical function stop_recording(self, frames) result(ok) class(WindowProxy), intent(inout) :: self integer(int64), intent(out), optional :: frames !! frames written to the video integer(c_long_long) :: n real(wp) :: shift ok = .false. if (present(frames)) frames = 0_int64 if (.not. self%recording_) return n = -1 if (c_associated(self%viewer_)) n = vkf_viewer_record_stop(self%viewer_) shift = wall_time() - window_wall(self) self%recording_ = .false. if (.not. associated(self%clock_%synchronized_to())) call self%clock_%set_time(self%clock_%time()) if (self%flight%active) self%flight%started = self%flight%started + shift ok = n >= 0 if (present(frames)) frames = max(0_c_long_long, n) end function stop_recording