T
- the image type of the framespublic abstract class Video<T extends Image<?,T>> extends Object implements Iterable<T>, Closeable
Modifier and Type | Field and Description |
---|---|
protected int |
currentFrame
The current frame being displayed
|
Constructor and Description |
---|
Video() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the video object
|
abstract long |
countFrames()
Return the number of frames in the whole video.
|
abstract T |
getCurrentFrame()
Get the current frame
|
int |
getCurrentFrameIndex()
Get the index of the current frame
|
abstract double |
getFPS()
Get the frame rate
|
abstract int |
getHeight()
Get the height of the video frame.
|
abstract T |
getNextFrame()
Get the next frame.
|
abstract long |
getTimeStamp()
Get the timestamp of the current frame in milliseconds
|
abstract int |
getWidth()
Get the width of the video frame
|
abstract boolean |
hasNextFrame()
Returns whether this video has another frame to provide.
|
Iterator<T> |
iterator() |
abstract void |
reset()
Reset the video - putting the frame counter back to the start.
|
void |
seek(double timestamp)
Seek the video to a given timestamp in SECONDS.
|
void |
setCurrentFrameIndex(long newFrame)
Set the current frame index (i.e.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
protected int currentFrame
public Video()
public abstract T getNextFrame()
public abstract T getCurrentFrame()
public abstract int getWidth()
public abstract int getHeight()
public abstract long getTimeStamp()
public abstract double getFPS()
public int getCurrentFrameIndex()
public void setCurrentFrameIndex(long newFrame)
newFrame
- the new indexpublic void seek(double timestamp)
timestamp
- public abstract boolean hasNextFrame()
public abstract long countFrames()
public abstract void reset()
public void close()
close
in interface Closeable
close
in interface AutoCloseable