|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectscenic.show.SimpleMediaFile
public class SimpleMediaFile
This class offers an easy to use interface for playing videos. The video is not displayed directly on the screen. Instead the video is written in to an image that can be used as any other image. Currently this class is only implemented on Windows using DirectShow and QuickTime. On Linux the class does nothing.
| Constructor Summary | |
|---|---|
SimpleMediaFile(java.lang.String filename)
Creates a media player with the given media file. |
|
| Method Summary | |
|---|---|
void |
free()
Frees the resources associated with this object. |
double |
getCurrentPosition()
Returns the current position. |
ScenicImage |
getImage()
Returns the image that contains the video. |
double |
getLength()
Returns the length of the video file. |
ImageInfo[] |
getOutputFormats()
Returns the available output formats. |
void |
pause()
Pauses the video. |
void |
play()
Starts playing the video. |
void |
setCurrentPosition(double position)
Sets the current position. |
void |
setOutputFormat(int width,
int height,
int format)
Sets the desired output format. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleMediaFile(java.lang.String filename)
filename - Name of the media file.| Method Detail |
|---|
public void free()
public ScenicImage getImage()
public void play()
public void pause()
public double getCurrentPosition()
public void setCurrentPosition(double position)
position - The new position in seconds.public double getLength()
public void setOutputFormat(int width,
int height,
int format)
width - width of the imageheight - height of the imageformat - format of the imagepublic ImageInfo[] getOutputFormats()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||