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

DirectShow: (Optical) Zoom is changed by DirectShowCameraZoomControl even when not requested

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.12.4, 5.14.0 Alpha
    • 5.11, 5.12
    • Multimedia
    • None
    • Windows
    • 5f15380e7c807c8111c32fc9bcf53189a868d23c (qt/qtmultimedia/5.12)

    Description

      DirectShowCameraZoomControl caches currently requested (optical) zoom in _m_requestedOpticalZoom_ and tries to restore it each time, when QCamera is being in Loaded state.

      The problem happens , if zoom was not requested externally at all. (_m_requestedOpticalZoom_ == 0) - in that case DirectShowCameraZoomControl shouldn't change zoom level at all.

      =========
      User use case:
      =========
      I'm using a webcam that supports optical zoom and has a (physical) remote to change it.
      I have a Qt application (currently using Qt 5.11.2) that streams from that camera.
      I'm using the remote (only) to change zoom level.
      Sometime I do a resolution change (stop steam -> change resolution -> start stream), and I expect Zoom level to remain the same

      In fact - zoom is always being reset to 1x, which is inconvenient.

      =====
      Didn't happen in Qt 5.9 (it didn't have DirectShowCameraZoomControl at all).
      Does not happen on macOS (AVFCameraZoomControl has different behavior) no zoom control there either.

      ====
      Suggested fix:
      In this line of code also check that _m_requestedOpticalZoom_ is non-zero.

      Attachments

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

        Activity

          People

            valentyn.doroshchuk Valentyn Doroshchuk
            Youw Ihor Dutchak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes