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

QCamera::isAvailable() has unclear behavior

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.10
    • Multimedia
    • All

      At the time of writing, the QCamera method "isAvailable()" has the documentation saying "Returns true if the camera can be used.". In the current implementation, this only checks if the device assigned is not a null-device.

      The documentation seems to imply this should act as a hint that calling .start() is likely to succeed in making the camera become active. However, there are several factors that are not accounted for here:

      • The device might be set to something non-null, but that device has since been disconnected.
      • The application has not received permission to perform captures.
      • The camera is currently in exclusive use by another application on the system, so our application not begin a capture.

      We should update the documentation and implementation so that the behavior more closely describes what the documentation says.

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

            qtmultimediateam Qt Multimedia Team
            npskalerud Nils Petter Skålerud
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes