Interface VideoRecorder

All Known Implementing Classes:
GifVideoRecorder, ImageVideoRecorder, ScratchVideoRecorder, XuggleVideoRecorder

public interface VideoRecorder
This defines methods for creating a video from a series of images.
Version:
1.0
Author:
Douglas Brown
  • Method Details

    • createVideo

      void createVideo() throws IOException
      Creates a new video to which frames can be added.
      Throws:
      IOException
    • createVideo

      void createVideo(String fileName) throws IOException
      Creates a new video with the specified file name.
      Parameters:
      fileName - name of the file to which the video will be written
      Throws:
      IOException
    • createVideo

      void createVideo(String fileName, String trkPath) throws IOException
      Creates a new video with the specified file name.
      Parameters:
      fileName - name of the file to which the video will be written
      Throws:
      IOException
    • setSize

      void setSize(Dimension dimension)
      Sets the size of the video.
      Parameters:
      dimension - the dimensions of the new video
    • setFrameDuration

      void setFrameDuration(double millis)
      Sets the time duration per frame for subsequent added frames.
      Parameters:
      millis - the duration per frame in milliseconds
    • addFrame

      void addFrame(Image image) throws IOException
      Adds a video frame to the current video.
      Parameters:
      image - the image to be drawn on the video frame.
      Throws:
      IOException
    • getVideo

      Video getVideo() throws IOException
      Gets the current video. Ends editing.
      Returns:
      the active video as a Video object
      Throws:
      IOException
    • saveVideo

      String saveVideo() throws IOException
      Saves the video to the current file.
      Returns:
      the full path of the saved file
      Throws:
      IOException
    • saveVideo

      String saveVideo(String fileName) throws IOException
      Saves the video to the specified file.
      Parameters:
      fileName - the file name to be saved
      Returns:
      the full path of the saved file
      Throws:
      IOException
    • saveVideoAs

      String saveVideoAs() throws IOException
      Saves the video to a file selected with a chooser.
      Returns:
      the full path of the saved file
      Throws:
      IOException
    • getFileName

      String getFileName()
      Gets the current file name. May be null.
      Returns:
      the path of the current destination video file
    • setFileName

      void setFileName(String path)
      Sets the file name. May be null.
      Parameters:
      path - the file name
    • reset

      void reset()
      Discards the current video and resets the recorder to a ready state.
    • getCodec

      String getCodec()