QCameraDevice::photoResolutions() empty output
-
Hello everyone,
I've been testing some of the QCameraDevice's methods in Android for a project, the code is the following:const QList<QCameraDevice> cameras = QMediaDevices::videoInputs(); for (const QCameraDevice &cameraDevice : cameras) { qDebug() << "Camera: " << cameraDevice << ", isDefault: " << cameraDevice.isDefault(); qDebug() << "Photo Resolutions: " << cameraDevice.photoResolutions(); }
As shown in the code above, I'm listing every QCameraDevice detected in the phone and listing its Photos resolutions.
The problem is that when I'm compiling in the Qt 6.7 or 6.8 versions the returning QList is empty. However in the Qt 6.5 version it doesn't do that, it returns a QList with the resolutions.Is there something that has to be modified in the code from the Qt 6.7 version forward for the QList to return NOT empty?
Thanks a lot in advance.
-
@marcezav said in QCameraDevice::photoResolutions() empty output:
Is there something that has to be modified in the code from the Qt 6.7 version forward for the QList to return NOT empty?
Do you mean the "cameras" list is empty? Or are the cameras detected but the resolutions list is empty?
-
@jsulm
The cameras are detected but the Photo Resolution QLists are empty, this is the output:D libappQMediaDevices_Format_arm64-v8a.so: Camera: "QCameraDevice(name=Rear Camera: 0, id=0, position=BackFace)" , isDefault: false D libappQMediaDevices_Format_arm64-v8a.so: Photo Resolutions: QList() D libappQMediaDevices_Format_arm64-v8a.so: Camera: "QCameraDevice(name=Front Camera: 1, id=1, position=FrontFace)" , isDefault: false D libappQMediaDevices_Format_arm64-v8a.so: Photo Resolutions: QList()