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

RequestHolder

public class RequestHolder extends Object
Semi-immutable container for a single capture request and associated information, the only mutable characteristic of this container is whether or not is has been marked as "failed" using {@code #failRequest}.

Fields Summary
private static final String
TAG
private final boolean
mRepeating
private final android.hardware.camera2.CaptureRequest
mRequest
private final int
mRequestId
private final int
mSubsequeceId
private final long
mFrameNumber
private final int
mNumJpegTargets
private final int
mNumPreviewTargets
private volatile boolean
mFailed
Constructors Summary
private RequestHolder(int requestId, int subsequenceId, android.hardware.camera2.CaptureRequest request, boolean repeating, long frameNumber, int numJpegTargets, int numPreviewTargets)

        mRepeating = repeating;
        mRequest = request;
        mRequestId = requestId;
        mSubsequeceId = subsequenceId;
        mFrameNumber = frameNumber;
        mNumJpegTargets = numJpegTargets;
        mNumPreviewTargets = numPreviewTargets;
    
Methods Summary
public voidfailRequest()
Mark this request as failed.

        Log.w(TAG, "Capture failed for request: " + getRequestId());
        mFailed = true;
    
public longgetFrameNumber()
Returns the frame number for this request.

        return mFrameNumber;
    
public java.util.CollectiongetHolderTargets()
Returns a read-only collection of the surfaces targeted by the contained request.

        return getRequest().getTargets();
    
public android.hardware.camera2.CaptureRequestgetRequest()
Returns the contained request.

        return mRequest;
    
public intgetRequestId()
Return the request id for the contained {@link CaptureRequest}.

        return mRequestId;
    
public intgetSubsequeceId()
Return the subsequence id for this request.

        return mSubsequeceId;
    
public booleanhasJpegTargets()
Returns true if any of the surfaces targeted by the contained request require jpeg buffers.

        return mNumJpegTargets > 0;
    
public booleanhasPreviewTargets()
Returns true if any of the surfaces targeted by the contained request require a non-jpeg buffer type.

        return mNumPreviewTargets > 0;
    
public booleanisRepeating()
Returns true if the contained request is repeating.

        return mRepeating;
    
public intnumJpegTargets()
Return the number of jpeg-type surfaces targeted by this request.

        return mNumJpegTargets;
    
public intnumPreviewTargets()
Return the number of non-jpeg-type surfaces targeted by this request.

        return mNumPreviewTargets;
    
public booleanrequestFailed()
Return {@code true} if this request failed.

        return mFailed;