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

Camera2CaptureCallbackForwarder

public class Camera2CaptureCallbackForwarder extends android.hardware.camera2.CameraCaptureSession.CaptureCallback
Proxy that forwards all updates to another {@link CaptureCallback}, invoking its callbacks on a separate {@link Handler}.

Fields Summary
private android.hardware.camera2.CameraCaptureSession.CaptureCallback
mListener
private android.os.Handler
mHandler
Constructors Summary
public Camera2CaptureCallbackForwarder(android.hardware.camera2.CameraCaptureSession.CaptureCallback listener, android.os.Handler handler)

        mListener = listener;
        mHandler = handler;
    
Methods Summary
public voidonCaptureCompleted(android.hardware.camera2.CameraCaptureSession session, android.hardware.camera2.CaptureRequest request, android.hardware.camera2.TotalCaptureResult result)

        mHandler.post(new Runnable() {
            @Override
            public void run() {
                mListener.onCaptureCompleted(session, request, result);
            }});
    
public voidonCaptureFailed(android.hardware.camera2.CameraCaptureSession session, android.hardware.camera2.CaptureRequest request, android.hardware.camera2.CaptureFailure failure)

        mHandler.post(new Runnable() {
            @Override
            public void run() {
                mListener.onCaptureFailed(session, request, failure);
            }});
    
public voidonCaptureProgressed(android.hardware.camera2.CameraCaptureSession session, android.hardware.camera2.CaptureRequest request, android.hardware.camera2.CaptureResult partialResult)

        mHandler.post(new Runnable() {
            @Override
            public void run() {
                mListener.onCaptureProgressed(session, request, partialResult);
            }});
    
public voidonCaptureSequenceAborted(android.hardware.camera2.CameraCaptureSession session, int sequenceId)

        mHandler.post(new Runnable() {
            @Override
            public void run() {
                mListener.onCaptureSequenceAborted(session, sequenceId);
            }});
    
public voidonCaptureSequenceCompleted(android.hardware.camera2.CameraCaptureSession session, int sequenceId, long frameNumber)

        mHandler.post(new Runnable() {
            @Override
            public void run() {
                mListener.onCaptureSequenceCompleted(session, sequenceId, frameNumber);
            }});
    
public voidonCaptureStarted(android.hardware.camera2.CameraCaptureSession session, android.hardware.camera2.CaptureRequest request, long timestamp, long frameNumber)

        mHandler.post(new Runnable() {
            @Override
            public void run() {
                mListener.onCaptureStarted(session, request, timestamp, frameNumber);
            }});