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

Camera flash not working on iOS

XMLWordPrintable

    • iOS/tvOS/watchOS
    • 58db91715 (dev), 1b129abf1 (6.10), 52cf48caa (dev), ed3ac198f (6.10)
    • Multimedia, weeks 11-12, Multimedia, weeks 13-14, Multimedia, weeks 15-16, Multimedia, weeks 18-19, Multimedia Current w28 ..., QtMM w44 - ....

      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.

        1. IMG_9002.PNG
          2.43 MB
          Timur Pocheptsov
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved: