FileDocCategorySizeDatePackage
LegacyRequest.javaAPI DocAndroid 5.1 API2818Thu Mar 12 22:22:10 GMT 2015android.hardware.camera2.legacy

LegacyRequest

public class LegacyRequest extends Object
Hold important data necessary to build the camera1 parameters up from a capture request.

Fields Summary
public final android.hardware.camera2.CameraCharacteristics
characteristics
Immutable characteristics for the camera corresponding to this request
public final android.hardware.camera2.CaptureRequest
captureRequest
Immutable capture request, as requested by the user
public final android.util.Size
previewSize
Immutable api1 preview buffer size at the time of the request
public final Camera.Parameters
parameters
Mutable camera parameters
Constructors Summary
public LegacyRequest(android.hardware.camera2.CameraCharacteristics characteristics, android.hardware.camera2.CaptureRequest captureRequest, android.util.Size previewSize, Camera.Parameters parameters)
Create a new legacy request; the parameters are copied.

param
characteristics immutable static camera characteristics for this camera
param
captureRequest immutable user-defined capture request
param
previewSize immutable internal preview size used for {@link Camera#setPreviewSurface}
param
parameters the initial camera1 parameter state; (copied) can be mutated

        this.characteristics = checkNotNull(characteristics, "characteristics must not be null");
        this.captureRequest = checkNotNull(captureRequest, "captureRequest must not be null");
        this.previewSize = checkNotNull(previewSize, "previewSize must not be null");
        checkNotNull(parameters, "parameters must not be null");

        this.parameters = Camera.getParametersCopy(parameters);
    
Methods Summary
public voidsetParameters(Camera.Parameters parameters)
Update the current parameters in-place to be a copy of the new parameters.

param
parameters non-{@code null} parameters for api1 camera

        checkNotNull(parameters, "parameters must not be null");

        this.parameters.copyFrom(parameters);