Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android : SupportedViewFinderResolutions is undefined / aspect ratio of VideoOutput not consistent
Forum Updated to NodeBB v4.3 + New Features

Android : SupportedViewFinderResolutions is undefined / aspect ratio of VideoOutput not consistent

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 1 Posters 254 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    m2dtkast
    wrote on last edited by m2dtkast
    #1

    Hi, it seems that on qt 5.13.1 , android,

    viewfinder.supportedViewFinderResolutions is not usable / accessible / defined on my different android devices.
    I get

     qrc:/qml/pages/Capture.qml:251: TypeError: Property 'supportedViewfinderResolutions' of object QDeclarativeCameraViewfinder(0xc9045890) is not a function
    

    with the following code

                        console.debug(" SUPPORTED VIEWFINDER RESOLUTIONS " + camera.viewfinder.supportedViewfinderResolutions())
    

    The code is executed when the camera reaches the Camera.LoadedStatus.

    I searched through the forums and found mentions of "backend not supporting", "backend might have problems".
    Is this something that can be worked around? Also it appears the view finder has a default resolution set by the system;
    can I somehow override that? The aspect ratio is not correct (even with autorotate set).
    Can I create my own viewfinder renderer? What could be the best approach for that?

    Update:
    What am I missing?
    Digged a bit more around, found this, which seems to hint at where the onResolutionChange originates when camera becomes active:

    https://code.woboq.org/qt5/qtmultimedia/src/imports/multimedia/qdeclarativecameraviewfinder.cpp.html#115

    but there is no supportedViewfinderResolutions declared at all;
    and also :

    https://code.woboq.org/qt5/qtmultimedia/src/imports/multimedia/qdeclarativecameraviewfinder.cpp.html#3

    Mentions Jolla. Guess Ill have to take a look a their camera app to understand how they get the aspect ratio of the viewfinder to be correct (which is reported as default on 4:3 on all the android devices I have).

    Please help me understand Qt :D

    1 Reply Last reply
    0
    • M Offline
      M Offline
      m2dtkast
      wrote on last edited by
      #2

      Self response : supportedViewFinderResolutions is defined on the Camera object, not on the viewfinder.
      Documentation could perhaps be clearer on this.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved