#undef GST_DEBUG_ENABLED
#undef GST_INFO_ENABLED
-#undef GST_INFO_ENABLED_VERBOSE
-#undef GST_INFO_FORCE_DISABLE
#undef GST_DEBUG_COLOR
+
+#undef GST_DISABLE_LOADSAVE
# The new configure options for busy application developers (Hadess)
#./configure --enable-maintainer-mode --enable-debug --enable-debug-verbose
-./configure --enable-maintainer-mode --enable-plugin-builddir --enable-debug --enable-debug-verbose "$@" || {
+./configure --enable-maintainer-mode --enable-plugin-builddir --enable-debug --enable-DEBUG "$@" || {
echo
echo "configure failed"
exit 1
esac],
[USE_DEBUG=no]) dnl Default value
-AC_ARG_ENABLE(debug-verbose,
-[ --enable-debug-verbose spews lots of useless debugging info at runtime],
+AC_ARG_ENABLE(DEBUG,
+[ --enable-DEBUG compiles in a large number of debugging messages],
[case "${enableval}" in
- yes) USE_DEBUG_VERBOSE=yes ;;
- no) USE_DEBUG_VERBOSE=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-verbose) ;;
+ yes) ENABLE_DEBUG=yes ;;
+ no) ENABLE_DEBUG=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-DEBUG) ;;
esac],
-[USE_DEBUG_VERBOSE=no]) dnl Default value
-
-AC_ARG_ENABLE(info,
-[ --enable-info turns verbose info at runtime on by default],
-[case "${enableval}" in
- yes) USE_DEBUG_INFO_VERBOSE=yes ;;
- no) USE_DEBUG_INFO_VERBOSE=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-info) ;;
-esac],
-[USE_DEBUG_INFO_VERBOSE=no]) dnl Default value
+[ENABLE_DEBUG=no]) dnl Default value
+if test x$ENABLE_DEBUG = xyes; then
+ AC_DEFINE(GST_DEBUG_ENABLED, 1, [Define if DEBUG statements should be compiled in])
+fi
-AC_ARG_ENABLE(info-system,
-[ --disable-info-system entirely disables the info debugging system],
+AC_ARG_ENABLE(INFO,
+[ --disable-INFO disables compilation of informational messages],
[case "${enableval}" in
- yes) DISABLE_DEBUG_INFO=no ;;
- no) DISABLE_DEBUG_INFO=yes ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --disable-info) ;;
+ yes) ENABLE_INFO=yes ;;
+ no) ENABLE_INFO=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-INFO) ;;
esac],
-[DISABLE_DEBUG_INFO=no]) dnl Default value
+[ENABLE_INFO=yes]) dnl Default value
+if test x$ENABLE_INFO = xyes; then
+ AC_DEFINE(GST_INFO_ENABLED, 1, [Define if INFO statements should be compiled in])
+fi
AC_ARG_ENABLE(debug-color,
[ --disable-debug-color disables color output of DEBUG and INFO output],
[case "${enableval}" in
- yes) DISABLE_DEBUG_COLOR=no ;;
- no) DISABLE_DEBUG_COLOR=yes ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --disable-info) ;;
+ yes) ENABLE_DEBUG_COLOR=yes ;;
+ no) ENABLE_DEBUG_COLOR=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-color) ;;
esac],
-[DISABLE_DEBUG_COLOR=no]) dnl Default value
+[ENABLE_DEBUG_COLOR=yes]) dnl Default value
+if test "x$ENABLE_DEBUG_COLOR" = xyes; then
+ AC_DEFINE(GST_DEBUG_COLOR, 1, [Define if debugging messages should be colorized])
+fi
AC_ARG_ENABLE(profiling,
[ --enable-profiling adds -pg to compiler commandline, for profiling],
esac],
[BUILD_EXAMPLES=yes]) dnl Default value
+AC_ARG_ENABLE(loadsave,
+[ --disable-loadsave disable pipeline XML load/save code],
+[case "${enableval}" in
+ yes) GST_DISABLE_LOADSAVE=no ;;
+ no) GST_DISABLE_LOADSAVE=yes ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-loadsave) ;;
+esac],
+[GST_DISABLE_LOADSAVE=no]) dnl Default value
+if test x$GST_DISABLE_LOADSAVE = xyes; then
+ AC_DEFINE(GST_DISABLE_LOADSAVE, 1, [Disable pipeline XML load/save code.])
+fi
+AM_CONDITIONAL(GST_DISABLE_LOADSAVE, test x$GST_DISABLE_LOADSAVE = xyes)
+
+
dnl ################################################
dnl # Set defines according to variables set above #
CFLAGS="$CFLAGS -g"
fi
-if test "x$USE_DEBUG_VERBOSE" = xyes; then
- AC_DEFINE(GST_DEBUG_ENABLED, 1, [Define if code to assist debugging should be compiled in])
-fi
-
-if test "x$DISABLE_DEBUG_INFO" = xno; then
- AC_DEFINE(GST_INFO_ENABLED, 1, [Define if code to produce informative messages should be compiled])
- if test "x$USE_DEBUG_INFO_VERBOSE" = xyes; then
- AC_DEFINE(GST_INFO_ENABLED_VERBOSE, 1, [Define if default should be to display all informative messages])
- fi
-fi
-
-if test "x$DISABLE_DEBUG_COLOR" = xno; then
- AC_DEFINE(GST_DEBUG_COLOR, 1, [Define if debugging messages should be colorised])
-fi
-
if test "x$USE_PROFILING" = xyes; then
CFLAGS="$CFLAGS -pg"
FOMIT_FRAME_POINTER=""
GST_OBJECT_MODEL_HDR = gobject2gtk.h
endif
+if GST_DISABLE_LOADSAVE
+GST_LOADSAVE_SRC =
+else
+GST_LOADSAVE_SRC = gstxml.c
+endif
+
libgst_la_SOURCES = \
cothreads.c \
gst.c \
gstutils.c \
gstparse.c \
$(GSTARCH_SRCS) \
- gstxml.c
+ $(GST_LOADSAVE_SRC)
##### Oh this sucks so badly. This isn't funny. #####
static gboolean gst_bin_iterate_func (GstBin *bin);
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
static xmlNodePtr gst_bin_save_thyself (GstObject *object, xmlNodePtr parent);
static void gst_bin_restore_thyself (GstObject *object, xmlNodePtr self);
#endif
klass->change_state_type = gst_bin_change_state_type;
klass->iterate = gst_bin_iterate_func;
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
gstobject_class->save_thyself = gst_bin_save_thyself;
gstobject_class->restore_thyself = gst_bin_restore_thyself;
#endif
return bin->children;
}
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
static xmlNodePtr
gst_bin_save_thyself (GstObject *object,
xmlNodePtr parent)
field = field->next;
}
}
-#endif // GST_DISABLE_XML
+#endif // GST_DISABLE_LOADSAVE
/**
static GstElementStateReturn gst_element_change_state (GstElement *element);
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
static xmlNodePtr gst_element_save_thyself (GstObject *object, xmlNodePtr parent);
GstElement* gst_element_restore_thyself (xmlNodePtr self, GstObject *parent);
#endif
// FIXME!
// gobject_class->destroy = GST_DEBUG_FUNCPTR(gst_element_real_destroy);
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
gstobject_class->save_thyself = GST_DEBUG_FUNCPTR(gst_element_save_thyself);
gstobject_class->restore_thyself = GST_DEBUG_FUNCPTR(gst_element_restore_thyself);
#endif
};
*/
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
/**
* gst_element_save_thyself:
* @element: GstElement to save
return element;
}
-#endif // GST_DISABLE_XML
+#endif // GST_DISABLE_LOADSAVE
/**
* gst_element_set_sched:
return FALSE;
}
-#ifndef GST_DISABLE_XML
/**
* gst_elementfactory_save_thyself:
* @factory: factory to save
return factory;
}
-#endif // GST_DISABLE_XML
/***** INFO system *****/
GstInfoHandler _gst_info_handler = gst_default_info_handler;
-#ifdef GST_INFO_ENABLED_VERBOSE
-guint32 _gst_info_categories = 0xffffffff;
-#else
guint32 _gst_info_categories = 0x00000001;
-#endif
/**
/* Object signals and args */
enum {
PARENT_SET,
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
OBJECT_SAVED,
#endif
LAST_SIGNAL
G_STRUCT_OFFSET (GstObjectClass, parent_set), NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,G_TYPE_NONE,1,
G_TYPE_OBJECT);
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
gst_object_signals[OBJECT_SAVED] =
g_signal_newc("object_saved", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstObjectClass, object_saved), NULL, NULL,
}
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
/**
* gst_object_save_thyself:
if (oclass->save_thyself)
oclass->save_thyself (object, parent);
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
g_signal_emit (G_OBJECT (object), gst_object_signals[OBJECT_SAVED], 0, parent);
#endif
return parent;
}
-#endif // GST_DISABLE_XML
+#endif // GST_DISABLE_LOADSAVE
/**
* gst_object_get_path_string:
GObjectClass parent_class;
/* signals */
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
void (*object_loaded) (GstSignalObject *object, GstObject *new, xmlNodePtr self);
-#endif GST_DISABLE_XML
+#endif GST_DISABLE_LOADSAVE
};
static GType
parent_class = g_type_class_ref (G_TYPE_OBJECT);
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
gst_signal_object_signals[SO_OBJECT_LOADED] =
g_signal_newc("object_loaded", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstObjectClass, parent_set), NULL, NULL,
return g_signal_connectc (klass->signal_object, name, func, func_data, FALSE);
}
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
/**
* gst_class_signal_emit_by_name:
* @object: the object that sends the signal
g_signal_emit_by_name (oclass->signal_object, name, object, self);
}
-#endif // GST_DISABLE_XML
+#endif // GST_DISABLE_LOADSAVE
/* signals */
void (*parent_set) (GstObject *object, GstObject *parent);
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
void (*object_saved) (GstObject *object, xmlNodePtr parent);
#endif
/* functions go here */
void (*destroy) (GstObject *object);
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
xmlNodePtr (*save_thyself) (GstObject *object, xmlNodePtr parent);
void (*restore_thyself) (GstObject *object, xmlNodePtr self);
#endif
gboolean gst_object_check_uniqueness (GList *list, const gchar *name);
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
xmlNodePtr gst_object_save_thyself (GstObject *object, xmlNodePtr parent);
+#else
+#pragma GCC poison gst_object_save_thyself
#endif
/* refcounting */
gpointer func,
gpointer func_data);
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
void gst_class_signal_emit_by_name (GstObject *object,
const gchar *name,
xmlNodePtr self);
+#pragma GCC poison gst_class_signal_emit_by_name
#endif
static void gst_pad_class_init (GstPadClass *klass);
static void gst_pad_init (GstPad *pad);
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
static xmlNodePtr gst_pad_save_thyself (GstObject *object, xmlNodePtr parent);
#endif
g_param_spec_boolean("active","Active","Whether the pad is active.",
TRUE,G_PARAM_READWRITE));
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
gstobject_class->save_thyself = GST_DEBUG_FUNCPTR(gst_pad_save_thyself);
#endif
gstobject_class->path_string_separator = ".";
}
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
/**
* gst_pad_load_and_connect:
* @self: the XML node to read the description from
cleanup:
g_strfreev (split);
}
-#endif // GST_DISABLE_XML
+#endif // GST_DISABLE_LOADSAVE
static gboolean
gst_pad_renegotiate_func (GstPad *pad, gpointer *data1, GstPad *peerpad, gpointer *data2, GstCaps **newcaps)
return GST_PAD_NEGOTIATE_AGREE;
}
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
/**
* gst_pad_save_thyself:
* @pad: the pad to save
return self;
}
-#endif // GST_DISABLE_XML
+#endif // GST_DISABLE_LOADSAVE
#ifndef gst_pad_push
/**
return compatible;
}
-#ifndef GST_DISABLE_XML
static xmlNodePtr
gst_props_save_thyself_func (GstPropsEntry *entry, xmlNodePtr parent)
{
return props;
}
-#endif // GST_DISABLE_XML
static GstElementStateReturn gst_thread_change_state (GstElement *element);
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
static xmlNodePtr gst_thread_save_thyself (GstObject *object, xmlNodePtr parent);
static void gst_thread_restore_thyself (GstObject *object, xmlNodePtr self);
#endif
// FIXME!
// gobject_class->destroy = gst_thread_real_destroy;
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
gstobject_class->save_thyself = gst_thread_save_thyself;
gstobject_class->restore_thyself = gst_thread_restore_thyself;
#endif
}
-#ifndef GST_DISABLE_XML
+#ifndef GST_DISABLE_LOADSAVE
static xmlNodePtr
gst_thread_save_thyself (GstObject *object,
xmlNodePtr self)
if (GST_OBJECT_CLASS (parent_class)->restore_thyself)
GST_OBJECT_CLASS (parent_class)->restore_thyself (object, self);
}
-#endif // GST_DISABLE_XML
+#endif // GST_DISABLE_LOADSAVE
#ifndef __GST_XML_H__
#define __GST_XML_H__
+#ifndef GST_DISABLE_LOADSAVE
+
#include <parser.h>
// Include compatability defines: if libxml hasn't already defined these,
}
#endif /* __cplusplus */
+#else // GST_DISABLE_LOADSAVE
+
+#pragma GCC poison gst_xml_write
+#pragma GCC poison gst_xml_new
+#pragma GCC poison gst_xml_parse_doc
+#pragma GCC poison gst_xml_parse_file
+#pragma GCC poison gst_xml_parse_memory
+#pragma GCC poison gst_xml_get_element
+#pragma GCC poison gst_xml_get_topelements
+
+#endif // GST_DISABLE_LOADSAVE
+
#endif /* __GST_XML_H__ */