|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
dlife.vision.VideoSource
public abstract class VideoSource
A VideoSource provides BufferedImages captured from some video source and methods for controlling the flow of video (e.g. play/stop etc...). There may be VideoSource implementations for movie files, live Internet streams, single images, collections of images, etc...
Each time a new frame of video is available the VideoSource notifies all of its Observers. In practice the Camera that was created using the VideoSource will be the Observer on the VideoSource. When notified the Camera handles everything necessary to filter and display the image.
| Field Summary | |
|---|---|
protected boolean |
loop
|
| Constructor Summary | |
|---|---|
VideoSource()
Construct a new VideoSource. |
|
| Method Summary | |
|---|---|
abstract boolean |
canLoop()
Returns true if this VideoSource can be repeated in a loop. |
abstract boolean |
canPause()
Returns true if this VideoSource can, in its current state, be paused. |
abstract boolean |
canPlay()
Returns true if this VideoSource can, in its current state, be played. |
abstract boolean |
canRewind()
Returns true if this VideoSource can, in its current state, be rewound. |
abstract boolean |
canSeek()
Returns true if this VideoSource, in its current state, can seek (i.e. |
abstract boolean |
canStepBackward()
Returns true if this VideoSource can, in its current state, be rewound frame by frame. |
abstract boolean |
canStepForward()
Returns true if this VideoSource can, in its current state, be advanced frame by frame. |
abstract void |
connect()
Perform the steps necessary to connect this VideoSource. |
abstract void |
disconnect()
Perform the steps necessary to disconnect this VideoSource. |
abstract VideoSourceGUI |
getGUI()
Get the VideoPlayerGUI that will control the VideoSource. |
abstract int |
getHeight()
Get the height of the video associated with this VideoSource. |
abstract int |
getSeekLocation()
Get the current seek location of this VideoSource. |
abstract BufferedImage |
getVideoFrame()
Returns a BufferedImage containing the most recent frame of video from the VideoSource. |
abstract int |
getWidth()
Get the width of the video associated with this VideoSource. |
boolean |
isLooping()
Returns true or false indicating whether or not this VideoSource is currently set to loop or not. |
abstract void |
pause()
Stops this VideoSource. |
abstract void |
play()
Starts this VideoSource. |
abstract void |
rewind()
Rewinds this VideoSource. |
abstract void |
seek(int location)
Seek this VideoSource to the specified location. |
boolean |
setLoop(boolean loop)
Set this VideoSource to loop if it is able to be looped. |
abstract void |
stepBackward()
Steps this VideoSource one frame backward. |
abstract void |
stepForward()
Steps this VideoSource one frame forward. |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean loop
| Constructor Detail |
|---|
public VideoSource()
| Method Detail |
|---|
public abstract void connect()
throws VideoSourceConnectionException
VideoSourceConnectionException - if unable to connect the
VideoSource.
public abstract void disconnect()
throws VideoSourceConnectionException
VideoSourceConnectionException - if unable to disconnect the
VideoSource.public abstract VideoSourceGUI getGUI()
public abstract BufferedImage getVideoFrame()
public abstract void play()
public abstract void pause()
public abstract void rewind()
public abstract void stepForward()
public abstract void stepBackward()
public abstract void seek(int location)
location - the location to which to seek.public abstract int getSeekLocation()
public boolean setLoop(boolean loop)
This method invokes canLoop to check if the VideoSource can be looped. If it can it is set to loop or not depending upon the parameter value. If this VideoSource cannot loop then it is set to not loop.
loop - indicates whether the VideoSource should loop.
public boolean isLooping()
public abstract boolean canPlay()
public abstract boolean canPause()
public abstract boolean canRewind()
public abstract boolean canStepForward()
public abstract boolean canStepBackward()
public abstract boolean canLoop()
public abstract boolean canSeek()
public abstract int getWidth()
public abstract int getHeight()
|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||