Camera2 API AutoFocus with Samsung S5

后端 未结 4 724
一生所求
一生所求 2020-12-28 21:30

I\'m working with the new Camera2 API on a Samsung S5. The supported hardware level this device is reporting is LEGACY, which is fine.

However, I canno

4条回答
  •  执笔经年
    2020-12-28 22:18

    I think the issue is with your setRepeatingRequest. As far as I know, CaptureRequest.CONTROL_AF_MODE_AUTO should only cause an autofocus to occur once, but setRepeatingRequest will send continuous requests. Try using capture instead:

    previewRequestBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_AUTO);
    previewRequestBuilder.set(CaptureRequest.CONTROL_AF_TRIGGER, CaptureRequest.CONTROL_AF_TRIGGER_START);
    
    state = STATE_PREVIEW;
    
    try {
    mCaptureSession.capture(mPreviewRequestBuilder.build(), mPreCaptureCallback, mBackgroundHandler);
    } catch (Exception e) {e.printStackTrace();}
    

提交回复
热议问题