Interface VideoThumbnail


public interface VideoThumbnail
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isVideo(javax.activation.MimeType mimeType)
    Test if a specific mime-type is supported for thumbnail extraction.
    Optional<byte[]>
    videoThumbnail(File file, javax.activation.MimeType mimeType)
    Extract a thumnail from a video file.
  • Method Details

    • videoThumbnail

      Optional<byte[]> videoThumbnail(File file, javax.activation.MimeType mimeType) throws IOException, InterruptedException
      Extract a thumnail from a video file. If mimeType is not video (isVideo(MimeType)), then returns Optional.empty(). If thumbnail extraction fails, then throws an exception. The returned byte array is intended for Metacard#getThumbnail.
      Throws:
      IOException
      InterruptedException
    • isVideo

      boolean isVideo(javax.activation.MimeType mimeType)
      Test if a specific mime-type is supported for thumbnail extraction. This allows clients to skip expensive setup requirements before calling videoThumbnail(File, MimeType).

      TODO should this method be changed to isSupported and define it to include other processing requirements such as file size limits?