org.opensourcephysics.tools
Class DiagnosticsForXuggle

java.lang.Object
  extended by org.opensourcephysics.tools.DiagnosticsForXuggle

public class DiagnosticsForXuggle
extends java.lang.Object

Checks to see if Xuggle is installed and working.

Version:
1.0
Author:
Wolfgang Christian, Douglas Brown

Field Summary
static java.lang.String XUGGLE_URL
           
 
Method Summary
static void aboutXuggle()
          Displays the About Xuggle dialog.
static void aboutXuggle(java.lang.String request)
          Displays the About Xuggle dialog for Tracker or other requester.
static java.lang.String[] getDiagnosticMessage(int status, java.lang.String requester)
          Gets a diagnostic message when Xuggle is not working.
static java.io.File[] getJavaExtensionJars()
          Gets the xuggle jar files (named in xuggleJarNames) found in the current Java extension directory.
static int getStatusCode()
          Gets a status code that identifies the current state of the Xuggle video engine.
static java.io.File[] getXuggleJarFiles(java.lang.String dir)
          Gets the xuggle jar files (named in xuggleJarNames) found in a given directory.
static java.lang.String[] getXuggleJarNames()
          Gets the xuggle jar names.
static java.lang.String getXuggleVersion()
          Gets the Xuggle version as a String.
static void main(java.lang.String[] args)
          Tests this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XUGGLE_URL

public static final java.lang.String XUGGLE_URL
See Also:
Constant Field Values
Method Detail

aboutXuggle

public static void aboutXuggle()
Displays the About Xuggle dialog. If working correctly, shows version, etc. If not working, shows a diagnostic message.


aboutXuggle

public static void aboutXuggle(java.lang.String request)
Displays the About Xuggle dialog for Tracker or other requester.

Parameters:
request - currently only "Tracker" is supported

getXuggleJarFiles

public static java.io.File[] getXuggleJarFiles(java.lang.String dir)
Gets the xuggle jar files (named in xuggleJarNames) found in a given directory. Always returns the array, but individual elements may be null.

Parameters:
dir - the directory
Returns:
the array of jar files found

getXuggleJarNames

public static java.lang.String[] getXuggleJarNames()
Gets the xuggle jar names.

Returns:
an array of jar names

getJavaExtensionJars

public static java.io.File[] getJavaExtensionJars()
Gets the xuggle jar files (named in xuggleJarNames) found in the current Java extension directory. Always returns the array, but individual elements may be null.

Returns:
the array of jar files found

getStatusCode

public static int getStatusCode()
Gets a status code that identifies the current state of the Xuggle video engine. Codes are: 0 working correctly 1 not installed (XUGGLE_HOME==null, incomplete xuggle jars in current java extensions directory) 2 needs reboot/login? (XUGGLE_HOME==null, complete xuggle jars in current java extensions directory) 3 XUGGLE_HOME defined but incomplete xuggle jars in xuggle home 4 XUGGLE_HOME complete, but incorrect "PATH", "DYLD_LIBRARY_PATH", or "LD_LIBRARY_PATH" 5 XUGGLE_HOME complete, but missing xuggle jars in current java extensions directory 6 XUGGLE_HOME complete, but mismatched xuggle-xuggler.jar in current java extensions directory 7 XUGGLE_HOME complete, but wrong Java VM bitness -1 none of the above

Returns:
status code

getDiagnosticMessage

public static java.lang.String[] getDiagnosticMessage(int status,
                                                      java.lang.String requester)
Gets a diagnostic message when Xuggle is not working.

Parameters:
status - the status code from getStatusCode() method
Returns:
an array strings containing the message lines

getXuggleVersion

public static java.lang.String getXuggleVersion()
Gets the Xuggle version as a String. Returns "Unknown' if Xuggle is missing or unidentified.

Returns:
Xuggle version

main

public static void main(java.lang.String[] args)
Tests this class.

Parameters:
args - ignored