void
|
clearImageAnalysisAnalyzer()
Removes a previously set analyzer.
|
ListenableFuture<Void>
|
enableTorch(boolean torchEnabled)
Enable the torch or disable the torch.
|
CameraControl
|
getCameraControl()
Gets the CameraControl of the currently attached camera.
|
CameraInfo
|
getCameraInfo()
Gets the CameraInfo of the currently attached camera.
|
CameraSelector
|
getCameraSelector()
Gets the CameraSelector.
|
Executor
|
getImageAnalysisBackgroundExecutor()
Gets the default executor for ImageAnalysis background tasks.
|
int
|
getImageAnalysisBackpressureStrategy()
Returns the mode with which images are acquired.
|
int
|
getImageAnalysisImageQueueDepth()
Gets the image queue depth of ImageAnalysis.
|
CameraController.OutputSize
|
getImageAnalysisTargetSize()
Returns the intended output size for ImageAnalysis set by
setImageAnalysisTargetSize(OutputSize), or null if not set.
|
int
|
getImageCaptureFlashMode()
Gets the flash mode for ImageCapture.
|
Executor
|
getImageCaptureIoExecutor()
Gets the default executor for ImageCapture IO tasks.
|
int
|
getImageCaptureMode()
Returns the image capture mode.
|
CameraController.OutputSize
|
getImageCaptureTargetSize()
Returns the intended output size for ImageCapture set by
setImageCaptureTargetSize(OutputSize), or null if not set.
|
ListenableFuture<Void>
|
getInitializationFuture()
Gets a ListenableFuture that completes when camera initialization completes.
|
CameraController.OutputSize
|
getPreviewTargetSize()
Returns the intended output size for Preview set by
setPreviewTargetSize(OutputSize), or null if not set.
|
LiveData<Integer>
|
getTapToFocusState()
Returns a LiveData with the latest tap-to-focus state.
|
LiveData<Integer>
|
getTorchState()
Returns a LiveData of current TorchState.
|
CameraController.OutputSize
|
getVideoCaptureTargetSize()
Returns the intended output size for VideoCapture set by
setVideoCaptureTargetSize(OutputSize), or null if not set.
|
LiveData<ZoomState>
|
getZoomState()
Returns a LiveData of ZoomState.
|
boolean
|
hasCamera(CameraSelector cameraSelector)
Checks if the given CameraSelector can be resolved to a camera.
|
boolean
|
isImageAnalysisEnabled()
Checks if ImageAnalysis is enabled.
|
boolean
|
isImageCaptureEnabled()
Checks if ImageCapture is enabled.
|
boolean
|
isPinchToZoomEnabled()
Returns whether pinch-to-zoom is enabled.
|
boolean
|
isRecording()
Returns whether there is a in progress video recording.
|
boolean
|
isTapToFocusEnabled()
Returns whether tap-to-focus is enabled.
|
boolean
|
isVideoCaptureEnabled()
Checks if video capture is enabled.
|
void
|
setCameraSelector(CameraSelector cameraSelector)
Sets the CameraSelector.
|
void
|
setEnabledUseCases(int enabledUseCases)
Enables or disables use cases.
|
void
|
setImageAnalysisAnalyzer(Executor executor, ImageAnalysis.Analyzer analyzer)
Sets an analyzer to receive and analyze images.
|
void
|
setImageAnalysisBackgroundExecutor(Executor executor)
Sets the executor that will be used for ImageAnalysis background tasks.
|
void
|
setImageAnalysisBackpressureStrategy(int strategy)
Sets the backpressure strategy to apply to the image producer to deal with scenarios
where images may be produced faster than they can be analyzed.
|
void
|
setImageAnalysisImageQueueDepth(int depth)
Sets the image queue depth of ImageAnalysis.
|
void
|
setImageAnalysisTargetSize(CameraController.OutputSize targetSize)
Sets the intended output size for ImageAnalysis.
|
void
|
setImageCaptureFlashMode(int flashMode)
Sets the flash mode for ImageCapture.
|
void
|
setImageCaptureIoExecutor(Executor executor)
Sets the default executor that will be used for ImageCapture IO tasks.
|
void
|
setImageCaptureMode(int captureMode)
Sets the image capture mode.
|
void
|
setImageCaptureTargetSize(CameraController.OutputSize targetSize)
Sets the intended image size for ImageCapture.
|
ListenableFuture<Void>
|
setLinearZoom(float linearZoom)
Sets current zoom by a linear zoom value ranging from 0f to 1.0f.
|
void
|
setPinchToZoomEnabled(boolean enabled)
Enables/disables pinch-to-zoom.
|
void
|
setPreviewTargetSize(CameraController.OutputSize targetSize)
Sets the intended output size for Preview.
|
void
|
setTapToFocusEnabled(boolean enabled)
Enables/disables tap-to-focus.
|
void
|
setVideoCaptureTargetSize(CameraController.OutputSize targetSize)
Sets the intended video size for VideoCapture.
|
ListenableFuture<Void>
|
setZoomRatio(float zoomRatio)
Sets current zoom by ratio.
|
void
|
startRecording(OutputFileOptions outputFileOptions, Executor executor, OnVideoSavedCallback callback)
Takes a video and calls the OnVideoSavedCallback when done.
|
void
|
stopRecording()
Stops a in progress video recording.
|
void
|
takePicture(ImageCapture.OutputFileOptions outputFileOptions, Executor executor, ImageCapture.OnImageSavedCallback imageSavedCallback)
Captures a new still image and saves to a file along with application specified metadata.
|
void
|
takePicture(Executor executor, ImageCapture.OnImageCapturedCallback callback)
Captures a new still image for in memory access.
|