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

QCamera does not support hot plug in and out. Bug or how it is designed?

    XMLWordPrintable

Details

    • Windows
    • 084ea0f07 (dev), 706d92fe3 (6.6), 1629115d1 (6.5)

    Description

      Both QML and Widget-based camera examples can be used to reproduce the issue (QML Camera is implemented by QCamera anyway). To reproduce the issue, prepare an external camera that can be plugged in and out.

      So with camera plugged in, run either example. Then:
      1. While preview is functioning normally, unplug the camera. Preview freezes and a warning about camera not available anymore pops up. It is as expected more or less up to this point.
      2. Plug camera back in. Application still hangs as it was, with freezing preview. Manually selecting camera causes application crashing.

      2 more observations:
      1. With no camera plugged at the first place, plugging camera in for the first time works well. But not after camera being unplugged once and back in as described above.
      2. videoInputChanged signal is emitted normally all the time. Application can recognize that camera being plugged back in. But camera just does not work.
      3. Widget-based example freezes and crashes at 'm_camera.reset(new QCamera(cameraDevice));' of 'camera.cpp'. So it is either the problem of QScopedPointer::reset or the constructor of QCamera.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              padubsky Pavel Dubsky
              luqiaochen Luqiao Chen
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes