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

BurstHolder

public class BurstHolder extends Object
Immutable container for a burst of capture results.

Fields Summary
private static final String
TAG
private final ArrayList
mRequestBuilders
private final boolean
mRepeating
private final int
mRequestId
Constructors Summary
public BurstHolder(int requestId, boolean repeating, List requests, Collection jpegSurfaceIds)
Immutable container for a burst of capture results.

param
requestId id of the burst request.
param
repeating true if this burst is repeating.
param
requests a {@link List} of {@link CaptureRequest}s in this burst.
param
jpegSurfaceIds a {@link Collection} of IDs for the surfaces that have jpeg outputs.


                                                         
          
                         
        mRequestBuilders = new ArrayList<>();
        int i = 0;
        for (CaptureRequest r : requests) {
            mRequestBuilders.add(new RequestHolder.Builder(requestId, /*subsequenceId*/i,
                    /*request*/r, repeating, jpegSurfaceIds));
            ++i;
        }
        mRepeating = repeating;
        mRequestId = requestId;
    
Methods Summary
public intgetNumberOfRequests()
Return the number of requests in this burst sequence.

        return mRequestBuilders.size();
    
public intgetRequestId()
Get the id of this request.

        return mRequestId;
    
public booleanisRepeating()
Return true if this repeating.

        return mRepeating;
    
public java.util.ListproduceRequestHolders(long frameNumber)
Create a list of {@link RequestHolder} objects encapsulating the requests in this burst.

param
frameNumber the starting framenumber for this burst.
return
the list of {@link RequestHolder} objects.

        ArrayList<RequestHolder> holders = new ArrayList<RequestHolder>();
        int i = 0;
        for (RequestHolder.Builder b : mRequestBuilders) {
            holders.add(b.build(frameNumber + i));
            ++i;
        }
        return holders;