Package com.digimarc.capture.camera
Class Camera2Wrapper
java.lang.Object
com.digimarc.capture.camera.CameraWrapperBase
com.digimarc.capture.camera.Camera2Wrapper
-
Method Summary
Modifier and TypeMethodDescriptionintclamp(int value, int min, int max) voidclose()Close the camera and capture session.static Camera2Wrappercreate()static Camera2Wrapperget()Gets the static CameraWrapper instance.intGet the ID of the selected camera.booleanintintgetSensorToDeviceRotation(int deviceRotation) booleanbooleanbooleanbooleanbooleanbooleanbooleanvoidsetNoiseReduction(boolean state) voidsetPreviewSize(android.graphics.Point sz) voidsetSurface(android.view.Surface surface) voidsetTorch(boolean state) booleanvoidvoidvoidvoidtriggerRegionFocus(android.graphics.RectF region, int regionMask) Methods inherited from class com.digimarc.capture.camera.CameraWrapperBase
addCameraListener, getCameraObject, getCameraOrientation, getPreviewFormat, getPreviewSizeAsPoint, isFocusing, isUsingCamera2, removeCameraListener, setUIHandler
-
Method Details
-
create
-
get
Gets the static CameraWrapper instance.- Returns:
- CameraWrapper object or null if it has not yet been created.
-
getOrientation
public int getOrientation()- Overrides:
getOrientationin classCameraWrapperBase
-
getSensorToDeviceRotation
public int getSensorToDeviceRotation(int deviceRotation) - Overrides:
getSensorToDeviceRotationin classCameraWrapperBase
-
getAdjustedRotation
public int getAdjustedRotation()- Overrides:
getAdjustedRotationin classCameraWrapperBase
-
setPreviewSize
public void setPreviewSize(@NonNull android.graphics.Point sz) -
isTorchSupported
public boolean isTorchSupported()- Overrides:
isTorchSupportedin classCameraWrapperBase
-
setTorch
@RequiresPermission("android.permission.CAMERA") public void setTorch(boolean state) - Overrides:
setTorchin classCameraWrapperBase
-
isTorchOn
public boolean isTorchOn()- Overrides:
isTorchOnin classCameraWrapperBase
-
triggerCenterFocus
public void triggerCenterFocus()- Overrides:
triggerCenterFocusin classCameraWrapperBase
-
triggerRegionFocus
public void triggerRegionFocus(@NonNull android.graphics.RectF region, int regionMask) - Overrides:
triggerRegionFocusin classCameraWrapperBase
-
clamp
public int clamp(int value, int min, int max) -
isRegionAFSupported
public boolean isRegionAFSupported()- Overrides:
isRegionAFSupportedin classCameraWrapperBase
-
isRegionAESupported
public boolean isRegionAESupported()- Overrides:
isRegionAESupportedin classCameraWrapperBase
-
isRegionAWBSupported
public boolean isRegionAWBSupported()- Overrides:
isRegionAWBSupportedin classCameraWrapperBase
-
triggerAutoFocus
public void triggerAutoFocus()- Overrides:
triggerAutoFocusin classCameraWrapperBase
-
getMetadata
- Overrides:
getMetadatain classCameraWrapperBase
-
close
public void close()Close the camera and capture session. -
setSurface
public void setSurface(@NonNull android.view.Surface surface) -
startPreview
public boolean startPreview() -
stopPreview
public void stopPreview() -
getCameraId
Get the ID of the selected camera.- Returns:
- The camera ID.
-
getNoiseReduction
public boolean getNoiseReduction() -
setNoiseReduction
public void setNoiseReduction(boolean state) -
isPreviewing
public boolean isPreviewing() -
isCameraReady
public boolean isCameraReady()
-