Camera2 RequestThread-0:等待请求完成时超时

时间:2017-08-24 08:44:33

标签: android-camera2

使用相机后,使用以下代码将其关闭,发生此错误:

  

Camera2 RequestThread-0:等待请求完成时超时

try {
    mCameraOpenCloseLock.acquire();
    if (null != mCameraCaptureSession) {
        mCameraCaptureSession.close();
        mCameraCaptureSession = null;
    }
    if (null != mImageReader) {
        mImageReader.close();
        mImageReader = null;
    }
    if (null != cameraDevice) {
        cameraDevice.close();
        mIsOpen = false;
        cameraDevice = null;
    }
} catch (InterruptedException e) {
    throw new RuntimeException("Interrupted while trying to lock camera closing.", e);
} finally {
    mCameraOpenCloseLock.release();
}

使用imageReader获取图像。

0 个答案:

没有答案