FileDocCategorySizeDatePackage
Camera2CaptureCallbackSplitter.javaAPI DocAndroid 5.1 API3526Thu Mar 12 22:22:48 GMT 2015com.android.ex.camera2.utils

Camera2CaptureCallbackSplitter

public class Camera2CaptureCallbackSplitter extends android.hardware.camera2.CameraCaptureSession.CaptureCallback
Junction that allows notifying multiple {@link CaptureCallback}s whenever the {@link CameraCaptureSession} posts a capture-related update.

Fields Summary
private final List
mRecipients
Constructors Summary
public Camera2CaptureCallbackSplitter(android.hardware.camera2.CameraCaptureSession.CaptureCallback recipients)

param
recipients The listeners to notify. Any {@code null} passed here will be completely ignored.


                                          
       
        for (CaptureCallback listener : recipients) {
            if (listener != null) {
                mRecipients.add(listener);
            }
        }
    
Methods Summary
public voidonCaptureCompleted(android.hardware.camera2.CameraCaptureSession session, android.hardware.camera2.CaptureRequest request, android.hardware.camera2.TotalCaptureResult result)

        for (CaptureCallback target : mRecipients) {
            target.onCaptureCompleted(session, request, result);
        }
    
public voidonCaptureFailed(android.hardware.camera2.CameraCaptureSession session, android.hardware.camera2.CaptureRequest request, android.hardware.camera2.CaptureFailure failure)

        for (CaptureCallback target : mRecipients) {
            target.onCaptureFailed(session, request, failure);
        }
    
public voidonCaptureProgressed(android.hardware.camera2.CameraCaptureSession session, android.hardware.camera2.CaptureRequest request, android.hardware.camera2.CaptureResult partialResult)

        for (CaptureCallback target : mRecipients) {
            target.onCaptureProgressed(session, request, partialResult);
        }
    
public voidonCaptureSequenceAborted(android.hardware.camera2.CameraCaptureSession session, int sequenceId)

        for (CaptureCallback target : mRecipients) {
            target.onCaptureSequenceAborted(session, sequenceId);
        }
    
public voidonCaptureSequenceCompleted(android.hardware.camera2.CameraCaptureSession session, int sequenceId, long frameNumber)

        for (CaptureCallback target : mRecipients) {
            target.onCaptureSequenceCompleted(session, sequenceId, frameNumber);
        }
    
public voidonCaptureStarted(android.hardware.camera2.CameraCaptureSession session, android.hardware.camera2.CaptureRequest request, long timestamp, long frameNumber)

        for (CaptureCallback target : mRecipients) {
            target.onCaptureStarted(session, request, timestamp, frameNumber);
        }