Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Android : Camera preview distortion / wrong aspect ration with screenOrientation="portrait" in manifest
m2dtkast last edited by m2dtkast
I am currently experiencing a weird problem.
The app I am working on (targeting android mobile), is supposed to be portrait only.
So, I force the screenOrientation="portrait" in the manifest.
The app also relies on the qml Camera.
The viewfinder is configured with autorotate on.
But the viewfinder is posing a weird problem; in that on the android devices I have been testing with,
the preview's picture aspect ratio is reversed to what it actually should be : meaning, the preview appears wide/landscape in portrait, if I rotate the phone to landscape - the screen does not change due to the manifest setting- it appeares narrow/portrait in landscape. I tried the same with the qmlvideo example (setting the manifest) and I am unable to reproduce this exact behaviour.
If in my app i revert the manifest to "undefined" (default), the issue goes away and the video in the preview has the correct aspect ratio, no matter the orientation (but of course the screen rotates, which is not desired).
How would I be able to reproduce this wrong aspect ratio in the qmlvideo?
I tried changing resolution of the camera, but that doesn't affect the viewfinder (which is always something in 1920x1440 apparently).
I don't think this is a camera misconfiguration; as the same behaviour applies in the app even with a non-customized camera, i.e.