[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: Sinny Kumari <ksinny () gmail ! com>
Date: 2014-04-23 17:55:54
Message-ID: CABbDtLrQOyB5ioaO8ZjxY68gCGw9LiM6cTtLV9NeMwWC=W-ovA () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi,
On Tue, Apr 22, 2014 at 2:57 AM, Albert Astals Cid <aacid@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
[Attachment #5 (text/html)]
<div dir="ltr">Hi,<br><div><div class="gmail_extra"><br><br><div \
class="gmail_quote">On Tue, Apr 22, 2014 at 2:57 AM, Albert Astals Cid <span \
dir="ltr"><<a href="mailto:aacid@kde.org" \
target="_blank">aacid@kde.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">El Dilluns, 21 d'abril de 2014, a les \
20:49:06, Shantanu Tushar Jha va<br> escriure:<br>
<div class="">> Hi fellow devs,<br>
><br>
> In the latest Kubuntu release, 14.04, Plasma Media Center's primary \
feature<br> > - playback of audio and video has stopped working. This is because \
we link<br> > to libplasma which in turn links to libgstreamer-1.0 while \
QtMultimediaKit<br> > links to libgstreamer-0.10. This upsets Glib because it \
doesn't want the<br> > same binary load both gstreamer-1.0 and \
gstreamer-0.10[1]<br> ><br>
> Now, we use (and link to) Plasma for two things-<br>
><br>
</div>> - Setting the Oxygen theme -<br>
<div class="">> \
Plasma::Theme::defaultTheme()->setThemeName("oxygen")<br> </div>> \
- Load PMC's main QML file and images which are part of a Plasma::Package<br> \
<div class="">><br> > Removing these two from the code, and removing the link \
to libplasma, we<br> > can get PMC to play stuff fine. However, this means we 1. \
use the Air theme<br> > which doesn't really look very nice[2] and 2. we need \
to figure out another<br> > way to locate the installed QML files. The latter is \
workable, but we<br> > really want to be able to use Oxygen Plasma theme.<br>
><br>
> We do both these things when the app starts, so I am wondering if there is<br>
> a way we could dynamically load libplasma, make these two method calls, and<br>
> somehow "unload" libplasma. I have two questions -<br>
><br>
><br>
> - Does that ^ even make sense? Will it solve the problem?<br>
</div>> - If yes, how exactly do you do it?<br>
<br>
You can use QLibrary to load/unload libraries (basically a wrapper around<br>
dlopen and friends). I have no idea what will happen if you still hold objects<br>
created by those libraries in memory though (since i guess you'll need that<br>
for PMC), my guess would be crashing :-/<br>
<br>
I would suggest helping with the port of QtMultimediaKit to gestreamer-1.0, i<br>
know that doesn't immediately help your users though :-/<br>
<br clear="all"></blockquote><div><br> </div></div>We ended up loading and unloading \
libplasma after use using QLibrary. Review request for same is here <a \
href="https://git.reviewboard.kde.org/r/117691/">https://git.reviewboard.kde.org/r/117691/</a> \
. It will be good if someone review it whether it is good to go or not.<br>
<br></div><div class="gmail_extra">Thanks<br></div><div class="gmail_extra">-- <br><a \
href="http://www.sinny.in" target="_blank">http://www.sinny.in</a> </div></div></div>
>> 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