Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt Quick Camera QML type doesn't work on Android Emulators making development a pain.
Forum Updated to NodeBB v4.3 + New Features

Qt Quick Camera QML type doesn't work on Android Emulators making development a pain.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 384 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zain_a
    wrote on last edited by zain_a
    #1
    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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved