Hardware Accelerated Decoding not working in Custom QGC App

Hello Team,

I have recently purchased Herelink and it’s working well using the preinstalled QGC. I tried to build and install the QGC from the link mentioned in the Herelink User Guide in the remote unit. I changed the package name of the application, so that I can install it on the device without uninstalling preinstalled QGC. I found out that there was significant amount of delay in the video in the version that I built as compared to the preinstalled version. On checking the console logs, I found out that my version of QGC couldn’t find the hardware decoder which explains the delay.

I have the followed the exact built instructions to build the QGC. Details Below

  1. Repository: https://github.com/cubepilot/qgroundcontrol-herelink
  2. Qt Version: 5.11.0
  3. NDK Version: 15 (July 2017)
  4. SDK version: 26

Deployment Steps:

  1. Changed package name of the app in android manifest
  2. Installed using ADB

Exact Error from Log:

[!] at /home/aabhishek/all_ws/qt_ws/qgroundcontrol-herelink/src/VideoStreaming/VideoReceiver.cc:355 - “VideoReceiver::start() failed. Error with gst_element_factory_make(‘amcviddec-omxarmvideov5xxdecoder’)”

Complete Console Log of QGC of VideoReceiver.cc log file:

[D] at /home/aabhishek/all_ws/qt_ws/qgroundcontrol-herelink/src/QGCApplication.cc:184 - “System reported locale: QLocale(English, Latin, UnitedStates) “en_US””
[D] at /home/aabhishek/all_ws/qt_ws/qgroundcontrol-herelink/src/QGCApplication.cc:277 - “Settings location “/data/user/0/org.mavlink.qgroundcontrolNew/files/.config/QGroundControl.org/QGroundControl.ini” Is writable?: true”
[D] at /home/aabhishek/all_ws/qt_ws/qgroundcontrol-herelink/src/QGCLoggingCategory.cc:98 - “Filter rules “*Log.debug=false\n””
[E] at :0 - “Device does not support Bluetooth”
[!] at /home/aabhishek/all_ws/qt_ws/qgroundcontrol-herelink/src/VideoStreaming/VideoReceiver.cc:251 - “VideoReceiver::start() failed because URI is not specified”
[D] at /home/aabhishek/all_ws/qt_ws/qgroundcontrol-herelink/src/Vehicle/MAVLinkLogManager.cc:360 - “MAVLink logs directory: “/storage/emulated/0/QGroundControl/Logs””
[D] at /home/aabhishek/all_ws/qt_ws/qgroundcontrol-herelink/src/QtLocationPlugin/QGCMapEngine.cpp:229 - “Map Cache in: “/data/user/0/org.mavlink.qgroundcontrolNew/files/QGCMapCache300” / “qgcMapCache.db””
[E] at /home/aabhishek/all_ws/qt_ws/qgroundcontrol-herelink/src/QtLocationPlugin/QGCTileCacheWorker.cpp:1112 - “No Internet Access”
[E] at :0 - “QGeoTileRequestManager: Failed to fetch tile (5858,3417,13) 5 times, giving up. Last error message was: ‘Network not available’”
[E] at :0 - “QGeoTileRequestManager: Failed to fetch tile (5858,3418,13) 5 times, giving up. Last error message was: ‘Network not available’”
[E] at :0 - “QGeoTileRequestManager: Failed to fetch tile (5859,3417,13) 5 times, giving up. Last error message was: ‘Network not available’”
[E] at :0 - “QGeoTileRequestManager: Failed to fetch tile (5859,3418,13) 5 times, giving up. Last error message was: ‘Network not available’”
[D] at /home/aabhishek/all_ws/qt_ws/qgroundcontrol-herelink/src/comm/UDPLink.cc:233 - “Adding target QHostAddress(“127.0.0.1”) 58763”
[D] at /home/aabhishek/all_ws/qt_ws/qgroundcontrol-herelink/src/comm/MAVLinkProtocol.cc:192 - “Switching outbound to mavlink 2.0 due to incoming mavlink 2.0 packet: 0xcae354a8 1 2”
[I] at /home/aabhishek/all_ws/qt_ws/qgroundcontrol-herelink/src/FactSystem/ParameterManager.cc:785 - “Attemping load from cache”
[I] at /home/aabhishek/all_ws/qt_ws/qgroundcontrol-herelink/src/FactSystem/ParameterManager.cc:885 - “Parameters cache match failed /data/user/0/org.mavlink.qgroundcontrolNew/files/.config/QGroundControl.org/ParamCache/1_1.v2”
[E] at qrc:/toolbar/GPSRTKIndicator.qml:27 - “qrc:/toolbar/GPSRTKIndicator.qml:27: TypeError: Cannot read property ‘connected’ of null”
[E] at qrc:/toolbar/GPSRTKIndicator.qml:100 - “qrc:/toolbar/GPSRTKIndicator.qml:100: TypeError: Cannot read property ‘active’ of null”
[E] at qrc:/toolbar/GPSRTKIndicator.qml:112 - “qrc:/toolbar/GPSRTKIndicator.qml:112: TypeError: Cannot read property ‘numSatellites’ of null”
[!] at /home/aabhishek/all_ws/qt_ws/qgroundcontrol-herelink/src/VideoStreaming/VideoReceiver.cc:355 - “VideoReceiver::start() failed. Error with gst_element_factory_make(‘amcviddec-omxarmvideov5xxdecoder’)”
[E] at /home/aabhishek/all_ws/qt_ws/qgroundcontrol-herelink/src/QtLocationPlugin/QGCTileCacheWorker.cpp:1112 - “No Internet Access”
[E] at :0 - “QGeoTileRequestManager: Failed to fetch tile (46871,27344,16) 5 times, giving up. Last error message was: ‘Network not available’”
[E] at :0 - “QGeoTileRequestManager: Failed to fetch tile (46870,27344,16) 5 times, giving up. Last error message was: ‘Network not available’”
[E] at /home/aabhishek/all_ws/qt_ws/qgroundcontrol-herelink/src/QtLocationPlugin/QGCTileCacheWorker.cpp:1112 - “No Internet Access”

Please help urgently. @philip @Michael_Oborne

@sidbh, any hints?

@Abhishek_Aggarwal please use this method of installation and check if the issue is resolved.

@sidbh which link?

https://docs.cubepilot.org/user-guides/herelink/herelink-user-guides/oem-image-setup#example-app-change

@sidbh I tried the method mentioned by you and my issue is resolved. However, can you please give me some clarity on what is leading to such issues? Is there any restriction on permissions for hardware decoder?

Hi @Abhishek_Aggarwal

Can you please share your Kits configuration snap for compiler and debugger setting.

Thank you @Abhishek_Aggarwal

I am getting build error while building Qgroundcontrol App
[100%] Building CXX object CMakeFiles/QGroundControl.dir/QGroundControl_autogen/22EX5NVWOJ/qrc_PX4Resources.cpp.o
[100%] Building CXX object CMakeFiles/QGroundControl.dir/QGroundControl_autogen/HUTYNDADG6/qrc_airmap.cpp.o
[100%] Building CXX object CMakeFiles/QGroundControl.dir/QGroundControl_autogen/K2NRVMZOSX/qrc_airmap_dummy.cpp.o
[100%] Linking CXX executable QGroundControl
src/FlightDisplay/libFlightDisplay.a(VideoManager.cc.o): In function VideoManager::_updateSettings()': /CMakeFiles/QGroundControl.dir/build.make:349: recipe for target 'QGroundControl' failed CMakeFiles/Makefile2:70: recipe for target 'CMakeFiles/QGroundControl.dir/all' failed Makefile:129: recipe for target 'all' failed Makefile:72: recipe for target 'gcc_64' failed home/rajkumar/qgc/src/FlightDisplay/VideoManager.cc:245: undefined reference to VideoStreamControl::videoStreamUrl()’
src/FlightDisplay/libFlightDisplay.a(VideoManager.cc.o): In function VideoManager::setToolbox(QGCToolbox*)': /home/rajkumar/qgc/src/FlightDisplay/VideoManager.cc:69: undefined reference to VideoStreamControl::VideoStreamControl()’
/home/rajkumar/qgc/src/FlightDisplay/VideoManager.cc:69: undefined reference to VideoStreamControl::videoStreamUrlChanged()' src/FlightDisplay/libFlightDisplay.a(VideoManager.cc.o): In function VideoManager::setToolbox(QGCToolbox*)’:
/home/rajkumar/Qt/5.11.0/gcc_64/include/QtCore/qobject.h:254: undefined reference to VideoStreamControl::staticMetaObject' src/FlightDisplay/libFlightDisplay.a(mocs_compilation.cpp.o): In function VideoManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)’:
/home/rajkumar/Qt/5.11.0/gcc_64/include/QtCore/qmetatype.h:1804: undefined reference to `VideoStreamControl::staticMetaObject’
collect2: error: ld returned 1 exit status
make[3]: *** [QGroundControl] Error 1
make[2]: *** [CMakeFiles/QGroundControl.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [gcc_64] Error 2
13:43:19: The process “/usr/bin/make” exited with code 2.
Error while building/deploying project qgc1 (kit: Qgc app)
When executing step “Make”
13:43:19: Elapsed time: 04:03.