CameraInterface

public interface CameraInterface

Internal use only.

An interface which defines an API for the camera used with the Gini Vision Library.

We use this interface with the deprecated Camera API and the new Camera2 API to publish a common API for the required camera features.

Types

TapToFocusListener
Link copied to clipboard
public interface TapToFocusListener
Listener for tap to focus.

Functions

close
Link copied to clipboard
abstract void close()
Closes the camera.
disableTapToFocus
Link copied to clipboard
abstract void disableTapToFocus(@NonNull() View tapView)
Disables tap-to-focus.
enableTapToFocus
Link copied to clipboard
abstract void enableTapToFocus(@NonNull() View tapView, @Nullable() CameraInterface.TapToFocusListener listener)
Enables tap-to-focus using the given view by adding touch handling to it and transforming the touch point coordinates to the camera sensor's coordinate system.
focus
Link copied to clipboard
abstract CompletableFuture<Booleanfocus()
Start a focus run.
getCameraRotation
Link copied to clipboard
abstract int getCameraRotation()
The rotation in degrees of the camera.
getPictureSize
Link copied to clipboard
abstract Size getPictureSize()
The selected picture size for the camera.
getPreviewSize
Link copied to clipboard
abstract Size getPreviewSize()
The selected preview size for the camera.
getPreviewSizeForDisplay
Link copied to clipboard
abstract Size getPreviewSizeForDisplay()
The selected preview size for the camera rotated to match the camera orientation.
isFlashAvailable
Link copied to clipboard
abstract boolean isFlashAvailable()
isFlashEnabled
Link copied to clipboard
abstract boolean isFlashEnabled()
isPreviewRunning
Link copied to clipboard
abstract boolean isPreviewRunning()
Get the state of the preview.
open
Link copied to clipboard
abstract CompletableFuture<Voidopen()
Opens the first back-facing camera.
setFlashEnabled
Link copied to clipboard
abstract void setFlashEnabled(boolean enabled)
setPreviewCallback
Link copied to clipboard
abstract void setPreviewCallback(@NonNull() Camera.PreviewCallback previewCallback)
Set a callback to recieve preview images from the camera.
startPreview
Link copied to clipboard
abstract CompletableFuture<VoidstartPreview()
Starts the preview using the SurfaceHolder provided by startPreview.
abstract CompletableFuture<VoidstartPreview(@NonNull() SurfaceHolder surfaceHolder)
Starts the preview using the given SurfaceHolder.
stopPreview
Link copied to clipboard
abstract void stopPreview()
Stops the camera preview.
takePicture
Link copied to clipboard
abstract CompletableFuture<PhototakePicture()
Take a picture with the camera.

Inheritors

CameraController
Link copied to clipboard