I
- public abstract class AnimatedVideo<I extends Image<?,I>> extends Video<I>
Constructor and Description |
---|
AnimatedVideo(I blankFrame)
Default video constructor with a rate of 30 fps using the given image as
a basis.
|
AnimatedVideo(I blankFrame,
double fps)
Default video constructor with the given rate using the given image as a
basis.
|
Modifier and Type | Method and Description |
---|---|
long |
countFrames()
Return the number of frames in the whole video.
|
I |
getCurrentFrame()
Get the current frame
|
double |
getFPS()
Get the frame rate
|
int |
getHeight()
Get the height of the video frame.
|
I |
getNextFrame()
Get the next frame.
|
long |
getTimeStamp()
Get the timestamp of the current frame in milliseconds
|
int |
getWidth()
Get the width of the video frame
|
boolean |
hasNextFrame()
Returns whether this video has another frame to provide.
|
protected void |
init()
Called by the constructor.
|
void |
reset()
Reset the video - putting the frame counter back to the start.
|
protected abstract void |
updateNextFrame(I frame) |
close, getCurrentFrameIndex, iterator, seek, setCurrentFrameIndex
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public AnimatedVideo(I blankFrame)
blankFrame
- blank video frame to pass to the update methodpublic AnimatedVideo(I blankFrame, double fps)
blankFrame
- blank video frame to pass to the update methodfps
- the frame rateprotected abstract void updateNextFrame(I frame)
public I getNextFrame()
Video
getNextFrame
in class Video<I extends Image<?,I>>
public I getCurrentFrame()
Video
getCurrentFrame
in class Video<I extends Image<?,I>>
public int getWidth()
Video
public int getHeight()
Video
public long getTimeStamp()
Video
getTimeStamp
in class Video<I extends Image<?,I>>
public boolean hasNextFrame()
Video
hasNextFrame
in class Video<I extends Image<?,I>>
public long countFrames()
Video
countFrames
in class Video<I extends Image<?,I>>
public void reset()
Video
protected void init()