Skip to content
Qt 6.11 is out! See what's new in the release blog
  • 144k Topics
    724k Posts
    F
    Hello, the title says it all. What i've done so far: 1. I installed gstreamer on my linux pc. https://gstreamer.freedesktop.org/documentation/installing/on-linux.html?gi-language=c 2. I read the very informativ tutorials at: https://gstreamer.freedesktop.org/documentation/tutorials/?gi-language=c 3. I tried and played around with the qmlsink module: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/tree/main/subprojects/gst-plugins-good/tests/examples/qt/qmlsink?ref_type=heads 4. I downloaded the precompiled gstreamer libraries for android: https://gstreamer.freedesktop.org/data/pkg/android/ 5. I followed the install guide for gstreamer on android: https://gstreamer.freedesktop.org/documentation/installing/for-android-development.html?gi-language=c I already had NDK, gradle and co, because i already develop cross-platform with Qt. 6. I built the android tutorials with gradle: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/tree/main/subprojects/gst-docs/examples/tutorials/android?ref_type=heads 7. So, now, the time has come to combine these things. I adapted the qmake based project from the qmlsink example. My test project contains a simple pipeline ("audiotestsrc ! autoaudiosink"), which works just fine on linux. So i naively set in the pro file: PKGCONFIG=/PATH/TO/GSTREAMER/arm64/lib/gstreamer-1.0/pkgconfig in the pro file. And i got: "Cross compiling without sysroot. Disabling pkg-config." So, i tried to add the libraries manually, which seemed to work instantly. It compiled, it ran, it crashed... It crashed not at the beginning, it crashed at a very boring line in the middle. I tried a lot of combinations of: CMake QMake Qt 6.5 6.8 6.11 GStreamer 1.26.13 1.28.3 1.29.1 Debian 12 (openjdk 17), Debian 13 (openjdk 21) Huawai Android 7 (API 24), Samsung Android 16 (API 36) And the result is always the same, it crashes at the same line. Whether its my old Huawei with Qt 6.5, or with the new Samsung and Qt 6.11. So, this issue can't be new... I searched the forum and the web. The conclusion: other people added the libraries manually and it worked (a few year ago). Most of the information is not up-to-date, library names and the need to register modules for example. This seemed to be a dead end, so... 8. I looked closer into the code of the working Android+GStreamer tutorial programs. https://gitlab.freedesktop.org/gstreamer/gstreamer/-/tree/main/subprojects/gst-docs/examples/tutorials/android/android-tutorial-1?ref_type=heads Starting with the build.gradle file of tutorial-1. This pointed me to the file 'jni/CMakeLists.txt' within the project. I tried to copy paste the relevant parts into the cmake file of my test project. cmake_minimum_required(VERSION 3.16) project(TestProject_GStreamer_CMake VERSION 0.1 LANGUAGES CXX) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt6 REQUIRED COMPONENTS Quick) qt_standard_project_setup(REQUIRES 6.8) qt_add_executable(appTestProject_GStreamer_CMake main.cpp gst_handler.h gst_handler.cpp ) qt_add_qml_module(appTestProject_GStreamer_CMake URI TestProject_GStreamer_CMake QML_FILES Main.qml ) # Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1. # If you are developing for iOS or macOS you should consider setting an # explicit, fixed bundle identifier manually though. set_target_properties(appTestProject_GStreamer_CMake PROPERTIES # MACOSX_BUNDLE_GUI_IDENTIFIER com.example.appTestProject_GStreamer_CMake MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} MACOSX_BUNDLE TRUE WIN32_EXECUTABLE TRUE ) # # # # LINUX - working fine # # # if(LINUX) find_package(PkgConfig REQUIRED) pkg_search_module(gstreamer REQUIRED IMPORTED_TARGET gstreamer-1.0) target_link_libraries(appTestProject_GStreamer_CMake PRIVATE Qt6::Quick PkgConfig::gstreamer ) endif() # # # # ANDROID - not working # # # if(ANDROID) set(GSTREAMER_ROOT_ANDROID "/home/felsi/Dokumente/TestProjects/gstreamer-1.0-android-universal-1.26.11") if(NOT DEFINED GSTREAMER_ROOT_ANDROID) message(FATAL_ERROR "GSTREAMER_ROOT_ANDROID is not defined!") endif() if(ANDROID_ABI STREQUAL "armeabi") set(GSTREAMER_ROOT "${GSTREAMER_ROOT_ANDROID}/arm") elseif(ANDROID_ABI STREQUAL "armeabi-v7a") set(GSTREAMER_ROOT "${GSTREAMER_ROOT_ANDROID}/armv7") elseif(ANDROID_ABI STREQUAL "arm64-v8a") set(GSTREAMER_ROOT "${GSTREAMER_ROOT_ANDROID}/arm64") elseif(ANDROID_ABI STREQUAL "x86") set(GSTREAMER_ROOT "${GSTREAMER_ROOT_ANDROID}/x86") elseif(ANDROID_ABI STREQUAL "x86_64") set(GSTREAMER_ROOT "${GSTREAMER_ROOT_ANDROID}/x86_64") else() message(FATAL_ERROR "Target arch ABI not supported: ${ANDROID_ABI}") endif() list(APPEND CMAKE_MODULE_PATH "${GSTREAMER_ROOT}/share/cmake") set(GSTREAMER_NDK_BUILD_PATH "${GSTREAMER_ROOT}/share/gst-android/ndk-build/") set(GSTREAMER_PLUGINS coreelements) find_library(LOG_LIB log REQUIRED) find_package(GStreamerMobile COMPONENTS ${GSTREAMER_PLUGINS} fonts REQUIRED) target_link_libraries(appTestProject_GStreamer_CMake PRIVATE Qt6::Quick PUBLIC GStreamer::mobile ${ANDROID_LIB} ${LOG_LIB} ) endif() install(TARGETS appTestProject_GStreamer_CMake BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) And i got "Could NOT find GLIB2", triggered at find_package(). The glib library is one of the precompiled libraries, included in the downloaded folder. It turned out, that find_package() calls a cmake file, which was added with list(APPEND CMAKE_MODULE_PATH ...). So i followed the rabbit to ".../share/cmake/FindGSTreamer.cmake" within the downloaded folder of the precompiled gstreamer libraries. This cmake file uses pkg-config and prepares the package, so that the cmake file in the project can easily find and link the needed modules. But i have no clue, why it's working for the tutorial, but not for my test project. I lack knowledge. However, this approach does not seem to be a dead end, it could be even quite elegant compared to the old qmake solutions, spread across the web. Unfortunately, i ran out of ideas how to fix it, because i am not very experienced with cmake and androiddeployqt. But maybe with a little help from some awesome person, who is, this might work... Thank you for reading the whole post.
  • Jobs, project showcases, announcements - anything that isn't directly development
    4k 23k
    4k Topics
    23k Posts
    J
    I mostly agree. Users might try an app because of its features, but they'll stop using it if the performance is poor. That said, there has to be a balance. A fast app with no useful features won't get very far either. I'm curious how others prioritize this. If you had limited development time, would you focus on adding new features or optimizing performance first?
  • Everything related to designing and design tools

    132 400
    132 Topics
    400 Posts
    godweiG
    [image: b6c267c8-8af6-4e1b-b44f-4e891e9c2656.png] 哥哥姐姐们,这个带搜索功能的帮助界面怎么恢复啊? How can I restore this help interface with search function?
  • Everything related to the Software Quality Tools

    95 260
    95 Topics
    260 Posts
    T
    Hi, just getting into Squish and I was wondering if anybody has any more advanced documentation or projects of MBT setups? I am trying to understand the limitations and possible application in my use case. I am unsure mostly of two things: Model generation through imports of existing graph files etc. automated path (test case) generation mostly if possible at all (found conflicting info) and if so how well it works. Any help, experience or pointers appreciated! thanks tim
  • Everything related to learning Qt.

    396 2k
    396 Topics
    2k Posts
    N
    Hello everyone, my name is Son, I'm software engineering. This is the first time I learn about QT, specially QML It's my Business Card; I hope to receive feedback from everyone so that I can improve further. [image: aa973453-ad53-455d-9ce9-8928cd4c47e5.png] [image: aa5e7bef-e1dc-457d-9aac-a4f52f07a99d.png]
  • 2k Topics
    13k Posts
    L
    Video: https://www.bilibili.com/video/BV1m67R6LEqS/ Source repo: https://github.com/baitianyu-kun/texstudio-harmony/
  • 4k Topics
    18k Posts
    M
    Sem ver o restante do código fica difícil identificar o problema. Verifique também se a conexão continua ativa no momento da consulta e se o nome da tabela está correto. Às vezes o erro está em um detalhe simples e acaba consumindo mais tempo do que imaginamos, quase como tentar descobrir quantos dias de 2027 já se passaram sem olhar um contador atualizado.
  • This is where all the posts related to the Qt web services go. Including severe sillyness.
    1k 10k
    1k Topics
    10k Posts
    SGaistS
    Hi, Are you using Squish ? If so I would open a ticket on the bug report system under that item.