qml6glsink
-
@JoeCFD
While that information will be useful eventually. For now I am stuck trying to get the plugin included with the Yocto created Linux distribution.I have the following in gstreamer1.0-plugins-good_%.bbappend:
QTWAYLANDDEPENDS = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "qtwayland", "", d)}"
PACKAGECONFIG[qt6] = "-Dqt6=enabled,-Dqt6=disabled,qtbase qtdeclarative qtbase-native qttools-native ${QTWAYLANDDEPENDS}"
PACKAGECONFIG:append = "qt6"But I get the following error:
| ../git/ext/qt6/meson.build:37:4: ERROR: Problem encountered: qt6 qmlglsink plugin is enabled, but qt specific tools were not found
This may be related to the following:
I'm working on implementing their suggestion.
-
@ABest2 Same here.
I've built a Yocto Mickledore for i.MX93 and I'm struggling trying to display a video source using Qt6 QML Video component. I get nothing but a blank image (sound works fine).
The same if using MediaPlayer + VideoOutput components.I can play it with no issues using QtWidgets and also gst-launch-1.0 can play the stream.
On Qt5 there is no problem at all, and I can play videos on QML.
GStreamer version is the same as yours (1.22.0)
According to this Qt6 support for rendering video inside a QML scene, but I cannot manage to make it working.These are the options added to my local.conf file:
IMAGE_INSTALL:append = " qtmultimedia qtmultimedia-plugins qtmultimedia-qmlplugins" VIDEO_TOOLS = " \ gstreamer1.0 \ gstreamer1.0-plugins-good \ gstreamer1.0-plugins-base \ gstreamer1.0-plugins-ugly \ gstreamer1.0-libav \ gst-player \ gstreamer1.0-meta-base \ gst-examples \ gstreamer1.0-rtsp-server \ " IMAGE_INSTALL:append = " ${VIDEO_TOOLS}" LICENSE_FLAGS_ACCEPTED += "commercial"
-
@ABest2 Nope, that's the problem.
I'm not able to get any QML pluggin installed on Yocto.
I don't have much time right now, but maybe this can help us -although it's a Qt5 related issue-I just tried the following:
PACKAGECONFIG:append:pn-gstreamer1.0-plugins-good = " qmlglsink" PACKAGECONFIG:append:pn-gstreamer1.0-plugins-good = " qmlglsrc" PACKAGECONFIG:append:pn-qtmultimedia = " gstreamer qml"
But it didn't work at all. Still no QML plugin available.
-
@ABest2 said in qml6glsink:
I'm working on implementing their suggestion.
Did you managed to fix the error?
I've applied the patch directly in gstreamer1.0-plugins-good_1.22.0.imx.bb and got compiled without errors but with 2 warnings:WARNING: gstreamer1.0-plugins-good-1.22.0.imx-r0 do_configure: QA Issue: gstreamer1.0-plugins-good: invalid PACKAGECONFIG: qmlglsink [invalid-packageconfig] WARNING: gstreamer1.0-plugins-good-1.22.0.imx-r0 do_configure: QA Issue: gstreamer1.0-plugins-good: invalid PACKAGECONFIG: qmlglsrc [invalid-packageconfig]
Still no qml plugins found on Yocto :-(
-
@nben386 Still not able to get gstreamer working with QML.
I'm considering using another approach and creating my own video sink class.
If your Qt version is 6, there is a QVideoSink class that could help us, but I don't have enough time and it'll take some time to implement it and check if it works -
@imahgin Maybe try to post your issue to gstreamer forum
https://discourse.gstreamer.org/I tried to build gstreamer 1.22.7 + Qt 6.6 from the source. Because Qt 6.6 is installed under /opt, the include path of Qt is not set properly in gstreamer build script and the build of examples in plugin-good failed. Also tried to disable examples build in plugin-good and could not do it.
It seems that qml6 sink build is not enabled automatically. I enabled it manually and the build of gstreamer did include qml6 sink. I guess the build script of gstreamer still has some issues with Qt. It is likely that qml6 sink build may work with the Qt6 within the distribution of Linux. Have not tried it yet.
-
@ABest2 said in qml6glsink basketball random:
We're moving to Qt6 as we migrate to Yocto Mickledore. We are using i.MX8M Plus devices. Has anyone managed to get the qml6glsink gstreamer plugin built into a Yocto project for i.MX8M Plus devices?
I'm also in the process of migrating to Qt6 and Yocto Mickledore, and I'm also interested in integrating the qml6glsink GStreamer plugin into my Yocto project for i.MX8M Plus devices. If anyone in the community has insights, tips, or successful experience building the qml6glsink plugin for i.MX8M Plus in the Yocto project, I would greatly appreciate any guidance.
-
@Dure1966 A very simple way to do this is to build it from the source. The source code is under gstreamer/subprojects/gst-plugins-good/ext/qt6 if you download gstreamer source code from here:
https://gitlab.freedesktop.org/gstreamer/gstreamer.gitTry to build it with Qt 6 and your app. Then you can use it in your app. Sure you will have license issue. Better to build it into a plugin and put it at the right spot. Check where qml5glsink is located.
Take a look at qgroundcontrol project and it uses qml5sink source code for Android build.
If you build gstreamer and link it to your app, it can be messy. Better to use the one from distribution unless that gstreamer version is too old. It is the case for me. But I am still sticking to Qt5 for gstreamer and not keen to upgrade to Qt6.
-
Hi @imahgin,
>>I'm considering using another approach and creating my own video sink class.I did exactly that using QVideoSink and it works well. There is only one issue:
At some point I need to copy my image buffer to QVideoSink using "memcpy" which appears to cost high amount of CPU.
I am willing to share the code in exchange of hints on how to optimize CPU usage. -
@JoeCFD Installed Qt 6.6.1 and gstreamer 1.22.8. The prefix in all Qt pkg pc files is wrong. Wrote a script to replace all of them. It seems gstreamer meson build mainly uses pkg files to find Qt5/6. Anyway, my build of gstreamer with qml6 sink seems fine while I got the following files:
libgstqml6.so
in gstreamer/builddir/subprojects/gst-plugins-good/ext/qt6 andgstplugin.cc.o
gstqsg6glnode.cc.o
gstqt6glutility.cc.o
meson-generated_moc_qt6glitem.cpp.o
moc_qt6glitem.cpp
gstqml6glsink.cc.o
gstqt6element.cc.o
meson-generated_moc_gstqsg6glnode.cpp.o
moc_gstqsg6glnode.cpp
qt6glitem.cc.oin gstreamer/builddir/subprojects/gst-plugins-good/ext/qt6/libgstqml6.so.p
libgstqml6.so is installed at the right place as well. A strange thing is gst-inspect-1.0 does not show gstqml6glsink. Need to try an example with gstqml6glsink.