Class MovieFactory

java.lang.Object
org.opensourcephysics.media.mov.MovieFactory

public class MovieFactory extends Object
A factory class to manage movie engines
Author:
hansonr
  • Field Details

    • ENGINE_NONE

      public static final String ENGINE_NONE
      See Also:
    • ENGINE_JS

      public static final String ENGINE_JS
      See Also:
    • ENGINE_XUGGLE

      public static final String 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 dimension
      sourcePath - movie video source
      thumbPath - path of the newly created thumbnail
      Returns:
      the thumbnail file, or null if failed
    • getMovieEngineName

      public static String getMovieEngineName(boolean forDialog)
      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

      public static String[] getUpdatedVideoEngines()
      Updates video engine files if available
      Returns:
      array of video engine names that were updated. May return null.
    • showAbout

      public static void showAbout(String engineName, String requester)
      Show an About dialog for a video engine
      Parameters:
      engineName - one of the allowed engine names
      requester - name of a requestor. May be null.