BasicVendorExtender

@RequiresApi(value = 21) public class BasicVendorExtender implements VendorExtender


Basic vendor interface implementation

Summary

Public constructors

Public methods

@Nullable @Override SessionProcessor

Creates a SessionProcessor that is responsible for (1) determining the stream configuration based on given output surfaces (2) Requesting OEM implementation to start repeating request and performing a still image capture.

@Nullable @Override Range<@NonNull Long>

Gets the estimated latency range of image capture.

@NonNull ImageCaptureExtenderImpl

Return the ImageCaptureExtenderImpl instance.

@NonNull PreviewExtenderImpl

Return the PreviewExtenderImpl instance.

@NonNull @Override List<@NonNull Pair<@NonNull Integer, @NonNull Size[]>>

Gets the supported output resolutions for image capture.

@NonNull @Override List<@NonNull Pair<@NonNull Integer, @NonNull Size[]>>

Gets the supported output resolutions for preview.

@NonNull @Override Size[]

Gets the supported output resolutions for image analysis (YUV_420_888).

@Override @NonNull void
init(@NonNull CameraInfo cameraInfo)

Initializes the extender to be used with the specified camera.

@Override @NonNull boolean
isExtensionAvailable(
    @NonNull String cameraId,
    @NonNull Map<@NonNull String, @NonNull CameraCharacteristics> characteristicsMap
)

Indicates whether the extension is supported on the device.

Public constructors

BasicVendorExtender

public BasicVendorExtender(@ExtensionMode.Mode @NonNull int mode)

Public methods

createSessionProcessor

@Nullable
@Override
@NonNull
public @Override SessionProcessor createSessionProcessor(@NonNull Context context)

Creates a SessionProcessor that is responsible for (1) determining the stream configuration based on given output surfaces (2) Requesting OEM implementation to start repeating request and performing a still image capture.

getEstimatedCaptureLatencyRange

@Nullable
@Override
@NonNull
public @Override Range<@NonNull LonggetEstimatedCaptureLatencyRange(@Nullable Size size)

Gets the estimated latency range of image capture.

It must be called after init() is called.

getImageCaptureExtenderImpl

@NonNull
public ImageCaptureExtenderImpl getImageCaptureExtenderImpl()

Return the ImageCaptureExtenderImpl instance. This method will be removed once the existing basic extender implementation is migrated to the unified vendor extender.

getPreviewExtenderImpl

@NonNull
public PreviewExtenderImpl getPreviewExtenderImpl()

Return the PreviewExtenderImpl instance. This method will be removed once the existing basic extender implementation is migrated to the unified vendor extender.

getSupportedCaptureOutputResolutions

@NonNull
@Override
public @Override List<@NonNull Pair<@NonNull Integer, @NonNull Size[]>> getSupportedCaptureOutputResolutions()

Gets the supported output resolutions for image capture.

Pair list composed with ImageFormat and Size array will be returned.

The returned resolutions should be subset of the supported sizes retrieved from android.hardware.camera2.params.StreamConfigurationMap for the camera device.

The returned size array must contain all supported resolutions. It cannot be null.

It must be called after init() is called.

getSupportedPreviewOutputResolutions

@NonNull
@Override
public @Override List<@NonNull Pair<@NonNull Integer, @NonNull Size[]>> getSupportedPreviewOutputResolutions()

Gets the supported output resolutions for preview.

Pair list composed with ImageFormat and Size array will be returned.

The returned resolutions should be subset of the supported sizes retrieved from android.hardware.camera2.params.StreamConfigurationMap for the camera device.

The returned size array must contain all supported resolutions. It cannot be null.

It must be called after init() is called.

getSupportedYuvAnalysisResolutions

@NonNull
@Override
public @Override Size[] getSupportedYuvAnalysisResolutions()

Gets the supported output resolutions for image analysis (YUV_420_888).

The returned resolutions should be subset of the supported sizes retrieved from android.hardware.camera2.params.StreamConfigurationMap for the camera device.

The returned size array must contain all supported resolutions. It cannot be null.

It must be called after init() is called.

init

@Override
@NonNull
public @Override void init(@NonNull CameraInfo cameraInfo)

Initializes the extender to be used with the specified camera.