Example usage for android.hardware.camera2 CaptureRequest SENSOR_FRAME_DURATION

List of usage examples for android.hardware.camera2 CaptureRequest SENSOR_FRAME_DURATION

Introduction

In this page you can find the example usage for android.hardware.camera2 CaptureRequest SENSOR_FRAME_DURATION.

Prototype

Key SENSOR_FRAME_DURATION

To view the source code for android.hardware.camera2 CaptureRequest SENSOR_FRAME_DURATION.

Click Source Link

Document

Duration from start of frame exposure to start of next frame exposure.

The maximum frame rate that can be supported by a camera subsystem is a function of many factors:

  • Requested resolutions of output image streams
  • Availability of binning / skipping modes on the imager
  • The bandwidth of the imager interface
  • The bandwidth of the various ISP processing blocks

Since these factors can vary greatly between different ISPs and sensors, the camera abstraction tries to represent the bandwidth restrictions with as simple a model as possible.

The model presented has the following characteristics:

  • The image sensor is always configured to output the smallest resolution possible given the application's requested output stream sizes.

    Usage

    From source file:com.example.android.hdrviewfinder.HdrViewfinderActivity.java

    /**
     * Start running an HDR burst on a configured camera session
     *//*from w w  w  .j a  v  a 2 s .c o m*/
    public void setHdrBurst() {
    
        mHdrBuilder.set(CaptureRequest.SENSOR_SENSITIVITY, 1600);
        mHdrBuilder.set(CaptureRequest.SENSOR_FRAME_DURATION, ONE_SECOND / 30);
    
        mHdrBuilder.set(CaptureRequest.SENSOR_EXPOSURE_TIME, mEvenExposure);
        mHdrBuilder.setTag(mEvenExposureTag);
        mHdrRequests.set(0, mHdrBuilder.build());
    
        mHdrBuilder.set(CaptureRequest.SENSOR_EXPOSURE_TIME, mOddExposure);
        mHdrBuilder.setTag(mOddExposureTag);
        mHdrRequests.set(1, mHdrBuilder.build());
    
        mCameraOps.setRepeatingBurst(mHdrRequests, mCaptureCallback, mUiHandler);
    }