Loading and "unloading" a shared library after use

Shantanu Tushar Jha shantanu at kde.org
Mon Apr 21 15:19:06 UTC 2014


Hi fellow devs,

In the latest Kubuntu release, 14.04, Plasma Media Center's primary feature
- playback of audio and video has stopped working. This is because we link
to libplasma which in turn links to libgstreamer-1.0 while QtMultimediaKit
links to libgstreamer-0.10. This upsets Glib because it doesn't want the
same binary load both gstreamer-1.0 and gstreamer-0.10[1]

Now, we use (and link to) Plasma for two things-

   - Setting the Oxygen theme -
   Plasma::Theme::defaultTheme()->setThemeName("oxygen")
   - Load PMC's main QML file and images which are part of a Plasma::Package

Removing these two from the code, and removing the link to libplasma, we
can get PMC to play stuff fine. However, this means we 1. use the Air theme
which doesn't really look very nice[2] and 2. we need to figure out another
way to locate the installed QML files. The latter is workable, but we
really want to be able to use Oxygen Plasma theme.

We do both these things when the app starts, so I am wondering if there is
a way we could dynamically load libplasma, make these two method calls, and
somehow "unload" libplasma. I have two questions -


   - Does that ^ even make sense? Will it solve the problem?
   - If yes, how exactly do you do it?

Help appreciated, so that our users can play their audio and video again ;)

Cheers,
[1]
http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/random/porting-to-1.0.txtsection
"Troubleshooting"
[2] http://i.imgur.com/0k1TTwW.png

-- 
Shantanu Tushar    (UTC +0530)
http://www.shantanutushar.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140421/28dad53b/attachment.html>


More information about the Plasma-devel mailing list