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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ScanbotCamera2DeviceSurfaceManager

        ScanbotCamera2DeviceSurfaceManager(Context context, Object cameraManager, Set<String> availableCameraIds)
        Creates a new, initialized Camera2DeviceSurfaceManager.
    • 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 object
        imageFormat - the image format info for the surface configuration object
        size - 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 cases
        existingSurfaces - 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