Package javaforce.media
Class VideoBuffer
java.lang.Object
javaforce.media.VideoBuffer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()static floatcompareFrames(int[] frame1, int[] frame2, int width, int height) Compares two frames returning percentage of pixels that are different.voidFrees the image obtained by getNewFrame()voidFrees the image obtained by getNextFrame()Returns the next image to add a frame to the buffer (the head) Returns null if buffer is full.Returns the next image to be removed from the buffer (the tail)intsize()
-
Constructor Details
-
VideoBuffer
public VideoBuffer(int width, int height, int frames)
-
-
Method Details
-
getNewFrame
Returns the next image to add a frame to the buffer (the head) Returns null if buffer is full. -
freeNewFrame
public void freeNewFrame()Frees the image obtained by getNewFrame() -
getNextFrame
Returns the next image to be removed from the buffer (the tail) -
freeNextFrame
public void freeNextFrame()Frees the image obtained by getNextFrame() -
size
public int size() -
clear
public void clear() -
compareFrames
public static float compareFrames(int[] frame1, int[] frame2, int width, int height) Compares two frames returning percentage of pixels that are different.
-