Package ddf.video.thumbnail
Interface VideoThumbnail
public interface VideoThumbnail
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisVideo(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 forMetacard#getThumbnail.- Throws:
IOExceptionInterruptedException
-
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 callingvideoThumbnail(File, MimeType).TODO should this method be changed to isSupported and define it to include other processing requirements such as file size limits?
-