What is the Camera2 API Equivalent of setDisplayOrientation()?

后端 未结 4 1908
走了就别回头了
走了就别回头了 2020-12-24 12:35

With android.hardware.Camera, in order to have the camera output appropriately track the device movement, we need to hook up an OrientationEventListener

4条回答
  •  心在旅途
    2020-12-24 13:28

    use this CaptureRequest JPEG_ORIENTATION to set your display orientation

    captureBuilder.set(CaptureRequest.JPEG_ORIENTATION, 90)

提交回复
热议问题