From b06a9be61e4839c37213d0f62b2ef36fcb948bb0 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 30 Jan 2006 12:57:02 +0000 Subject: [PATCH] Link against Gst Data protocol libraries. Original commit message from CVS: * configure.ac: * gst/Makefile.am: Link against Gst Data protocol libraries. * gst/__init__.py: Restore dlopenflags after importing gst. Closes #329110 --- ChangeLog | 9 +++++++++ configure.ac | 12 ++++++++++++ gst/Makefile.am | 2 +- gst/__init__.py | 14 +++++++------- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 79cf22c..10cdd76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-01-30 Edward Hervey + + * configure.ac: + * gst/Makefile.am: + Link against Gst Data protocol libraries. + * gst/__init__.py: + Restore dlopenflags after importing gst. + Closes #329110 + === release 0.10.2 === 2006-01-16 Thomas Vander Stichele diff --git a/configure.ac b/configure.ac index 82a1aca..a379a7d 100644 --- a/configure.ac +++ b/configure.ac @@ -93,6 +93,18 @@ fi AC_SUBST(GST_NET_LIBS) AC_SUBST(GST_NET_CFLAGS) +dnl check for gstreamer-dataprotocol +PKG_CHECK_MODULES(GST_DP, gstreamer-dataprotocol-$GST_MAJORMINOR >= $GST_REQ, + HAVE_GST_DP="yes", HAVE_GST_DP="no") + +if test "x$HAVE_GST_DP" = "xno"; then + AC_MSG_ERROR(no GStreamer Data Protocol Libs found) +fi + +AC_SUBST(GST_DP_LIBS) +AC_SUBST(GST_DP_CFLAGS) + + dnl check for gst-plugins-base PKG_CHECK_MODULES(GST_PLUGINS_BASE, gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPB_REQ, HAVE_GST_PLUGINS_BASE="yes", HAVE_GST_PLUGINS_BASE="no") diff --git a/gst/Makefile.am b/gst/Makefile.am index 3a28262..a996869 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -31,7 +31,7 @@ GEN_FILES = arg-types.py gst-types.defs libs.defs base.defs _gst_la_CFLAGS = $(common_cflags) _gst_la_LIBADD = $(common_libadd) $(GST_BASE_LIBS) _gst_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_gst \ - $(GST_BASE_LIBS) $(GST_CONTROLLER_LIBS) $(GST_NET_LIBS) + $(GST_BASE_LIBS) $(GST_CONTROLLER_LIBS) $(GST_NET_LIBS) $(GST_DP_LIBS) _gst_la_SOURCES = \ gst-argtypes.c \ gstmodule.c \ diff --git a/gst/__init__.py b/gst/__init__.py index 725a3d1..ab99a3e 100644 --- a/gst/__init__.py +++ b/gst/__init__.py @@ -36,13 +36,6 @@ if 'gobject' not in sys.modules: import pygtk pygtk.require('2.0') -try: - import DLFCN - sys.setdlopenflags(DLFCN.RTLD_LAZY | DLFCN.RTLD_GLOBAL) - del sys, DLFCN -except ImportError: - pass - class Value: def __init__(self, type): assert type in ('fourcc', 'intrange', 'doublerange', 'fractionrange', 'fraction') @@ -90,9 +83,16 @@ class Fraction(Value): def __repr__(self): return '' % (self.num, self.denom) +import DLFCN, sys +dlsave = sys.getdlopenflags() +sys.setdlopenflags(DLFCN.RTLD_LAZY | DLFCN.RTLD_GLOBAL) + from _gst import * import interfaces +sys.setdlopenflags(dlsave) +del DLFCN, sys + # 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, -- 2.7.4