[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Loading and "unloading" a shared library after use
From: Albert Astals Cid <aacid () kde ! org>
Date: 2014-04-21 21:27:06
Message-ID: 3036057.cmRC8QFDol () xps
[Download RAW message or body]
El Dilluns, 21 d'abril de 2014, a les 20:49:06, Shantanu Tushar Jha va
escriure:
> 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?
You can use QLibrary to load/unload libraries (basically a wrapper around
dlopen and friends). I have no idea what will happen if you still hold objects
created by those libraries in memory though (since i guess you'll need that
for PMC), my guess would be crashing :-/
I would suggest helping with the port of QtMultimediaKit to gestreamer-1.0, i
know that doesn't immediately help your users though :-/
Cheers,
Albert
>
> 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
> > Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic