Class FrameGrabberRecognizer
- java.lang.Object
-
- com.microblink.entities.Entity<T>
-
- com.microblink.entities.recognizers.Recognizer<FrameGrabberRecognizer.Result>
-
- com.microblink.entities.recognizers.framegrabber.FrameGrabberRecognizer
-
- All Implemented Interfaces:
android.os.Parcelable
,JsonizableEntity
public final class FrameGrabberRecognizer extends Recognizer<FrameGrabberRecognizer.Result>
A recognizer that never produces a result, but sends every frame that it receives to givenFrameCallback
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FrameGrabberRecognizer.Result
-
Field Summary
Fields Modifier and Type Field Description static android.os.Parcelable.Creator<FrameGrabberRecognizer>
CREATOR
-
Constructor Summary
Constructors Constructor Description FrameGrabberRecognizer(FrameCallback frameCallback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FrameGrabberRecognizer
clone()
Create a copy of the entity.void
consumeResultFrom(Entity other)
Consume result from other entity.protected void
deserializeNativeSettings(byte[] serializedSettings)
FrameCallback
getFrameCallback()
TheFrameCallback
that will receive frames.protected byte[]
serializeNativeSettings()
void
setFrameCallback(FrameCallback frameCallback)
TheFrameCallback
that will receive frames.void
setGrabFocusedFrames(boolean grabFocusedFrames)
Allow sending focused camera frames toFrameCallback
.void
setGrabUnfocusedFrames(boolean grabUnfocusedFrames)
Allow sending unfocused camera frames toFrameCallback
.boolean
shouldGrabFocusedFrames()
Allow sending focused camera frames toFrameCallback
.boolean
shouldGrabUnfocusedFrames()
Allow sending unfocused camera frames toFrameCallback
.protected void
terminateNative(long nativeContext)
void
writeToParcel(android.os.Parcel dest, int i)
-
Methods inherited from class com.microblink.entities.recognizers.Recognizer
getName, isExcludedFromPing, requiresAutofocus, requiresLandscapeMode, signedJsonNativeGet, toSignedJson
-
Methods inherited from class com.microblink.entities.Entity
describeContents, finalize, getNativeContext, getResult, nativeGetNativeResultContext, readFromParcel
-
-
-
-
Field Detail
-
CREATOR
@NonNull public static final android.os.Parcelable.Creator<FrameGrabberRecognizer> CREATOR
-
-
Constructor Detail
-
FrameGrabberRecognizer
public FrameGrabberRecognizer(@NonNull FrameCallback frameCallback)
- Parameters:
frameCallback
- TheFrameCallback
that will receive frames.
-
-
Method Detail
-
setFrameCallback
public void setFrameCallback(@NonNull FrameCallback frameCallback)
TheFrameCallback
that will receive frames.
-
getFrameCallback
@NonNull public FrameCallback getFrameCallback()
TheFrameCallback
that will receive frames.
-
setGrabFocusedFrames
public void setGrabFocusedFrames(boolean grabFocusedFrames)
Allow sending focused camera frames toFrameCallback
.
-
shouldGrabFocusedFrames
public boolean shouldGrabFocusedFrames()
Allow sending focused camera frames toFrameCallback
.
-
setGrabUnfocusedFrames
public void setGrabUnfocusedFrames(boolean grabUnfocusedFrames)
Allow sending unfocused camera frames toFrameCallback
.
-
shouldGrabUnfocusedFrames
public boolean shouldGrabUnfocusedFrames()
Allow sending unfocused camera frames toFrameCallback
.
-
terminateNative
protected void terminateNative(long nativeContext)
- Specified by:
terminateNative
in classEntity<FrameGrabberRecognizer.Result>
-
writeToParcel
public void writeToParcel(@NonNull android.os.Parcel dest, int i)
- Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
- Overrides:
writeToParcel
in classEntity<FrameGrabberRecognizer.Result>
-
serializeNativeSettings
@Nullable protected byte[] serializeNativeSettings()
- Specified by:
serializeNativeSettings
in classEntity<FrameGrabberRecognizer.Result>
-
deserializeNativeSettings
protected void deserializeNativeSettings(@NonNull byte[] serializedSettings)
- Specified by:
deserializeNativeSettings
in classEntity<FrameGrabberRecognizer.Result>
-
clone
@NonNull public FrameGrabberRecognizer clone()
Description copied from class:Entity
Create a copy of the entity. This is required if properties of the entity must be modified while background thread performs processing. In order to avoid race conditions, changing properties is not allowed while entity is used in background processing. However, you are able to make a copy of the entity, change properties of it and then update theRecognizerRunnerView
orRecognizerRunner
with the updated entity hierarchy.- Specified by:
clone
in classRecognizer<FrameGrabberRecognizer.Result>
- Returns:
- a copy of the entity
-
consumeResultFrom
public void consumeResultFrom(@NonNull Entity other)
Description copied from class:Entity
Consume result from other entity. The result from other will be put instead current result of this entity. This method is used insideBaseIntentTransferable.loadFromIntent(Intent)
and similar methods to replace the result content of the saved entities with results that have arrived overIntent
- Specified by:
consumeResultFrom
in classEntity<FrameGrabberRecognizer.Result>
- Parameters:
other
- Entity from which result should be consumed.
-
-