Search in sources :

Example 1 with VideoRecordException

use of co.videofirst.vft.capture.exception.VideoRecordException in project vft-capture by videofirst.

the class VideoRecorderMonte method record.

@Override
public void record(VideoRecord videoRecord) {
    try {
        this.videoRecord = videoRecord;
        DisplayCapture displayCapture = videoRecord.getCapture();
        Rectangle captureArea = new Rectangle(displayCapture.getX(), displayCapture.getY(), displayCapture.getWidth(), displayCapture.getHeight());
        screenRecorder = new EnhancedScreenRecorder(graphicsConfiguration, captureArea, fileFormat, screenFormat, mouseFormat, audioFormat, tempFolder);
        screenRecorder.start();
    } catch (IOException ioEx) {
        throw new VideoRecordException("Record exception when starting recording", ioEx);
    } catch (AWTException awtEx) {
        throw new VideoRecordException("Record exception when starting recording", awtEx);
    }
}
Also used : DisplayCapture(co.videofirst.vft.capture.model.display.DisplayCapture) VideoRecordException(co.videofirst.vft.capture.exception.VideoRecordException) Rectangle(java.awt.Rectangle) IOException(java.io.IOException) AWTException(java.awt.AWTException)

Aggregations

VideoRecordException (co.videofirst.vft.capture.exception.VideoRecordException)1 DisplayCapture (co.videofirst.vft.capture.model.display.DisplayCapture)1 AWTException (java.awt.AWTException)1 Rectangle (java.awt.Rectangle)1 IOException (java.io.IOException)1