[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Loading and "unloading" a shared library after use
From:       Shantanu Tushar Jha <shantanu () kde ! org>
Date:       2014-04-21 15:31:06
Message-ID: CABQ4Km8Ec+vBtugK5LrdsnwwTdixsG4L+MeU1Qy26XcyM8Xtsw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

[Attachment #5 (text/html)]

<div dir="ltr"><div><div>Hi fellow devs,<br><br></div>In the latest Kubuntu release, \
14.04, Plasma Media Center&#39;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&#39;t want the same binary load both gstreamer-1.0 and \
gstreamer-0.10[1]<br> <br></div><div>Now, we use (and link to) Plasma for two \
things-<br><ul><li>Setting the Oxygen theme - \
Plasma::Theme::defaultTheme()-&gt;setThemeName(&quot;oxygen&quot;)</li><li>Load \
PMC&#39;s main QML file and images which are part of a Plasma::Package</li> \
</ul><p>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&#39;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.<br> </p><p>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 &quot;unload&quot; libplasma. I have two questions \
-</p> <p></p><ul><li>Does that ^ even make sense? Will it solve the \
problem?</li><li>If yes, how exactly do you do it?</li></ul><p>Help appreciated, so \
that our users can play their audio and video again ;)</p><p>Cheers,<br></p> \
</div><div><div><div>[1] <a \
href="http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/random/porting-to-1.0. \
txt">http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/random/porting-to-1.0.txt</a> \
section &quot;Troubleshooting&quot;<br> [2] <a \
href="http://i.imgur.com/0k1TTwW.png">http://i.imgur.com/0k1TTwW.png</a><br><br>-- \
<br>Shantanu Tushar      (UTC +0530)<br><a href="http://www.shantanutushar.com" \
target="_blank">http://www.shantanutushar.com</a> </div></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