Package org.opensourcephysics.media.core
Interface VideoType
- All Known Implementing Classes:
GifVideoType
,ImageVideoType
,JSMovieVideoType
,MovieVideoType
,VideoIO.ZipImageVideoType
,XuggleMovieVideoType
public interface VideoType
This defines methods common to all video types.
- Version:
- 1.0
- Author:
- Douglas Brown
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault String
default boolean
Checks to see if this file fits this type based on file extension.boolean
Reports whether this type can record videosGets the default extension for this type.Gets the default file filter for this type.Gets the name/description of this type.Gets the file filters for this type.Gets a video recorder.Gets the short name of the video type.default Video
Opens a new video with the specified name from a video file opening or dropping.getVideo
(String path, String basePath, XMLControl control) Create a Video object from a file drop, file open, or TRK or TRZ file.default XMLControl
getVideoControlForExportOnly
(String videoTarget, String vidDir, XMLControl clipXMLControl) boolean
Return true if the specified video is this type.
-
Field Details
-
TYPE_GIF
- See Also:
-
TYPE_IMAGE
- See Also:
-
-
Method Details
-
getVideo
Opens a new video with the specified name from a video file opening or dropping.- Parameters:
path
- the path to the videobasePath
-- Returns:
- the new video
-
getVideoControlForExportOnly
default XMLControl getVideoControlForExportOnly(String videoTarget, String vidDir, XMLControl clipXMLControl) -
getVideo
Create a Video object from a file drop, file open, or TRK or TRZ file. Also called with non-null basePath from ExportZipDialog.Export.modifyControlForClip- Parameters:
path
-basePath
-control
-- Returns:
-
isType
Return true if the specified video is this type.- Parameters:
video
- the video- Returns:
- true if the video is this type
-
getRecorder
VideoRecorder getRecorder()Gets a video recorder. Returns null if canRecord() is false.- Returns:
- the video recorder
-
canRecord
boolean canRecord()Reports whether this type can record videos- Returns:
- true if this can record videos
-
getDescription
String getDescription()Gets the name/description of this type.- Returns:
- a description
-
getDefaultExtension
String getDefaultExtension()Gets the default extension for this type.- Returns:
- a description
-
getFileFilters
VideoFileFilter[] getFileFilters()Gets the file filters for this type.- Returns:
- array of file filters
-
getDefaultFileFilter
VideoFileFilter getDefaultFileFilter()Gets the default file filter for this type. May return null.- Returns:
- the default file filter
-
getTypeName
String getTypeName()Gets the short name of the video type.- Returns:
- the type name
-
accepts
Checks to see if this file fits this type based on file extension.- Parameters:
file
-- Returns:
-
_toString
-