Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的相机(camera2 api)从电池中消耗了很多,并且设备在运行 5 分钟后很热。在试图找出问题所在的过程中,我看到当预览处于运行状态时,该onCaptureCompleted方法CameraCaptureSession.CaptureCallback被连续调用。正常吗?
onCaptureCompleted
CameraCaptureSession.CaptureCallback
如果你打电话setRepeatingRequest(),那么接到多个电话是正常的onCaptureCompleted()。如果你想要单发,你可以setRepeatingRequest()用capture().
setRepeatingRequest()
onCaptureCompleted()
capture()
调用的时间onCaptureCompleted()取决于捕获请求的模板类型等。