From b9d59e3e997879a6a0640d11fc12e1886e3e9ddc Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Wed, 31 Aug 2005 15:28:37 +0000 Subject: [PATCH] gst/__init__.py: del ltihooks properly; fixes loading of testhelper in testsuite Original commit message from CVS: * gst/__init__.py: del ltihooks properly; fixes loading of testhelper in testsuite * gst/gst.defs: wrap link_filtered --- ChangeLog | 15 +++++++++++++++ common | 2 +- gst/__init__.py | 17 ++++++++++++++++- gst/gst.defs | 10 ++++++++++ 4 files changed, 42 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bc13b4015a..25b155467c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2005-08-31 Thomas Vander Stichele + + * gst/__init__.py: + del ltihooks properly; fixes loading of testhelper in testsuite + * gst/gst.defs: + wrap link_filtered + +2005-08-26 Thomas Vander Stichele + + * configure.ac: + require base and controller as well since we wrap them + * gst/__init__.py: + if using ltihooks, import interfaces and then uninstall our + module importer so we don't crap all over someone else's + 2005-08-19 Andy Wingo * gst/interfaces.defs (MixerTrack): MixerTrack is a GObject. How diff --git a/common b/common index 8ff526a316..3fb3bedc91 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 8ff526a316f9b576e727b8e32cba0a53cdec07a6 +Subproject commit 3fb3bedc9180bab9dc8c2dc784c9327bd1cc8109 diff --git a/gst/__init__.py b/gst/__init__.py index 711b53d3ae..be6aab0f8e 100644 --- a/gst/__init__.py +++ b/gst/__init__.py @@ -21,11 +21,15 @@ # # Author: David I. Lehn +__ltihooks_used__ = False try: - import ltihooks + import ltihooks + __ltihooks_used__ = True except: pass +import ltihooks + import gobject del gobject @@ -73,3 +77,14 @@ class Fraction(Value): return '' % (self.num, self.denom) from _gst import * +# this restores previously installed importhooks, so we don't interfere +# with other people's module importers +# it also clears out the module completely as if it were never loaded, +# so that if anyone else imports ltihooks the hooks get installed +if __ltihooks_used__: + import gst.interfaces as interfaces + ltihooks.uninstall() + __ltihooks_used__ = False + del ltihooks + import sys + del sys.modules['ltihooks'] diff --git a/gst/gst.defs b/gst/gst.defs index 9c479cdc1a..acd4813df1 100644 --- a/gst/gst.defs +++ b/gst/gst.defs @@ -5676,6 +5676,16 @@ ) ) +(define-method link_filtered + (of-object "GstElement") + (c-name "gst_element_link_filtered") + (return-type "gboolean") + (parameters + '("GstElement*" "dest") + '("GstCaps*" "filter") + ) +) + (define-function element_unlink_many (c-name "gst_element_unlink_many") (return-type "none")