linuxdeployqt
linuxdeployqt copied to clipboard
Add GStreamer support
Plugins loaded at runtime by GStreamer aren't included by the tool right now (as visible by strace on this app, for example). I suspect this manifests as https://github.com/mavlink/qgroundcontrol/issues/4803 as well.
GStreamer is a bit tricky as apps might not need the video plugins but audio so it would be nice to be able to specify what kind of support is included in the AppImage.
Would running linuxdeployqt
twice and copying in the required plugins manually between the two runs be an acceptable solution? If they do not get included this may be an indication that the plugins are dlopen()
ed and hence not found by ldd
.
The problem is figuring out which plugins are required... my application for example only needs audio and I can't tell between all the gstreamer which are needed. It would be nice for linuxdeployqt to handle that for me, like it handles deployment of other libraries.
I suspect patchelf will also need to be run on gstreamer to load the plugins from the new correct location.
Yes, the only question is if not even you (as the author) knows which plugins are really needed, how could linuxdeployqt
?
Options could be made available to ship all, video only, or sound only plugins.
On Fri, 24 Mar 2017 8:05 pm probonopd, [email protected] wrote:
Yes, the only question is if not even you (as the author) knows which plugins are really needed, how could linuxdeployqt?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/probonopd/linuxdeployqt/issues/96#issuecomment-289116622, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGxjAuMcZXx8ZCB-cZ3SsP9BRMU3nSIks5rpBPegaJpZM4MnzBu .
Not sure whether this should fall into the scope of linuxdeployqt
since macdeployqt
also doesn't do things like this. For now, needs to be done by hand.
Anyone: Feel free to reopen if you volunteer to work on this.
For starters, whenever linuxdeployqt
bundles libQt5WebKit.so.5
then some GStreamer libraries are also bundled. Among these is libgstreamer-1.0.so.0
which tries to load stuff from the base system using hardcoded paths, with is guaranteed to be a disaster when versions don't match.
me@host:~$ strings squashfs-root/usr/lib/libgstreamer-1.0.so.0 | grep /x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner
/usr/lib/x86_64-linux-gnu/gstreamer-1.0
Example: https://github.com/Subsurface-divelog/subsurface/issues/769#issuecomment-342208051
So, if we are not actually using GStreamer functionality, an easy way to shoot it down is:
sed -i -e 's|/usr/lib/x86_64-linux-gnu|/usr/lib/x86_64-linux-xxx|g' squashfs-root/usr/lib/libgstreamer-1.0.so.0
Bingo, no more trying to load stuff from the system, and hence, no more error messages on the command line.
An actual fix, however, would of course be to make linuxdeployqt
bundle to and load stuff (gst-plugin-scanner
and some? all? plugins) from inside the AppDir/AppImage. Volunteers?
Related to #123
For GST_*
environment variables, see https://github.com/AppImage/AppImageKit/wiki/Bundling-GTK3-apps
+1
Also see https://github.com/ubuntu/snapcraft-desktop-helpers/issues/49 -- some environment variable(s) may need to be set, either from a launcher script or inside the Qt application's source code.
Between this issue and https://github.com/probonopd/linuxdeployqt/issues/123, it's confusing as to what needs to be done to make sound in Qt applications work (because they rely on GStreamer).
I'm seeing the following errors:
GStreamer-WARNING **: 16:25:50.865: External plugin loader failed. This most likely means that the plugin loader helper binary was not found or could not be run. You might need to set the GST_PLUGIN_SCANNER environment variable if your setup is unusual. This should normally not be required though.
GStreamer-WARNING **: 16:25:50.877: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstdebug.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstdebug.so: undefined symbol: gst_make_element_message_details
GStreamer-WARNING **: 16:25:50.888: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstsoup.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstsoup.so: undefined symbol: gst_element_message_full_with_details
What should be adjusted? It's not clear what work has been done on AppImage to aid the integration so I'm not sure where to start.
Please also check out our discussion(s) about making a linuxdeploy plugin for GStreamer. See https://github.com/linuxdeploy/linuxdeploy/issues/80. We'd like to find a contributor who could invest the time to make this work. We will happily support anyone who's willing to work on making such a plugin.
That would be great. I don't have capacity to start another project myself.
Here is an example: FrancescoCeruti/linux-show-player#53 Also see: https://github.com/GStreamer/gstreamer/blob/master/scripts/gst-uninstalled
Would welcome pull requests.
Basically, whenever libgstreamer-1.0.so.0
is deployed, we would need to also deploy the contents of /usr/lib/x86_64-linux-gnu/gstreamer-1.0/
to ./usr/lib/gstreamer-1.0/
and use an AppRun
to set the GStremer environment variables. (It would be nice if we could get around doing the latter somehow.)