Package io.scanbot.sdk.camera
Interface PreviewBuffer
-
- All Implemented Interfaces:
public interface PreviewBufferManages access to preview buffer of the Camera
-
-
Method Summary
Modifier and Type Method Description abstract UnitaddFrameHandler(FrameHandler frameHandler)Registers FrameHandler which will receive preview frames from camera. abstract UnitremoveFrameHandler(FrameHandler frameHandler)Unregisters FrameHandler. abstract <T extends FrameHandler> TgetAttachedFrameHandler(Class<T> clazz)Check whether there is same class of FrameHandler attached to the view return object of the same class if exists otherwise null -
-
Method Detail
-
addFrameHandler
abstract Unit addFrameHandler(FrameHandler frameHandler)
Registers FrameHandler which will receive preview frames from camera.
Note, that handlers can intercept frame by returning
truefrom FrameHandler.handleFrame. In such case no other handler will receive callbacks for current frame. Therefore, order in which handlers are added matters.All callbacks are invoked from the worker thread, so it is safe to perform "heavy" operations.
- Parameters:
frameHandler- handler which will receive preview frames.
-
removeFrameHandler
abstract Unit removeFrameHandler(FrameHandler frameHandler)
Unregisters FrameHandler.
- Parameters:
frameHandler- handler to unregister.
-
getAttachedFrameHandler
abstract <T extends FrameHandler> T getAttachedFrameHandler(Class<T> clazz)
Check whether there is same class of FrameHandler attached to the view return object of the same class if exists otherwise null
-
-
-
-