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

Camera flash not working on iOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.0
    • Multimedia
    • None
    • iPhone 15, iOS 18

    Description

      When trying to use declarative-camera with FFmpeg backend on IOS, flash is never shown as supported, the controls for modifying flash do not appear. In the FFmpeg backend source code, the values for flash-support are never updated. This feature was previously supported on the iOS native Darwin backend, and is also supported on our Android build.

      Steps to reproduce:

      1. Use an iOS device with a physical flash, such as an iPhone or an iPad Pro.
      2. Open declarative-camera on iOS, make sure to use FFmpeg backend.
      3. Look at the camera preview, the relevant button controls are not there.

      What do you expect to happen:
      I expect the declarative-camera example to show the flash controls, like they do on Android. I expect the torch button to turn on the flash constantly like it does on Android. I expect the flash-button to enable auto-flashing when I do a photo capture, like it does on Android.

      What actually happens:
      When I run through the steps, the associated controls are not there.

      Other notes:
      If we modify the file 'qtmultimedia/src/plugins/ffmpeg/qavfcamera.mm', line 150, to include the lines

      if (active)
              updateCameraConfiguration();
      

      Then the values for whether flash mode is supported will be updated in backend. This will allow the controls to show up, but the flash-functionality still doesn't work even if you try to do a camera capture. I suspect we're not setting the correct values in AVCaptureDevice when flash-mode is set. There's also the option of migrating our existing AVCaptureStillImageOutput code (deprecated API) to the newer AVPhotoCaptureOutput API.

      Attachments

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

        Activity

          People

            npskalerud Nils Petter Skålerud
            npskalerud Nils Petter Skålerud
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes