Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-64080

CameraBin error: "Cannot identify device '/dev/video0'."



    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.7.1, 5.10
    • Fix Version/s: 5.10.0
    • Component/s: Multimedia
    • Labels:
    • Environment:
      OS: Gentoo

      Two UVC cameras


      First of all I have a patch for this (attached) 

      What's wrong?

      Suppose I have a QML Camera object and two web cams connected to the PC. First I initialise the camera object with default one: 

      Camera {
          id : myCamera
          deviceId : QtMultimedia.defaultCamera.deviceId
          cameraState : Camera.LoadedState

      Then I unplug the default camera and reassign myCamera to the default device (which is the other camera now). 

      function enumerateCallbackOrWhatever() {
          myCamera.deviceId = QtMultimedia.defaultCamera.deviceId

      Then I see the error 

      CameraBin error: "Cannot identify device '/dev/video0'." 

      and myCamera.cameraStatus never gets out from Camera.LoadingStatus.


      Steps to reproduce:

      I've written a little reproducer project following the design of QDeclarativeCamera class from  ./imports/multimedia/qdeclarativecamera.cpp which you can use to make this bug emerge.

      1. Connect two cameras to the PC. Figure out which one will be considered by QtMultimedia as the default (I guess it should likely be /dev/video0)
      2. Run the reproducer. You should see messages like "status: 2" and "status: 4". This is the values of QCamera::status() of the default Camera.
      3. When you see "Please unplug the DEFAULT camera within 10 seconds" message please do that and wait a little bit
      4. The program will unload the camera, change it to the default device and will try to load it. As the result you should see the status changing from 3 to 1, then to 2 and finally you should see the error message I was talking about earlier and then nothing

      If you don't see the error and the camera has again gone to status 4 then, most likely, you unplugged the wrong camera. Try the other one.


        1. qt.patch
          2 kB
        2. reproducer.tar.gz
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.



            valentyn.doroshchuk Valentyn Doroshchuk
            krokoziabla Vitaliy Kirsanov
            0 Vote for this issue
            1 Start watching this issue



                Gerrit Reviews

                There are no open Gerrit changes