I use the following versions of CameraX dependencies:
implementation "androidx.camera:camera-camera2:1.0.0-beta04"
implementation "androidx.camera:camera-view:1.0.0-alpha11"
implementation "androidx.camera:camera-extensions:1.0.0-alpha11"
implementation "androidx.camera:camera-lifecycle:1.0.0-beta04"
And try to encode output video from the camera into H264 using android MediaCodec and decode it back and show the result video on a SurfaceView, everything works fine except that the video on a SurfaceView is conterclockwise rotated by 90 degrees in portrait mode and has no rotation in landscape mode.
My code of capturing video from the camera looks like this:
private lateinit var yData: ByteArray //
private lateinit var uData: ByteArray // store YUV data from camera
private lateinit var vData: ByteArray //
imageAnalysis = ImageAna