Common code for Android, iOS, Windows to reading Video Frame from QML Camera to C++

  • Hello,

    I had tried reading video frame for Android using QVideoProbe class (works only for Android Camera) and for Windows using QAbstractVideoSurface (works only for Windows. In Windows i could not able to see viewFinder area while capturing image/video using QCamera. For windows i am using QAbstractVideoSurface object as viewFinder for QCamera) Now i need to try with iOS.

    Actually my requirement is to read Video Frame from QML Camera and use that frame for processing at C++.

    Is there a way to do this so that i can use same piece of code for all these platforms (iOS, Windows, Android, Linux)?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    I haven't used that class but doesn't QVideoFilterRunnable do what you want ?

    Hope it helps

  • administrators

    Hi @Chetana-K-M
    So you want to do something like this program (read a QR code with the camera and process the QR code with a C++ library)?

    In that example the image is grabbed in main.qml in the Timer (lines 22-30)

            triggeredOnStart: false
            onTriggered: viewfinder.grabToImage(function (result) {

    It is a nicely done example that I know runs on desktop Windows and Android. I don't have an iOS device or a mac to test on.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.