|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.media.core.VideoAdapter
org.opensourcephysics.media.xuggle.XuggleVideo
public class XuggleVideo
A class to display videos using the Xuggle library. Xuggle in turn uses FFMpeg as its video engine.
| Field Summary |
|---|
| Fields inherited from class org.opensourcephysics.media.core.VideoAdapter |
|---|
aspects, bufferedImage, clearRaster, coords, endFrameNumber, filteredImage, filterStack, frameCount, frameNumber, isMeasured, isValidFilteredImage, isValidImage, isValidMeasure, looping, maxX, maxY, minX, minY, mouseEnabled, playing, properties, rate, rawImage, size, startFrameNumber, support, visible, widthDominates |
| Constructor Summary | |
|---|---|
XuggleVideo(java.lang.String fileName)
Creates a XuggleVideo and loads a video file specified by name |
|
| Method Summary | |
|---|---|
void |
dispose()
Disposes of this video. |
protected void |
finalize()
Called by the garbage collector when this video is no longer in use. |
double |
getDuration()
Gets the duration of the video. |
double |
getEndTime()
Gets the end frame time in milliseconds. |
double |
getFrameTime(int n)
Gets the start time of the specified frame in milliseconds. |
static XML.ObjectLoader |
getLoader()
Returns an XML.ObjectLoader to save and load XuggleVideo data. |
double |
getStartTime()
Gets the start frame time in milliseconds. |
double |
getTime()
Gets the current frame time in milliseconds. |
boolean |
isSmoothPlay()
Gets the playSmoothly flag. |
void |
play()
Plays the video at the current rate. |
void |
setEndTime(double millis)
Sets the end frame to (nearly) a desired time in milliseconds. |
void |
setFrameNumber(int n)
Sets the frame number. |
void |
setRate(double rate)
Sets the relative play rate. |
void |
setSmoothPlay(boolean smooth)
Sets the playSmoothly flag. |
void |
setStartTime(double millis)
Sets the start frame to (nearly) a desired time in milliseconds. |
void |
setTime(double millis)
Sets the frame number to (nearly) a desired time in milliseconds. |
void |
stop()
Stops the video. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XuggleVideo(java.lang.String fileName)
throws java.io.IOException
fileName - the name of the video file
java.io.IOException| Method Detail |
|---|
public void play()
play in interface Playableplay in class VideoAdapterpublic void stop()
stop in interface Playablestop in class VideoAdapterpublic void setFrameNumber(int n)
setFrameNumber in interface VideosetFrameNumber in class VideoAdaptern - the desired frame numberVideo.getStartFrameNumber(),
Video.getEndFrameNumber()public double getFrameTime(int n)
getFrameTime in interface VideogetFrameTime in class VideoAdaptern - the frame number
public double getTime()
getTime in interface PlayablegetTime in class VideoAdapterpublic void setTime(double millis)
setTime in interface PlayablesetTime in class VideoAdaptermillis - the desired time in millisecondspublic double getStartTime()
getStartTime in interface PlayablegetStartTime in class VideoAdapterpublic void setStartTime(double millis)
setStartTime in interface PlayablesetStartTime in class VideoAdaptermillis - the desired start time in millisecondspublic double getEndTime()
getEndTime in interface PlayablegetEndTime in class VideoAdapterpublic void setEndTime(double millis)
setEndTime in interface PlayablesetEndTime in class VideoAdaptermillis - the desired end time in millisecondspublic double getDuration()
getDuration in interface PlayablegetDuration in class VideoAdapterpublic void setRate(double rate)
setRate in interface PlayablesetRate in class VideoAdapterrate - the relative play rate.public void dispose()
dispose in interface Videodispose in class VideoAdapterpublic void setSmoothPlay(boolean smooth)
smooth - true to play smoothlypublic boolean isSmoothPlay()
protected void finalize()
finalize in class VideoAdapterpublic static XML.ObjectLoader getLoader()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||