T - the image type of the framespublic class ArrayBackedVideo<T extends Image<?,T>> extends Video<T>
currentFrame| Modifier | Constructor and Description |
|---|---|
protected |
ArrayBackedVideo()
Default constructor for creating array backed videos with no frames for
subclasses.
|
|
ArrayBackedVideo(T[] frames)
Construct a video from the provided frames.
|
|
ArrayBackedVideo(T[] frames,
double fps)
Construct a video from the provided frames.
|
|
ArrayBackedVideo(T[] frames,
double fps,
boolean loop)
Construct a video from the provided frames.
|
| Modifier and Type | Method and Description |
|---|---|
long |
countFrames()
Return the number of frames in the whole video.
|
T |
getCurrentFrame()
Get the current frame
|
double |
getFPS()
Get the frame rate
|
int |
getHeight()
Get the height of the video frame.
|
T |
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.
|
void |
reset()
Reset the video - putting the frame counter back to the start.
|
void |
setCurrentFrameIndex(long newFrame)
Set the current frame index (i.e.
|
close, getCurrentFrameIndex, iterator, seekclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorprotected ArrayBackedVideo()
public ArrayBackedVideo(T[] frames)
frames - the framespublic ArrayBackedVideo(T[] frames, double fps)
frames - the framesfps - the frame ratepublic ArrayBackedVideo(T[] frames, double fps, boolean loop)
frames - the framesfps - the frame rateloop - loop the videopublic T getNextFrame()
VideogetNextFrame in class Video<T extends Image<?,T>>public T getCurrentFrame()
VideogetCurrentFrame in class Video<T extends Image<?,T>>public void setCurrentFrameIndex(long newFrame)
VideosetCurrentFrameIndex in class Video<T extends Image<?,T>>newFrame - the new indexpublic boolean hasNextFrame()
VideohasNextFrame in class Video<T extends Image<?,T>>public int getWidth()
public int getHeight()
public long countFrames()
VideocountFrames in class Video<T extends Image<?,T>>public void reset()
Videopublic long getTimeStamp()
getTimeStamp in class Video<T extends Image<?,T>>Video.getTimeStamp()