Video plays on a new Window while launched through gstreamer in Qt6 qml application
-
@Thanush said in Video plays on a new Window while launched through gstreamer in Qt6 qml application:
GstElement *sink = gst_element_factory_make ("qmlglsink", NULL);
This returns a null pointer, I'm not sure why
@Thanush said in Video plays on a new Window while launched through gstreamer in Qt6 qml application:
qmlglsink
What is your OS? What is your gstreamer version? In order to use qml6glsink(or qmlglsink), you need to install GStreamer Good Plug-in. It is likely that gstreamer good plug-in does not include qml6glsink because it needs qt 6 to be built. In this case, you have to build gstreamer with Qt6 by yourself. The old gstreamer versions do not have qml6glsink.
-
@Thanush said in Video plays on a new Window while launched through gstreamer in Qt6 qml application:
qmlglsink
What is your OS? What is your gstreamer version? In order to use qml6glsink(or qmlglsink), you need to install GStreamer Good Plug-in. It is likely that gstreamer good plug-in does not include qml6glsink because it needs qt 6 to be built. In this case, you have to build gstreamer with Qt6 by yourself. The old gstreamer versions do not have qml6glsink.
-
Did you install the GStreamer plugin packages ?
-
@SGaist These are the gstreamer packages present in my ubuntu
ii gir1.2-gstreamer-1.0:amd64 1.20.3-0ubuntu1 amd64 GObject introspection data for the GStreamer library ii gstreamer1.0-alsa:amd64 1.20.1-1ubuntu0.1 amd64 GStreamer plugin for ALSA ii gstreamer1.0-clutter-3.0:amd64 3.0.27-2ubuntu1 amd64 Clutter PLugin for GStreamer 1.0 ii gstreamer1.0-gl:amd64 1.20.1-1ubuntu0.1 amd64 GStreamer plugins for GL ii gstreamer1.0-gtk3:amd64 1.20.3-0ubuntu1.1 amd64 GStreamer plugin for GTK+3 ii gstreamer1.0-libav:amd64 1.20.3-0ubuntu1 amd64 ffmpeg plugin for GStreamer ii gstreamer1.0-packagekit 1.2.5-2ubuntu2 amd64 GStreamer plugin to install codecs using PackageKit ii gstreamer1.0-pipewire:amd64 0.3.48-1ubuntu3 amd64 GStreamer 1.0 plugin for the PipeWire multimedia server ii gstreamer1.0-plugins-bad:amd64 1.20.3-0ubuntu1.1 amd64 GStreamer plugins from the "bad" set ii gstreamer1.0-plugins-base:amd64 1.20.1-1ubuntu0.1 amd64 GStreamer plugins from the "base" set ii gstreamer1.0-plugins-base-apps 1.20.1-1ubuntu0.1 amd64 GStreamer helper programs from the "base" set ii gstreamer1.0-plugins-good:amd64 1.20.3-0ubuntu1.1 amd64 GStreamer plugins from the "good" set ii gstreamer1.0-plugins-ugly:amd64 1.20.1-1 amd64 GStreamer plugins from the "ugly" set ii gstreamer1.0-pulseaudio:amd64 1.20.3-0ubuntu1.1 amd64 GStreamer plugin for PulseAudio (transitional package) ii gstreamer1.0-tools 1.20.3-0ubuntu1 amd64 Tools for use with GStreamer ii gstreamer1.0-x:amd64 1.20.1-1ubuntu0.1 amd64 GStreamer plugins for X11 and Pango ii libgstreamer-gl1.0-0:amd64 1.20.1-1ubuntu0.1 amd64 GStreamer GL libraries ii libgstreamer-plugins-bad1.0-0:amd64 1.20.3-0ubuntu1.1 amd64 GStreamer libraries from the "bad" set ii libgstreamer-plugins-base1.0-0:amd64 1.20.1-1ubuntu0.1 amd64 GStreamer libraries from the "base" set ii libgstreamer-plugins-base1.0-dev:amd64 1.20.1-1ubuntu0.1 amd64 GStreamer development files for libraries from the "base" set ii libgstreamer-plugins-good1.0-0:amd64 1.20.3-0ubuntu1.1 amd64 GStreamer development files for libraries from the "good" set ii libgstreamer-plugins-good1.0-dev 1.20.3-0ubuntu1.1 amd64 GStreamer development files for libraries from the "good" set ii libgstreamer1.0-0:amd64 1.20.3-0ubuntu1 amd64 Core GStreamer libraries and elements ii libgstreamer1.0-dev:amd64 1.20.3-0ubuntu1 amd64 GStreamer core development files
-
@SGaist Hi! Does qmlglsink/qml6glsink support in qt6.7? Because I am getting a qml error
QQmlApplicationEngine failed to load component qrc:/untitled8/main.qml:4:1: module "org.freedesktop.gstreamer.GstGLQt6VideoItem" is not installed
Once I comment out this line in main.qml, the application is running but no video is displaying.
-
@SGaist Hi! Does qmlglsink/qml6glsink support in qt6.7? Because I am getting a qml error
QQmlApplicationEngine failed to load component qrc:/untitled8/main.qml:4:1: module "org.freedesktop.gstreamer.GstGLQt6VideoItem" is not installed
Once I comment out this line in main.qml, the application is running but no video is displaying.
-
@Thanush It's not a Qt 6 issue, it's a GStreamer issue. I think the version you are using is too old and does not contain the class yet.
-
That would be it, yes.
-
Hi @SGaist, I see that the gstreamer version contains the qml6glsink, but after downloading from the https://gstreamer.freedesktop.org/src/gstreamer/ .... but i am not sure how it needs to be configured against the old version of gstreamer present in ubuntu..
-
You would have to build the plugin yourself and link against it.