Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GStreamer support #96

Open
vadi2 opened this issue Mar 24, 2017 · 15 comments
Open

Add GStreamer support #96

vadi2 opened this issue Mar 24, 2017 · 15 comments

Comments

@vadi2
Copy link

vadi2 commented Mar 24, 2017

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 mavlink/qgroundcontrol#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.

@probonopd
Copy link
Owner

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.

@vadi2
Copy link
Author

vadi2 commented Mar 24, 2017

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.

@probonopd
Copy link
Owner

Yes, the only question is if not even you (as the author) knows which plugins are really needed, how could linuxdeployqt?

@vadi2
Copy link
Author

vadi2 commented Mar 24, 2017 via email

@probonopd
Copy link
Owner

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.

@probonopd
Copy link
Owner

probonopd commented Nov 6, 2017

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: subsurface/subsurface#769 (comment)

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?

@probonopd
Copy link
Owner

Related to #123

@probonopd
Copy link
Owner

For GST_* environment variables, see https://github.com/AppImage/AppImageKit/wiki/Bundling-GTK3-apps

@zendre4
Copy link

zendre4 commented Mar 6, 2018

+1

@probonopd
Copy link
Owner

Also see ubuntu/snapcraft-desktop-helpers#49 -- some environment variable(s) may need to be set, either from a launcher script or inside the Qt application's source code.

@vadi2
Copy link
Author

vadi2 commented Jun 29, 2019

Between this issue and #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.

@TheAssassin
Copy link
Collaborator

Please also check out our discussion(s) about making a linuxdeploy plugin for GStreamer. See linuxdeploy/linuxdeploy#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.

@vadi2
Copy link
Author

vadi2 commented Jun 29, 2019

That would be great. I don't have capacity to start another project myself.

@probonopd
Copy link
Owner

@probonopd
Copy link
Owner

probonopd commented Jul 7, 2019

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants