gi.RepositoryError: Requiring namespace 'Gst' version '0.10', but '1.0' is already loaded
Simon Feltman
s.feltman at gmail.com
Tue Apr 2 15:51:15 PDT 2013
On Tue, Apr 2, 2013 at 12:51 PM, Kip Warner <kip at thevertigo.com> wrote:
>
> It's true that the 1.0 package is available in the official
> repositories, but the problem is that I want to make it as painless as
> possible for the user and not have to do anything, ideally, beyond
> popping in the disc. Any suggestions?
Some ideas... You might be able to ship the GstVideo-1.0 typelib along
with relevant .so files with your app in a custom location. Then append
these locations (depending on architecture) to GI_TYPELIB_PATH and
LD_LIBRARY_PATH
before importing anything in python. But I don't know how well this would
work and it seems like it would require a lot of maintenance. I think a
cleaner solution with be to just interface with apt (or PackageKit) to see
if it is installed and ask the user if they want to install it if it isn't.
A minimal Ubuntu specific example:
try:
gi.require_version('GstVideo', '1.0')
except ValueError:
# Inform user they don't have the GstVideo 1.0 and ask them to install
it
subprocess.call(['software-center', 'gir1.2-gst-plugins-base-1.0'])
gi.require_version('GstVideo', '1.0')
from gi.repository import GstVideo
Hope this helps,
-Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130402/87ba877a/attachment.html>
More information about the gstreamer-devel
mailing list