org.opensourcephysics.media.xuggle
Class XuggleVideoType

java.lang.Object
  extended by org.opensourcephysics.media.xuggle.XuggleVideoType
All Implemented Interfaces:
VideoType

public class XuggleVideoType
extends java.lang.Object
implements VideoType

This implements the VideoType interface with a Xuggle type.

Version:
1.0
Author:
Douglas Brown

Field Summary
protected static java.beans.PropertyChangeListener errorListener
           
protected static boolean isXuggleAvailable
           
protected  boolean recordable
           
protected static java.lang.String xuggleClass
           
protected static java.util.TreeSet<VideoFileFilter> xuggleFileFilters
           
 
Constructor Summary
XuggleVideoType()
          Constructor attempts to load a xuggle class the first time used.
XuggleVideoType(VideoFileFilter filter)
          Constructor with a file filter for a specific container type.
 
Method Summary
 boolean canRecord()
          Reports whether this xuggle type can record videos
 java.lang.String getDefaultExtension()
          Gets the default extension for this type.
 VideoFileFilter getDefaultFileFilter()
          Gets the default file filter for this type.
 java.lang.String getDescription()
          Gets the name and/or description of this type.
 VideoFileFilter[] getFileFilters()
          Gets the file filters for this type.
 VideoRecorder getRecorder()
          Gets a Xuggle video recorder.
 Video getVideo(java.lang.String name)
          Opens a named video as a XuggleVideo.
 boolean isType(Video video)
          Return true if the specified video is this type.
 void setRecordable(boolean record)
          Sets the recordable property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xuggleFileFilters

protected static java.util.TreeSet<VideoFileFilter> xuggleFileFilters

xuggleClass

protected static java.lang.String xuggleClass

errorListener

protected static java.beans.PropertyChangeListener errorListener

isXuggleAvailable

protected static boolean isXuggleAvailable

recordable

protected boolean recordable
Constructor Detail

XuggleVideoType

public XuggleVideoType()
Constructor attempts to load a xuggle class the first time used. This will throw an error if xuggle is not available.


XuggleVideoType

public XuggleVideoType(VideoFileFilter filter)
Constructor with a file filter for a specific container type.

Parameters:
filter - the file filter
Method Detail

getVideo

public Video getVideo(java.lang.String name)
Opens a named video as a XuggleVideo.

Specified by:
getVideo in interface VideoType
Parameters:
name - the name of the video
Returns:
a new Xuggle video

canRecord

public boolean canRecord()
Reports whether this xuggle type can record videos

Specified by:
canRecord in interface VideoType
Returns:
true by default (set recordable to change)

setRecordable

public void setRecordable(boolean record)
Sets the recordable property

Parameters:
record - true if recordable

getRecorder

public VideoRecorder getRecorder()
Gets a Xuggle video recorder.

Specified by:
getRecorder in interface VideoType
Returns:
the video recorder

getFileFilters

public VideoFileFilter[] getFileFilters()
Gets the file filters for this type.

Specified by:
getFileFilters in interface VideoType
Returns:
an array of file filters

getDefaultFileFilter

public VideoFileFilter getDefaultFileFilter()
Gets the default file filter for this type. May return null.

Specified by:
getDefaultFileFilter in interface VideoType
Returns:
the default file filter

isType

public boolean isType(Video video)
Return true if the specified video is this type.

Specified by:
isType in interface VideoType
Parameters:
video - the video
Returns:
true if the video is this type

getDescription

public java.lang.String getDescription()
Gets the name and/or description of this type.

Specified by:
getDescription in interface VideoType
Returns:
a description

getDefaultExtension

public java.lang.String getDefaultExtension()
Gets the default extension for this type.

Specified by:
getDefaultExtension in interface VideoType
Returns:
an extension