GStreamer on Android
-
I build the GStreamer library including the Qt bindings, using the GStreamer's documents. and the
QT5
plugin became available in the provided bundle.now when I try to build the
libgstreamer_android.so
using the NDK, when I add theGSTREAMER_PLUGINS_QT5
plugin to theAndroid.mk
I receive a series ofundefined reference
linker issues about missing theQt
libraries.... ../gstqsgtexture.cc:36: error: undefined reference to 'QSGTexture::QSGTexture()' ../gstqsgtexture.cc:36: error: undefined reference to 'QOpenGLFunctions::QOpenGLFunctions()' ../gstqsgtexture.cc:40: error: undefined reference to 'QOpenGLFunctions::initializeOpenGLFunctions()' ../gstqsgtexture.cc:55: error: undefined reference to 'QSGTexture::~QSGTexture()' ../gstqsgtexture.cc:64: error: undefined reference to 'QOpenGLContext::functions() const' ../gstqsgtexture.cc:67: error: undefined reference to 'QSGTexture::~QSGTexture()' ../gstqsgtexture.cc:67: error: undefined reference to 'QSGTexture::~QSGTexture()' ../gstqsgtexture.cc:172: error: undefined reference to 'QOpenGLContext::functions() const' armeabi-v7a/moc_gstqsgtexture.cpp:88: error: undefined reference to 'QSGTexture::qt_metacast(char const*)' armeabi-v7a/moc_gstqsgtexture.cpp:93: error: undefined reference to 'QSGTexture::qt_metacall(QMetaObject::Call, int, void**)' /home/reza/QtProjects/GStreamerTest/gstreamer-1.0/armv7/lib/gstreamer-1.0/libgstqmlgl.a(moc_gstqsgtexture.o):moc_gstqsgtexture.cpp:GstQSGTexture::staticMetaObject: error: undefined reference to 'QSGTexture::staticMetaObject' /home/reza/QtProjects/GStreamerTest/gstreamer-1.0/armv7/lib/gstreamer-1.0/libgstqmlgl.a(moc_gstqsgtexture.o):moc_gstqsgtexture.cpp:vtable for GstQSGTexture: error: undefined reference to 'QSGTexture::normalizedTextureSubRect() const' /home/reza/QtProjects/GStreamerTest/gstreamer-1.0/armv7/lib/gstreamer-1.0/libgstqmlgl.a(moc_gstqsgtexture.o):moc_gstqsgtexture.cpp:vtable for GstQSGTexture: error: undefined reference to 'QSGTexture::isAtlasTexture() const' /home/reza/QtProjects/GStreamerTest/gstreamer-1.0/armv7/lib/gstreamer-1.0/libgstqmlgl.a(moc_gstqsgtexture.o):moc_gstqsgtexture.cpp:vtable for GstQSGTexture: error: undefined reference to 'QSGTexture::removedFromAtlas() const' /home/reza/QtProjects/GStreamerTest/gstreamer-1.0/armv7/lib/gstreamer-1.0/libgstqmlgl.a(moc_gstqsgtexture.o):moc_gstqsgtexture.cpp:typeinfo for GstQSGTexture: error: undefined reference to 'typeinfo for QSGTexture' clang++: error: linker command failed with exit code 1 (use -v to see invocation)
does anyone guide me on how I can resolve these linker issues?
reference to the Makefile that I'm using: https://github.com/ramajd/gstreamer-qt-android/blob/f7a3b3088fa16f255e5d0ba9972639447f0c91d8/android/jni/Android.mk
-
@Liffu Did you build gstreamer for Android? If yes, it may not be necessary. You can download any prebuilt version from here.
https://gstreamer.freedesktop.org/data/pkg/android/Show how you add gstreamer libs and plugins to your build.
QSGTexture is in module quick from here:
https://doc.qt.io/qt-5/qsgtexture.html
Add quick module into your build and the problem could be gone. I guess the module is needed by qml 5/6 sink inside gstreamer.make sure this module is wrapped into the pkg file.