Skip to content

SurfaceView Preview and Stream is Upside-down #1260

Closed Answered by pedroSG94
Taiki1123 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

Is it normal for SurfaceView to have different top and bottom for preview and stream? This is my first problem.
Supplementally, the top and bottom were aligned in the method using OpenGL.

Yes, using camera1 with SurfaceView or TextureView the preview and buffer data is not allways aligned because the buffer provided and the preview came from differents ways. Using camera2 or OpenGlView the preview and the stream is the same because both share the same source.
I only had a device with this problem in my hand (Nexus 6P) so it is not the normal but it is possible. You can fix it rotating the buffer byte[] but since it only happens in few devices use camera2 or OpenGlView is better a…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@Taiki1123
Comment options

Comment options

You must be logged in to vote
1 reply
@Taiki1123
Comment options

Answer selected by Taiki1123
Comment options

You must be logged in to vote
1 reply
@Taiki1123
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants