Package androidx.camera.camera2.internal
Class ScanbotCamera2DeviceSurfaceManager
-
- All Implemented Interfaces:
public final class ScanbotCamera2DeviceSurfaceManager
Camera device manager to provide the guaranteed supported stream capabilities related info for all camera devices
createCaptureSession defines the default guaranteed stream combinations for different hardware level devices. It defines what combination of surface configuration type and size pairs can be supported for different hardware level camera devices. This structure is used to store the guaranteed supported stream capabilities related info.
-
-
Constructor Summary
Constructors Constructor Description ScanbotCamera2DeviceSurfaceManager(Context context, Object cameraManager, Set<String> availableCameraIds)
Creates a new, initialized Camera2DeviceSurfaceManager.
-
Method Summary
Modifier and Type Method Description SurfaceConfig
transformSurfaceConfig(int cameraMode, String cameraId, int imageFormat, Size size)
Transform to a SurfaceConfig object with cameraId, image format and size info Pair<Map<UseCaseConfig<?>, StreamSpec>, Map<AttachedSurfaceInfo, StreamSpec>>
getSuggestedStreamSpecs(int cameraMode, String cameraId, List<AttachedSurfaceInfo> existingSurfaces, Map<UseCaseConfig<?>, List<Size>> newUseCaseConfigsSupportedSizeMap, boolean isPreviewStabilizationOn, boolean hasVideoCapture)
Retrieves a map of suggested stream specifications for the given list of use cases. -
-
Method Detail
-
transformSurfaceConfig
SurfaceConfig transformSurfaceConfig(int cameraMode, String cameraId, int imageFormat, Size size)
Transform to a SurfaceConfig object with cameraId, image format and size info
- Parameters:
cameraMode
- the working camera mode.cameraId
- the camera id of the camera device to transform the objectimageFormat
- the image format info for the surface configuration objectsize
- the size info for the surface configuration object
-
getSuggestedStreamSpecs
Pair<Map<UseCaseConfig<?>, StreamSpec>, Map<AttachedSurfaceInfo, StreamSpec>> getSuggestedStreamSpecs(int cameraMode, String cameraId, List<AttachedSurfaceInfo> existingSurfaces, Map<UseCaseConfig<?>, List<Size>> newUseCaseConfigsSupportedSizeMap, boolean isPreviewStabilizationOn, boolean hasVideoCapture)
Retrieves a map of suggested stream specifications for the given list of use cases.
- Parameters:
cameraMode
- the working camera mode.cameraId
- the camera id of the camera device used by the use casesexistingSurfaces
- list of surfaces already configured and used by the camera.newUseCaseConfigsSupportedSizeMap
- map of configurations of the use cases to the supported sizes list that will be given a suggested stream specification
-
-
-
-