Package org.opensourcephysics.media.mov
Class MovieFactory
java.lang.Object
org.opensourcephysics.media.mov.MovieFactory
A factory class to manage movie engines
- Author:
- hansonr
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic File
createThumbnailFile
(Dimension defaultThumbnailDimension, String sourcePath, String thumbPath) Creates a thumbnail file for a movie video.static String
getMovieEngineName
(boolean forDialog) Gets the name of the current movie engine.static String[]
Updates video engine files if availablestatic boolean
Determines if a movie engine is availablestatic void
Show an About dialog for a video enginestatic void
"Starts" the thumbnail tool (if present) by instantiating it by reflection.
-
Field Details
-
ENGINE_NONE
- See Also:
-
ENGINE_JS
- See Also:
-
ENGINE_XUGGLE
- See Also:
-
hadXuggleError
public static boolean hadXuggleError -
xuggleIsPresent
public static boolean xuggleIsPresent -
xuggleNeeds32bitVM
public static boolean xuggleNeeds32bitVM
-
-
Constructor Details
-
MovieFactory
public MovieFactory()
-
-
Method Details
-
createThumbnailFile
public static File createThumbnailFile(Dimension defaultThumbnailDimension, String sourcePath, String thumbPath) Creates a thumbnail file for a movie video.- Parameters:
defaultThumbnailDimension
- desired dimensionsourcePath
- movie video sourcethumbPath
- path of the newly created thumbnail- Returns:
- the thumbnail file, or null if failed
-
getMovieEngineName
Gets the name of the current movie engine.- Parameters:
forDialog
- if true, returns locale version of "none"- Returns:
- "Xuggle" or "JS" or "none" or Locale version of "none"
-
hasVideoEngine
public static boolean hasVideoEngine()Determines if a movie engine is available- Returns:
- true if available
-
startMovieThumbnailTool
public static void startMovieThumbnailTool()"Starts" the thumbnail tool (if present) by instantiating it by reflection. -
getUpdatedVideoEngines
Updates video engine files if available- Returns:
- array of video engine names that were updated. May return null.
-
showAbout
Show an About dialog for a video engine- Parameters:
engineName
- one of the allowed engine namesrequester
- name of a requestor. May be null.
-