Search in sources :

Example 1 with DisplayUpdate

use of co.videofirst.vft.capture.model.display.DisplayUpdate in project vft-capture by videofirst.

the class DefaultCaptureService method record.

@Override
public CaptureStatus record() {
    if (captureStatus.getState() != CaptureState.started) {
        throw new InvalidStateException("Current state is '" + captureStatus.getState() + "' - " + "video can only be recoded when state is  'started'.");
    }
    DisplayUpdate displayUpdate = getDisplayUpdate();
    captureStatus = captureStatus.record(displayUpdate.getCapture());
    videoRecorder.record(getVideoRecord());
    refreshDisplay();
    return status();
}
Also used : InvalidStateException(co.videofirst.vft.capture.exception.InvalidStateException) DisplayUpdate(co.videofirst.vft.capture.model.display.DisplayUpdate)

Example 2 with DisplayUpdate

use of co.videofirst.vft.capture.model.display.DisplayUpdate in project vft-capture by videofirst.

the class DefaultCaptureService method refreshDisplay.

/**
 * Refresh display.
 */
private void refreshDisplay() {
    DisplayUpdate displayUpdate = getDisplayUpdate();
    displayService.update(displayUpdate, captureStatus);
}
Also used : DisplayUpdate(co.videofirst.vft.capture.model.display.DisplayUpdate)

Aggregations

DisplayUpdate (co.videofirst.vft.capture.model.display.DisplayUpdate)2 InvalidStateException (co.videofirst.vft.capture.exception.InvalidStateException)1