Qt Quick Hardware Acceleration problem on Android app
-
Hi All
I am developing a Qt Quick app for running on Android TVs using Qt 6.2 LTS. I am using QMultimedia in qml to play videos.
To see the difference between using and not using Hardware Acceleration , I used VLC software to watch a video once with setting Hardware Acceleration to ON and once with setting hardware acceleration to OFF.
Then ran my Qt app once with setting android:hardwareAccelerated to "false" and once setting it to "true" in AndroidManifest.xml file. In both way, video playback was like to VLC with disabled Hardware Acceleration !!!
And more interestingly, after writing a test program with Android Studio, I saw that in both ways(setting android:hardwareAccelerated once to true and once to false), video playback is similar to that of VLC when the hardware acceleration is ON !!!
In both test and using VLC, I used a specific Android TV with Android version 9. Also I used SDK and build tools 31 for compiling in both platforms.
I confiused about Hardware Acceleration mechanism And not understand difference in that in Qt and Android Studio. What is my mistak in my test scenarios and why Qt can not using Hardware Acceleration on my Android TV ?
-
Hi All
I am developing a Qt Quick app for running on Android TVs using Qt 6.2 LTS. I am using QMultimedia in qml to play videos.
To see the difference between using and not using Hardware Acceleration , I used VLC software to watch a video once with setting Hardware Acceleration to ON and once with setting hardware acceleration to OFF.
Then ran my Qt app once with setting android:hardwareAccelerated to "false" and once setting it to "true" in AndroidManifest.xml file. In both way, video playback was like to VLC with disabled Hardware Acceleration !!!
And more interestingly, after writing a test program with Android Studio, I saw that in both ways(setting android:hardwareAccelerated once to true and once to false), video playback is similar to that of VLC when the hardware acceleration is ON !!!
In both test and using VLC, I used a specific Android TV with Android version 9. Also I used SDK and build tools 31 for compiling in both platforms.
I confiused about Hardware Acceleration mechanism And not understand difference in that in Qt and Android Studio. What is my mistak in my test scenarios and why Qt can not using Hardware Acceleration on my Android TV ?
@Ali-Golbin Maybe try the latest Qt version to see if Qt does it better now. This is an interesting issue. Qt 6.2 could be too new for QMultimedia because QMultimedia module has been reworked heavily in Qt 6.
I guess your test code made from Android Studio is Java-based. Java code is built once and can be run anywhere. Android is Java-based as well and therefore no surprise that this test code works OK on Android with HW acceleration.
I remember VLC uses Qt + gstreamer on Linux. But on Android VLC does things differently if you take a look at its source code.