From a52725ea45d913b28d49aec3067ca6622f12780d Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Tue, 20 Sep 2005 07:32:48 +0000 Subject: [PATCH] added missing symbols to api docs disable ref-count hack if we have glib >= 2.8 Original commit message from CVS: * configure.ac: * docs/gst/gstreamer-sections.txt: * gst/gstobject.c: added missing symbols to api docs disable ref-count hack if we have glib >= 2.8 --- ChangeLog | 8 ++++++++ configure.ac | 8 ++++++++ docs/gst/gstreamer-sections.txt | 7 ++++++- gst/gstobject.c | 6 ++++++ 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 75fb764..acf8485 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-09-19 Stefan Kost + + * configure.ac: + * docs/gst/gstreamer-sections.txt: + * gst/gstobject.c: + added missing symbols to api docs + disable ref-count hack if we have glib >= 2.8 + 2005-09-19 David Schleef * docs/gst/Makefile.am: Ignore a few more internal headers diff --git a/configure.ac b/configure.ac index 754574c..b0f4c0d 100644 --- a/configure.ac +++ b/configure.ac @@ -235,6 +235,14 @@ GLIB_CFLAGS=$GLIB2_CFLAGS AC_SUBST(GLIB_LIBS) AC_SUBST(GLIB_CFLAGS) +AC_MSG_CHECKING([glib version >= 2.8]) +if pkg-config --atleast-version=2.8 glib-2.0; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GLIB_2_8, [1], [Define to 1 if we can use API new in glib-2.8]) +else + AC_MSG_RESULT(no) +fi + if test "x$HAVE_GLIB2" = "xno"; then AC_MSG_ERROR([GStreamer requires GLib $GLIB2_REQ to compile.]) fi diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index b27aa3f..60aab9b 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -84,7 +84,7 @@ GstBus GstBusFunc GstBusFlags GstBusSyncReply -GstBusHandler +GstBusFunc GstBusSyncHandler gst_bus_new gst_bus_post @@ -1569,7 +1569,11 @@ gst_registry_save gst_registry_rebuild gst_registry_unload gst_registry_add_path +gst_registry_get_default +gst_registry_get_feature_list +gst_registry_get_feature_list_by_plugin gst_registry_get_path_list +gst_registry_get_plugin_list gst_registry_clear_paths gst_registry_add_plugin gst_registry_remove_plugin @@ -1577,6 +1581,7 @@ gst_registry_plugin_filter gst_registry_feature_filter gst_registry_find_plugin gst_registry_find_feature +gst_registry_lookup_feature gst_registry_load_plugin gst_registry_unload_plugin gst_registry_update_plugin diff --git a/gst/gstobject.c b/gst/gstobject.c index 712763b..91bd7aa 100644 --- a/gst/gstobject.c +++ b/gst/gstobject.c @@ -33,7 +33,9 @@ #endif #define DEBUG_REFCOUNT +#ifndef HAVE_GLIB_2_8 #define REFCOUNT_HACK +#endif /* Refcount hack: since glib is not threadsafe, the glib refcounter can be * screwed up and the object can be freed unexpectedly. We use an evil hack @@ -41,6 +43,10 @@ * that glib will never unref the object under realistic circumstances. Then * we use our own atomic refcounting to do proper MT safe refcounting. * + * The hack has several side-effect. At first you should use + * gst_object_ref/unref() whenever you can. Next When using g_value_set/get_object(); + * you need to manually fix the refcount. + * * A proper fix is of course to make the glib refcounting threadsafe which is * planned. Update: atomic refcounting is now in glib >= 2.7.3 */ -- 2.7.4