Qt Quick Camera QML type doesn't work on Android Emulators making development a pain.
Unsolved
QML and Qt Quick
-
Window { id: main_window width: Screen.desktopAvailableWidth height: Screen.desktopAvailableHeight visible: true MediaDevices { id: mediaDevices } CaptureSession { id: captureSession videoOutput: videoOutput Component.onCompleted: { camera.start() } camera: Camera { cameraDevice: mediaDevices.defaultVideoInput } imageCapture: ImageCapture { onErrorOccurred: function(requestId, error, message) { console.log("Error occurred", requestId, error, message); } onImageCaptured: function(requestId, previewImage) { console.log("Image captured", requestId, previewImage); } onImageSaved: function(requestId, path) { console.log("Image saved", requestId, path); } } } VideoOutput { id: videoOutput anchors.fill: parent } }
Produces the following errors :
E QtCamera2: Image processing taking too long. Let's wait 0,5s more java.lang.IllegalStateException: maxImages (10) has already been acquired, call #close before acquiring more.
W ImageReader_JNI: Unable to acquire a buffer item, very likely client tried to acquire more than maxImages buffers
E QtCamera2: Will not wait anymore. Restart camera session. java.lang.IllegalStateException: maxImages (10) has already been acquired, call #close before acquiring more.It works perfectly fine on real devices tho.