-
public class FrameA preview frame to be processed by FrameProcessors.
-
-
Method Summary
Modifier and Type Method Description booleanequals(Object obj)Framefreeze()Clones the frame, returning a frozen content that will not be overwritten.This can be kept or safely passed to other threads. voidrelease()Disposes the contents of this frame. <T> TgetData()Returns the frame data. Class<out Object>getDataClass()Returns the class returned by getData.This class depends on the engine that produced this frame. longgetTime()Returns the milliseconds epoch for this frame,in the currentTimeMillis reference. intgetRotation()intgetRotationToUser()Returns the clock-wise rotation that should be applied on the dataarray, such that the resulting frame matches what the user is seeingon screen. intgetRotationToView()Returns the clock-wise rotation that should be applied on the dataarray, such that the resulting frame matches the View / Activity orientation.Knowing this can help in the drawing / rendering phase. SizegetSize()Returns the frame size. intgetFormat()Returns the data format, in one of the android.graphics.ImageFormat constants. -
-
Method Detail
-
freeze
@NonNull() Frame freeze()
Clones the frame, returning a frozen content that will not be overwritten.This can be kept or safely passed to other threads.Using freeze without clearing with release can result in memory leaks.
-
release
void release()
Disposes the contents of this frame. Can be useful for frozen framesthat are not useful anymore.
-
getDataClass
@NonNull() Class<out Object> getDataClass()
Returns the class returned by getData.This class depends on the engine that produced this frame.- CAMERA1 will produce byte[] arrays- CAMERA2 will produce android.media.Images
-
getTime
long getTime()
Returns the milliseconds epoch for this frame,in the currentTimeMillis reference.
-
getRotation
@Deprecated() int getRotation()
-
getRotationToUser
int getRotationToUser()
Returns the clock-wise rotation that should be applied on the dataarray, such that the resulting frame matches what the user is seeingon screen. Knowing this can help in the processing phase.
-
getRotationToView
int getRotationToView()
Returns the clock-wise rotation that should be applied on the dataarray, such that the resulting frame matches the View / Activity orientation.Knowing this can help in the drawing / rendering phase.
-
getFormat
int getFormat()
Returns the data format, in one of the android.graphics.ImageFormat constants.This will always be NV21 for now.
-
-
-
-