2nd attempt to have a xml-less build as a joined effort of #413123 and #421480.

Original commit message from CVS:
* configure.ac:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gstconfig.h.in:
* gst/gstobject.c: (gst_object_class_init),
(gst_signal_object_class_init):
* gst/gstobject.h:
2nd attempt to have a xml-less build as a joined effort of #413123
and #421480.
This commit is contained in:
Stefan Kost 2007-04-20 08:39:35 +00:00
parent d5669b316a
commit 92cd1de49e
7 changed files with 83 additions and 52 deletions

View file

@ -1,3 +1,15 @@
2007-04-20 Stefan Kost <ensonic@users.sf.net>
* configure.ac:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gstconfig.h.in:
* gst/gstobject.c: (gst_object_class_init),
(gst_signal_object_class_init):
* gst/gstobject.h:
2nd attempt to have a xml-less build as a joined effort of #413123
and #421480.
2007-04-20 Stefan Kost <ensonic@users.sf.net>
* docs/design/draft-tagreading.txt:

View file

@ -391,7 +391,7 @@ dnl GLib
AG_GST_GLIB_CHECK([2.8])
dnl Guess we need to keep this around until 0.11
dnl FIXME: 0.11: Guess we need to keep this around until 0.11
GST_HAVE_GLIB_2_8_DEFINE="#define GST_HAVE_GLIB_2_8 1"
AC_SUBST(GST_HAVE_GLIB_2_8_DEFINE)
@ -408,11 +408,14 @@ if test "x$GST_DISABLE_LOADSAVE" = "xyes" && \
( test "x$GST_DISABLE_REGISTRY" = "xyes" || \
test "x$USE_BINARY_REGISTRY" = "xyes" )
then
AC_MSG_NOTICE([Registry and load/save are disabled, not checking for libxml2])
AC_MSG_NOTICE([XML registry and load/save are disabled, not checking for libxml2])
GST_DISABLE_XML_DEFINE="#define GST_DISABLE_XML 1"
else
dnl check for libxml2 with minimum req version
AG_GST_LIBXML2_CHECK(2.4.9)
GST_DISABLE_XML_DEFINE="/* #undef GST_DISABLE_XML */"
fi
AC_SUBST(GST_DISABLE_XML_DEFINE)
dnl check for "check", unit testing library/header
AM_PATH_CHECK(0.9.2,
@ -438,7 +441,7 @@ AC_DEFINE_UNQUOTED(LIBDIR, "$LIBDIR", [library dir])
dnl set location of plugin directory
AG_GST_SET_PLUGINDIR
dnl FIXME: add LIBXML_PKG here
dnl FIXME: add LIBXML_PKG here if we use it
GST_PKG_DEPS="glib-2.0, gobject-2.0, gmodule-no-export-2.0, gthread-2.0"
AC_SUBST(GST_PKG_DEPS)
@ -484,9 +487,11 @@ dnl will need the GStreamer source and generated headers
dnl LIBS: XML doesn't need to be added because we don't explicitly use symbols
dnl from LibXML except for in the core library
GST_ALL_CFLAGS="-I\$(top_srcdir)/libs -I\$(top_srcdir) -I\$(top_builddir) $GLIB_CFLAGS $XML_CFLAGS \$(GST_OPTION_CFLAGS)"
dnl FIXME: check if LTLIBINTL is needed everywhere
dnl I presume it is given that it contains the symbols that _() stuff maps to
GST_ALL_LIBS="$GLIB_LIBS $LTLIBINTL \$(GCOV_LIBS)"
dnl LDFLAGS really should only contain flags, not libs - they get added before
dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
GST_ALL_LDFLAGS="-no-undefined"

View file

@ -392,6 +392,7 @@ GST_DISABLE_ENUMTYPES
GST_DISABLE_INDEX
GST_DISABLE_PLUGIN
GST_DISABLE_URI
GST_DISABLE_XML
<SUBSECTION Private>
GST_DISABLE_LOADSAVE_REGISTRY
GST_HAVE_GLIB_2_8
@ -1177,7 +1178,7 @@ GST_PAD_LINK_SUCCESSFUL
GstFlowReturn
GstActivateMode
<SUBSECTION Application>
<SUBSECTION Application>
gst_pad_get_name
gst_pad_get_direction
gst_pad_get_parent
@ -1640,7 +1641,7 @@ gst_query_new_segment
gst_query_set_segment
gst_query_parse_segment
<SUBSECTION Standard>
SUBSECTION Standard>
GstQueryClass
GST_QUERY
GST_IS_QUERY

View file

@ -1,13 +1,13 @@
lib_LTLIBRARIES = libgstreamer-@GST_MAJORMINOR@.la
if GST_DISABLE_LOADSAVE
GST_LOADSAVE_SRC =
GST_LOADSAVE_SRC =
else
GST_LOADSAVE_SRC = gstxml.c
endif
if GST_DISABLE_REGISTRY
GST_REGISTRY_SRC =
GST_REGISTRY_SRC =
else
if USE_BINARY_REGISTRY
GST_REGISTRY_SRC = gstregistrybinary.c
@ -17,43 +17,43 @@ endif
endif
if GST_DISABLE_PARSE
GST_PARSE_SRC =
GST_PARSE_H =
SUBDIRS_PARSE =
GST_PARSE_LA =
GST_PARSE_SRC =
GST_PARSE_H =
SUBDIRS_PARSE =
GST_PARSE_LA =
else
GST_PARSE_SRC = gstparse.c
GST_PARSE_H = gstparse.h
SUBDIRS_PARSE = parse
GST_PARSE_LA = parse/libgstparse.la
GST_PARSE_LA = parse/libgstparse.la
endif
if GST_DISABLE_TRACE
GST_TRACE_SRC =
GST_TRACE_SRC =
else
GST_TRACE_SRC = gsttrace.c
endif
if GST_DISABLE_ENUMTYPES
GST_ENUMTYPES_SRC =
GST_ENUMTYPES_SRC =
else
GST_ENUMTYPES_SRC = gstenumtypes.c
endif
if GST_DISABLE_INDEX
GST_INDEX_SRC =
GST_INDEX_SRC =
else
GST_INDEX_SRC = gstindex.c gstindexfactory.c
endif
if GST_DISABLE_PLUGIN
GST_PLUGIN_SRC =
GST_PLUGIN_SRC =
else
GST_PLUGIN_SRC = gstplugin.c
endif
if GST_DISABLE_URI
GST_URI_SRC =
GST_URI_SRC =
else
GST_URI_SRC = gsturi.c
endif
@ -64,13 +64,14 @@ DIST_SUBDIRS = parse
# make variables for all generated source and header files to make the
# distinction clear
built_header_configure = gstconfig.h gstversion.h
built_header_make = gstenumtypes.h gstmarshal.h
built_source_make = $(GST_ENUMTYPES_SRC) gstmarshal.c
EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
gstmarshal.list gstxml.c gstparse.c gsttrace.c gstregistryxml.c
gstmarshal.list gstparse.c gsttrace.c gstxml.c \
gstregistryxml.c gstregistrybinary.c
# temporarily not used
@ -134,7 +135,7 @@ BUILT_SOURCES = \
CLEANFILES = $(built_header_make) $(built_source_make) $(as_dll_cleanfiles) *.gcno *.gcda *.gcov *.gcov.out
# DISTCLEANFILES is for files generated by configure
DISTCLEANFILES = $(built_header_configure)
libgstreamer_@GST_MAJORMINOR@_la_CFLAGS = \
-D_GNU_SOURCE \
-DG_LOG_DOMAIN=g_log_domain_gstreamer \

View file

@ -53,7 +53,6 @@
/* trick gtk-doc into believing these symbols are defined (yes, it's ugly) */
#if 0
#define GST_DISABLE_LOADSAVE_REGISTRY 1
#define GST_DISABLE_GST_DEBUG 1
#define GST_DISABLE_LOADSAVE 1
#define GST_DISABLE_PARSE 1
@ -64,6 +63,8 @@
#define GST_DISABLE_INDEX 1
#define GST_DISABLE_PLUGIN 1
#define GST_DISABLE_URI 1
#define GST_DISABLE_XML 1
#define GST_DISABLE_LOADSAVE_REGISTRY 1
#define GST_HAVE_GLIB_2_8 1
#endif
@ -86,7 +87,7 @@
/**
* GST_DISABLE_LOADSAVE:
*
* Configures the inclusion of the plugin graph xml-serialisation
* Configures the inclusion of the plugin graph xml-serialisation
* (was used in 0.8 by gst-editor)
*/
@GST_DISABLE_LOADSAVE_DEFINE@
@ -117,12 +118,20 @@
/**
* GST_DISABLE_REGISTRY:
*
* Configures the use of the plugin registry
* if one disables this, required plugins need to be loaded and registered
* Configures the use of the plugin registry.
* If one disables this, required plugins need to be loaded and registered
* manualy
*/
@GST_DISABLE_REGISTRY_DEFINE@
/**
* GST_DISABLE_XML:
*
* Configures the use libxml2. This setting is derived from the settings of
* %GST_DISABLE_LOADSAVE and %GST_DISABLE_REGISTRY (in the xml registry case).
*/
@GST_DISABLE_XML_DEFINE@
/* FIXME: test and document these! */
/* Configure the use of glib enumtypes (useful for introspection)
* see http://bugzilla.gnome.org/show_bug.cgi?id=342564
@ -163,15 +172,18 @@
/* whether or not the CPU supports unaligned access */
@GST_HAVE_UNALIGNED_ACCESS_DEFINE@
/* whether or not we are using glib 2.8 api, e.g. atomic gobject
refcounting */
/* FIXME: 0.11 (remove)
* whether or not we are using glib 2.8 api, e.g. atomic gobject
* refcounting */
@GST_HAVE_GLIB_2_8_DEFINE@
/***** Deal with XML stuff, we have to handle both loadsave and registry *****/
#if (! (defined(GST_DISABLE_LOADSAVE) && defined(GST_DISABLE_REGISTRY)) )
/* FIXME: move include to where we need it */
/*#if (! (defined(GST_DISABLE_LOADSAVE) && defined(GST_DISABLE_REGISTRY)) )*/
#ifndef GST_DISABLE_XML
# include <libxml/parser.h>
#else
/* FIXME: 0.11 (replace by GST_DISABLE_XML) */
# define GST_DISABLE_LOADSAVE_REGISTRY
#endif

View file

@ -102,7 +102,7 @@ enum
{
PARENT_SET,
PARENT_UNSET,
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
#ifndef GST_DISABLE_LOADSAVE
OBJECT_SAVED,
#endif
DEEP_NOTIFY,
@ -134,7 +134,7 @@ static GType gst_signal_object_get_type (void);
static void gst_signal_object_class_init (GstSignalObjectClass * klass);
static void gst_signal_object_init (GstSignalObject * object);
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
#ifndef GST_DISABLE_LOADSAVE
static guint gst_signal_object_signals[SO_LAST_SIGNAL] = { 0 };
#endif
@ -153,7 +153,7 @@ static void gst_object_finalize (GObject * object);
static gboolean gst_object_set_name_default (GstObject * object);
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
#ifndef GST_DISABLE_LOADSAVE
static void gst_object_real_restore_thyself (GstObject * object,
xmlNodePtr self);
#endif
@ -231,7 +231,7 @@ gst_object_class_init (GstObjectClass * klass)
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstObjectClass, parent_unset), NULL,
NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT);
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
#ifndef GST_DISABLE_LOADSAVE
/**
* GstObject::object-saved:
* @gstobject: a #GstObject
@ -358,12 +358,12 @@ gst_object_unref (gpointer object)
* gst_object_sink:
* @object: a #GstObject to sink
*
* If @object was floating, the #GST_OBJECT_FLOATING flag is removed
* If @object was floating, the #GST_OBJECT_FLOATING flag is removed
* and @object is unreffed. When @object was not floating,
* this function does nothing.
*
* Any newly created object has a refcount of 1 and is floating.
* This function should be used when creating a new object to
* Any newly created object has a refcount of 1 and is floating.
* This function should be used when creating a new object to
* symbolically 'take ownership' of @object. This done by first doing a
* gst_object_ref() to keep a reference to @object and then gst_object_sink()
* to remove and unref any floating references to @object.
@ -639,7 +639,7 @@ gst_object_set_name_default (GstObject * object)
/**
* gst_object_set_name:
* @object: a #GstObject
* @object: a #GstObject
* @name: new name of object
*
* Sets the name of @object, or gives @object a guaranteed unique
@ -715,7 +715,7 @@ gst_object_get_name (GstObject * object)
/**
* gst_object_set_name_prefix:
* @object: a #GstObject
* @object: a #GstObject
* @name_prefix: new name prefix of @object
*
* Sets the name prefix of @object to @name_prefix.
@ -737,7 +737,7 @@ gst_object_set_name_prefix (GstObject * object, const gchar * name_prefix)
/**
* gst_object_get_name_prefix:
* @object: a #GstObject
* @object: a #GstObject
*
* Returns a copy of the name prefix of @object.
* Caller should g_free() the return value after usage.
@ -764,10 +764,10 @@ gst_object_get_name_prefix (GstObject * object)
/**
* gst_object_set_parent:
* @object: a #GstObject
* @object: a #GstObject
* @parent: new parent of object
*
* Sets the parent of @object to @parent. The object's reference count will
* Sets the parent of @object to @parent. The object's reference count will
* be incremented, and any floating reference will be removed (see gst_object_sink()).
*
* This function causes the parent-set signal to be emitted when the parent
@ -821,7 +821,7 @@ had_parent:
/**
* gst_object_get_parent:
* @object: a #GstObject
* @object: a #GstObject
*
* Returns the parent of @object. This function increases the refcount
* of the parent object so you should gst_object_unref() it after usage.
@ -923,7 +923,7 @@ gst_object_has_ancestor (GstObject * object, GstObject * ancestor)
* will lock each #GstObject in the list to compare the name, so be
* carefull when passing a list with a locked object.
*
* Returns: TRUE if a #GstObject named @name does not appear in @list,
* Returns: TRUE if a #GstObject named @name does not appear in @list,
* FALSE if it does.
*
* MT safe. Grabs and releases the LOCK of each object in the list.
@ -954,7 +954,7 @@ gst_object_check_uniqueness (GList * list, const gchar * name)
}
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
#ifndef GST_DISABLE_LOADSAVE
/**
* gst_object_save_thyself:
* @object: a #GstObject to save
@ -1012,7 +1012,7 @@ gst_object_real_restore_thyself (GstObject * object, xmlNodePtr self)
gst_class_signal_emit_by_name (object, "object_loaded", self);
}
#endif /* GST_DISABLE_LOADSAVE_REGISTRY */
#endif /* GST_DISABLE_LOADSAVE */
static void
gst_object_set_property (GObject * object, guint prop_id,
@ -1133,10 +1133,10 @@ struct _GstSignalObjectClass
GObjectClass parent_class;
/* signals */
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
#ifndef GST_DISABLE_LOADSAVE
void (*object_loaded) (GstSignalObject * object, GstObject * new,
xmlNodePtr self);
#endif /* GST_DISABLE_LOADSAVE_REGISTRY */
#endif
};
static GType
@ -1174,7 +1174,7 @@ gst_signal_object_class_init (GstSignalObjectClass * klass)
parent_class = g_type_class_peek_parent (klass);
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
#ifndef GST_DISABLE_LOADSAVE
gst_signal_object_signals[SO_OBJECT_LOADED] =
g_signal_new ("object-loaded", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstSignalObjectClass, object_loaded),
@ -1209,7 +1209,7 @@ gst_class_signal_connect (GstObjectClass * klass,
func_data);
}
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
#ifndef GST_DISABLE_LOADSAVE
/**
* gst_class_signal_emit_by_name:
* @object: a #GstObject that emits the signal
@ -1229,4 +1229,4 @@ gst_class_signal_emit_by_name (GstObject * object,
g_signal_emit_by_name (oclass->signal_object, name, object, self);
}
#endif /* GST_DISABLE_LOADSAVE_REGISTRY */
#endif /* GST_DISABLE_LOADSAVE */

View file

@ -41,7 +41,7 @@ G_BEGIN_DECLS
/* make sure we don't change the object size but still make it compile
* without libxml */
#ifdef GST_DISABLE_LOADSAVE_REGISTRY
#ifdef GST_DISABLE_LOADSAVE
#define GstXmlNodePtr gpointer
#else
#define GstXmlNodePtr xmlNodePtr
@ -302,7 +302,7 @@ gchar * gst_object_get_path_string (GstObject *object);
gboolean gst_object_check_uniqueness (GList *list, const gchar *name);
/* load/save */
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
#ifndef GST_DISABLE_LOADSAVE
GstXmlNodePtr gst_object_save_thyself (GstObject *object, GstXmlNodePtr parent);
void gst_object_restore_thyself (GstObject *object, GstXmlNodePtr self);
#else
@ -318,7 +318,7 @@ guint gst_class_signal_connect (GstObjectClass *klass,
gpointer func,
gpointer func_data);
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
#ifndef GST_DISABLE_LOADSAVE
void gst_class_signal_emit_by_name (GstObject * object,
const gchar * name,
GstXmlNodePtr self);