Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Android : SupportedViewFinderResolutions is undefined / aspect ratio of VideoOutput not consistent
m2dtkast last edited by m2dtkast
Hi, it seems that on qt 5.13.1 , android,
viewfinder.supportedViewFinderResolutions is not usable / accessible / defined on my different android devices.
qrc:/qml/pages/Capture.qml:251: TypeError: Property 'supportedViewfinderResolutions' of object QDeclarativeCameraViewfinder(0xc9045890) is not a function
with the following code
console.debug(" SUPPORTED VIEWFINDER RESOLUTIONS " + camera.viewfinder.supportedViewfinderResolutions())
The code is executed when the camera reaches the Camera.LoadedStatus.
I searched through the forums and found mentions of "backend not supporting", "backend might have problems".
Is this something that can be worked around? Also it appears the view finder has a default resolution set by the system;
can I somehow override that? The aspect ratio is not correct (even with autorotate set).
Can I create my own viewfinder renderer? What could be the best approach for that?
What am I missing?
Digged a bit more around, found this, which seems to hint at where the onResolutionChange originates when camera becomes active:
but there is no supportedViewfinderResolutions declared at all;
and also :
Mentions Jolla. Guess Ill have to take a look a their camera app to understand how they get the aspect ratio of the viewfinder to be correct (which is reported as default on 4:3 on all the android devices I have).
Please help me understand Qt :D
m2dtkast last edited by
Self response : supportedViewFinderResolutions is defined on the Camera object, not on the viewfinder.
Documentation could perhaps be clearer on this.