Hi,

On Tue, Apr 22, 2014 at 2:57 AM, Albert Astals Cid <aa...@kde.org> wrote:

> 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 :-/
>
>

We ended up loading and unloading libplasma after use using QLibrary.
Review request for same is here https://git.reviewboard.kde.org/r/117691/ .
It will be good if someone review it whether it is good to go or not.

Thanks
-- 
http://www.sinny.in
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Reply via email to