AdaptingCaptureProcessor

public final class AdaptingCaptureProcessor implements CaptureProcessor


A CaptureProcessor that calls a vendor provided implementation.

Summary

Public methods

@Override @NonNull void
onOutputSurface(@NonNull Surface surface, @NonNull int imageFormat)

This gets called to update where the CaptureProcessor should write the output of .

@Override @NonNull void

This will be invoked when the input surface resolution is updated.

@Override @ExperimentalGetImage @NonNull void

Process a ImageProxyBundle for the set of captures that were requested.

Public constructors

AdaptingCaptureProcessor

public AdaptingCaptureProcessor(@NonNull CaptureProcessorImpl impl)

Public methods

onOutputSurface

@Override
@NonNull
public @Override void onOutputSurface(@NonNull Surface surface, @NonNull int imageFormat)

This gets called to update where the CaptureProcessor should write the output of .

Parameters
@NonNull Surface surface

The Surface that the CaptureProcessor should write data into.

@NonNull int imageFormat

The format of that the surface expects.

onResolutionUpdate

@Override
@NonNull
public @Override void onResolutionUpdate(@NonNull Size size)

This will be invoked when the input surface resolution is updated.

Parameters
@NonNull Size size

for the surface.

process

@Override
@ExperimentalGetImage
@NonNull
public @Override @ExperimentalGetImage void process(@NonNull ImageProxyBundle bundle)

Process a ImageProxyBundle for the set of captures that were requested.

A result of the processing step must be written to the Surface that was received by onOutputSurface. Otherwise, it might cause the takePicture can't be complete or frame lost in Preview.

Parameters
@NonNull ImageProxyBundle bundle

The set of images to process. The ImageProxyBundle and the ImageProxy that are retrieved from it will become invalid after this method completes, so no references to them should be kept.