I know this question has been asked before, however, I'm unable to find any solutions that work.
The Nexus 6
front camera always displays upside down in my app. Some of the solutions are to use "setDisplayOrientation
", which does flip the camera on the screen. However, we encode the video with frames
received from onPreviewFrame
.
According to the Android SDK Documentation
, setDisplayOrientation
doesn't actually change the byte[]
in onPreviewFrame
.
This does not affect the order of byte array passed in onPreviewFrame(byte[], Camera), JPEG pictures, or recorded videos. This method is not allowed to be called during preview.
If it is not possible to get the Nexus 6
front camera onPreviewFrame
frames in the correct orientation
, what is the fastest
way to flip each frame, without suffering a drop in fps.
Thanks!
The code snippet under Camera.setDisplayOrientation() resolved this issue for me. You need to try it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With