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)?
-
Hi and welcome to devnet,
I haven't used that class but doesn't QVideoFilterRunnable do what you want ?
Hope it helps
-
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)?
https://github.com/a-team-fr/MeetupMobileQtQml/tree/master/160229/DemoProjectIn that example the image is grabbed in main.qml in the Timer (lines 22-30)
Timer{ interval:1000 triggeredOnStart: false onTriggered: viewfinder.grabToImage(function (result) { controler.decodeQMLImage(result); }); running:true//overlay.decodeImage repeat:true }
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.