+2008-07-31 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
+ * configure.ac:
+ * docs/gst/gstreamer-sections.txt:
+ * docs/gst/gstreamer.types:
+ * docs/gst/gstreamer.types.in:
+ * gst/Makefile.am:
+ * gst/gst.c:
+ * gst/gstbin.c: (gst_bin_class_init), (gst_bin_set_index_func):
+ * gst/gstconfig.h.in:
+ * gst/gstelement.c: (gst_element_get_index):
+ * gst/gstregistrybinary.c: (gst_registry_binary_save_feature),
+ (gst_registry_binary_load_feature),
+ (gst_registry_binary_read_cache):
+ * gst/gstregistryxml.c: (load_feature),
+ (gst_registry_xml_read_cache), (gst_registry_xml_save_feature):
+ * plugins/Makefile.am:
+ * tools/gst-indent:
+ * tools/gst-inspect.c: (print_index_info), (print_element_list),
+ (print_plugin_features), (print_element_features):
+ * tools/gst-xmlinspect.c: (print_event_masks),
+ (print_element_info):
+ * win32/common/gstconfig.h:
+ Remove GST_DISABLE_(ENUMTYPES|INDEX|URI) everywhere.
+
+ Disabling the indexers and URI handler code will only reduce the
+ required amount of memory by a very small amount but on the other hand
+ requires much more maintaince work. Apart from that many places of
+ code are broken when disabling them.
+
+ Disabling the enum types doesn't reduce the required amount of memory
+ by more than a few bytes and makes it hard to fix bugs like #539772,
+ i.e. use the enums as GObject properties.
+
2008-07-31 Wim Taymans <wim.taymans@collabora.co.uk>
* docs/design/part-TODO.txt:
-Subproject commit e79879859bc866545379eb77e1378a906dc30ebf
+Subproject commit 222a503549004bbabaecc891edffb9e7dbcf2259
GST_REGISTRY_DOC_TYPES=
fi
AC_SUBST(GST_REGISTRY_DOC_TYPES)
-AG_GST_CHECK_SUBSYSTEM_DISABLE(ENUMTYPES,[enum types])
-AM_CONDITIONAL(GST_DISABLE_ENUMTYPES, test "x$GST_DISABLE_ENUMTYPES" = "xyes")
-AG_GST_CHECK_SUBSYSTEM_DISABLE(INDEX,[index])
-AM_CONDITIONAL(GST_DISABLE_INDEX, test "x$GST_DISABLE_INDEX" = "xyes")
-dnl define a substitution to use in docs/gst/gstreamer.types
-if test "x$GST_DISABLE_INDEX" = "xyes"
-then
- GST_INDEX_DOC_TYPES="%"
-else
- GST_INDEX_DOC_TYPES=
-fi
-AC_SUBST(GST_INDEX_DOC_TYPES)
AG_GST_CHECK_SUBSYSTEM_DISABLE(NET,[network distribution])
AM_CONDITIONAL(GST_DISABLE_NET, test "x$GST_DISABLE_NET" = "xyes")
AG_GST_CHECK_SUBSYSTEM_DISABLE(PLUGIN,[plugin])
AM_CONDITIONAL(GST_DISABLE_PLUGIN, test "x$GST_DISABLE_PLUGIN" = "xyes")
-AG_GST_CHECK_SUBSYSTEM_DISABLE(URI,[uri handlers])
-AM_CONDITIONAL(GST_DISABLE_URI, test "x$GST_DISABLE_URI" = "xyes")
AG_GST_ARG_DEBUG
AG_GST_ARG_PROFILING
docs/design/Makefile
docs/faq/Makefile
docs/gst/Makefile
-docs/gst/gstreamer.types
docs/libs/Makefile
docs/plugins/Makefile
docs/manual/Makefile
GST_DISABLE_TRACE
GST_DISABLE_ALLOC_TRACE
GST_DISABLE_REGISTRY
-GST_DISABLE_ENUMTYPES
-GST_DISABLE_INDEX
GST_DISABLE_PLUGIN
-GST_DISABLE_URI
GST_DISABLE_XML
<SUBSECTION Private>
GST_DISABLE_LOADSAVE_REGISTRY
--- /dev/null
+% add a _get_type for every GObject whose properties and signals you want
+% documented
+% add the relevant includes to be able to call those _get_type functions
+
+% adding a get_type here will:
+% - change output file name from gstreamer-(whatever).html to (whatever).html
+% - document properties and signals
+
+#include <gst/gst.h>
+
+gst_bin_get_type
+gst_bus_get_type
+gst_child_proxy_get_type
+gst_clock_get_type
+gst_element_factory_get_type
+gst_element_get_type
+gst_ghost_pad_get_type
+gst_implements_interface_get_type
+gst_index_factory_get_type
+gst_index_get_type
+gst_object_get_type
+gst_pad_get_type
+gst_pad_template_get_type
+gst_pipeline_get_type
+gst_plugin_feature_get_type
+gst_preset_get_type
+gst_registry_get_type
+gst_system_clock_get_type
+gst_tag_setter_get_type
+gst_task_get_type
+gst_type_find_factory_get_type
+gst_uri_handler_get_type
+gst_xml_get_type
+
+% these are not GObject derived types
+% this works with gtk-doc 1.10 at least
+%gst_buffer_get_type
+%gst_mini_object_get_type
+%gst_message_get_type
+%gst_query_get_type
+
gst_element_get_type
gst_ghost_pad_get_type
gst_implements_interface_get_type
-@GST_INDEX_DOC_TYPES@gst_index_factory_get_type
-@GST_INDEX_DOC_TYPES@gst_index_get_type
+gst_index_factory_get_type
+gst_index_get_type
gst_object_get_type
gst_pad_get_type
gst_pad_template_get_type
GST_TRACE_SRC = gsttrace.c
endif
-if GST_DISABLE_ENUMTYPES
-GST_ENUMTYPES_SRC =
-else
-GST_ENUMTYPES_SRC = gstenumtypes.c
-endif
-
-if GST_DISABLE_INDEX
-GST_INDEX_SRC =
-else
-GST_INDEX_SRC = gstindex.c gstindexfactory.c
-endif
-
if GST_DISABLE_PLUGIN
GST_PLUGIN_SRC =
else
GST_PLUGIN_SRC = gstplugin.c
endif
-if GST_DISABLE_URI
-GST_URI_SRC =
-else
-GST_URI_SRC = gsturi.c
-endif
-
SUBDIRS = $(SUBDIRS_PARSE)
DIST_SUBDIRS = parse
built_header_configure = gstconfig.h gstversion.h
built_header_make = gstenumtypes.h gstmarshal.h
-built_source_make = $(GST_ENUMTYPES_SRC) gstmarshal.c
+built_source_make = gstenumtypes.c gstmarshal.c
EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
gstmarshal.list gsttrace.c gstxml.c \
gstfilter.c \
gstformat.c \
gstghostpad.c \
- $(GST_INDEX_SRC) \
+ gstindex.c \
+ gstindexfactory.c \
gstinfo.c \
gstinterface.c \
gstiterator.c \
$(GST_TRACE_SRC) \
gsttypefind.c \
gsttypefindfactory.c \
- $(GST_URI_SRC) \
+ gsturi.c \
gstutils.c \
gstvalue.c \
gstparse.c \
g_type_class_ref (gst_task_get_type ());
g_type_class_ref (gst_clock_get_type ());
-#ifndef GST_DISABLE_INDEX
g_type_class_ref (gst_index_factory_get_type ());
-#endif /* GST_DISABLE_INDEX */
-#ifndef GST_DISABLE_URI
gst_uri_handler_get_type ();
-#endif /* GST_DISABLE_URI */
-#ifndef GST_DISABLE_ENUMTYPES
g_type_class_ref (gst_object_flags_get_type ());
g_type_class_ref (gst_bin_flags_get_type ());
g_type_class_ref (gst_buffer_flag_get_type ());
g_type_class_ref (gst_uri_type_get_type ());
g_type_class_ref (gst_parse_error_get_type ());
g_type_class_ref (gst_parse_flags_get_type ());
-#endif
gst_structure_get_type ();
_gst_value_initialize ();
g_type_class_unref (g_type_class_peek (gst_bin_get_type ()));
g_type_class_unref (g_type_class_peek (gst_bus_get_type ()));
g_type_class_unref (g_type_class_peek (gst_task_get_type ()));
-#ifndef GST_DISABLE_INDEX
g_type_class_unref (g_type_class_peek (gst_index_factory_get_type ()));
-#endif /* GST_DISABLE_INDEX */
-#ifndef GST_DISABLE_ENUMTYPES
g_type_class_unref (g_type_class_peek (gst_object_flags_get_type ()));
g_type_class_unref (g_type_class_peek (gst_bin_flags_get_type ()));
g_type_class_unref (g_type_class_peek (gst_buffer_flag_get_type ()));
()));
g_type_class_unref (g_type_class_peek (gst_uri_type_get_type ()));
g_type_class_unref (g_type_class_peek (gst_parse_error_get_type ()));
-#endif
g_type_class_unref (g_type_class_peek (gst_param_spec_fraction_get_type ()));
gst_deinitialized = TRUE;
static gboolean gst_bin_add_func (GstBin * bin, GstElement * element);
static gboolean gst_bin_remove_func (GstBin * bin, GstElement * element);
-#ifndef GST_DISABLE_INDEX
static void gst_bin_set_index_func (GstElement * element, GstIndex * index);
-#endif
static GstClock *gst_bin_provide_clock_func (GstElement * element);
static gboolean gst_bin_set_clock_func (GstElement * element, GstClock * clock);
gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_bin_change_state_func);
gstelement_class->get_state = GST_DEBUG_FUNCPTR (gst_bin_get_state_func);
-#ifndef GST_DISABLE_INDEX
gstelement_class->set_index = GST_DEBUG_FUNCPTR (gst_bin_set_index_func);
-#endif
gstelement_class->provide_clock =
GST_DEBUG_FUNCPTR (gst_bin_provide_clock_func);
gstelement_class->set_clock = GST_DEBUG_FUNCPTR (gst_bin_set_clock_func);
*
* MT safe
*/
-#ifndef GST_DISABLE_INDEX
static void
gst_bin_set_index_func (GstElement * element, GstIndex * index)
{
}
GST_OBJECT_UNLOCK (bin);
}
-#endif
/* set the clock on all elements in this bin
*
gst_object_unref (item);
return TRUE;
}
+
static void
bin_query_duration_done (GstBin * bin, QueryFold * fold)
{
gst_object_unref (item);
return TRUE;
}
+
static void
bin_query_position_done (GstBin * bin, QueryFold * fold)
{
#define GST_DISABLE_TRACE 1
#define GST_DISABLE_ALLOC_TRACE 1
#define GST_DISABLE_REGISTRY 1
-#define GST_DISABLE_ENUMTYPES 1
-#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
@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
- */
-@GST_DISABLE_ENUMTYPES_DEFINE@
-/* Configure the use of indizies for seeking
- * (not used in plugins right now)
- */
-@GST_DISABLE_INDEX_DEFINE@
/* Configures the use of external plugins */
@GST_DISABLE_PLUGIN_DEFINE@
-/* Configures the use of uri-handlers */
-@GST_DISABLE_URI_DEFINE@
/* printf extension format */
/**
return result;
}
-#ifndef GST_DISABLE_INDEX
/**
* gst_element_is_indexable:
* @element: a #GstElement.
return result;
}
-#endif
/**
* gst_element_add_pad:
str = gst_caps_to_string (copy);
gst_caps_unref (copy);
gst_registry_binary_save_string (list, str);
- }
-#ifndef GST_DISABLE_INDEX
- else if (GST_IS_INDEX_FACTORY (feature)) {
+ } else if (GST_IS_INDEX_FACTORY (feature)) {
GstIndexFactory *factory = GST_INDEX_FACTORY (feature);
pf = g_malloc (sizeof (GstBinaryPluginFeature));
/* pack element factory strings */
gst_registry_binary_save_const_string (list, factory->longdesc);
- }
-#endif
- else {
+ } else {
GST_WARNING ("unhandled feature type '%s'", type_name);
}
factory->extensions[i] = str;
}
}
- }
-#ifndef GST_DISABLE_INDEX
- else if (GST_IS_INDEX_FACTORY (feature)) {
+ } else if (GST_IS_INDEX_FACTORY (feature)) {
GstIndexFactory *factory = GST_INDEX_FACTORY (feature);
align (*in);
/* unpack index factory strings */
unpack_string (*in, factory->longdesc);
- }
-#endif
- else {
+ } else {
GST_WARNING ("unhandled factory type : %s", G_OBJECT_TYPE_NAME (feature));
goto fail;
}
/* make sure these types exist */
GST_TYPE_ELEMENT_FACTORY;
GST_TYPE_TYPE_FIND_FACTORY;
-#ifndef GST_DISABLE_INDEX
GST_TYPE_INDEX_FACTORY;
-#endif
timer = g_timer_new ();
g_free (s);
}
}
-#ifndef GST_DISABLE_INDEX
} else if (GST_IS_INDEX_FACTORY (feature)) {
GstIndexFactory *factory = GST_INDEX_FACTORY (feature);
if (g_str_equal (tag, "longdesc"))
read_string (reader, &factory->longdesc, TRUE);
-#endif
}
}
}
/* make sure these types exist */
GST_TYPE_ELEMENT_FACTORY;
GST_TYPE_TYPE_FIND_FACTORY;
-#ifndef GST_DISABLE_INDEX
GST_TYPE_INDEX_FACTORY;
-#endif
timer = g_timer_new ();
i++;
}
}
-#ifndef GST_DISABLE_INDEX
} else if (GST_IS_INDEX_FACTORY (feature)) {
if (!gst_registry_save_escaped (registry, " ", "longdesc",
GST_INDEX_FACTORY (feature)->longdesc))
return FALSE;
-#endif
}
return TRUE;
}
-if GST_DISABLE_INDEX
-SUBDIRS_INDEX =
-else
-SUBDIRS_INDEX = indexers
-endif
-
-SUBDIRS = elements $(SUBDIRS_INDEX)
+SUBDIRS = elements indexers
DIST_SUBDIRS = elements indexers
#!/bin/sh
indent \
--braces-on-if-line \
- --blank-lines-after-declarations \
--case-brace-indentation0 \
--case-indentation2 \
--braces-after-struct-decl-line \
}
}
-#ifndef GST_DISABLE_ENUMTYPES
#if 0
static void
print_event_masks (const GstEventMask * masks)
}
}
#endif
-#else
-static void
-print_event_masks (const GstEventMask * masks)
-{
-}
-#endif
static char *
get_rank_name (gint rank)
}
}
-#ifndef GST_DISABLE_INDEX
static void
print_index_info (GstElement * element)
{
n_print ("Element has no indexing capabilities.\n");
}
}
-#else
-static void
-print_index_info (GstElement * element)
-{
-}
-#endif
static void
print_uri_handler_info (GstElement * element)
g_print ("%s: %s: %s\n", plugin->desc.name,
GST_PLUGIN_FEATURE_NAME (factory),
gst_element_factory_get_longname (factory));
- }
-#ifndef GST_DISABLE_INDEX
- else if (GST_IS_INDEX_FACTORY (feature)) {
+ } else if (GST_IS_INDEX_FACTORY (feature)) {
GstIndexFactory *factory;
factory = GST_INDEX_FACTORY (feature);
if (!print_all)
g_print ("%s: %s: %s\n", plugin->desc.name,
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
- }
-#endif
- else if (GST_IS_TYPE_FIND_FACTORY (feature)) {
+ } else if (GST_IS_TYPE_FIND_FACTORY (feature)) {
GstTypeFindFactory *factory;
factory = GST_TYPE_FIND_FACTORY (feature);
n_print (" %s: %s\n", GST_PLUGIN_FEATURE_NAME (factory),
gst_element_factory_get_longname (factory));
num_elements++;
- }
-#ifndef GST_DISABLE_INDEX
- else if (GST_IS_INDEX_FACTORY (feature)) {
+ } else if (GST_IS_INDEX_FACTORY (feature)) {
GstIndexFactory *factory;
factory = GST_INDEX_FACTORY (feature);
n_print (" %s: %s\n", GST_OBJECT_NAME (factory), factory->longdesc);
num_indexes++;
- }
-#endif
- else if (GST_IS_TYPE_FIND_FACTORY (feature)) {
+ } else if (GST_IS_TYPE_FIND_FACTORY (feature)) {
GstTypeFindFactory *factory;
factory = GST_TYPE_FIND_FACTORY (feature);
GstPluginFeature *feature;
/* FIXME implement other pretty print function for these */
-#ifndef GST_DISABLE_INDEX
feature = gst_default_registry_find_feature (element_name,
GST_TYPE_INDEX_FACTORY);
if (feature) {
n_print ("%s: an index\n", element_name);
return 0;
}
-#endif
feature = gst_default_registry_find_feature (element_name,
GST_TYPE_TYPE_FIND_FACTORY);
if (feature) {
static void
print_event_masks (const GstEventMask * masks, gint pfx)
{
-#ifndef GST_DISABLE_ENUMTYPES
GType event_type;
GEnumClass *klass;
GType event_flags;
masks++;
}
-#endif
}
#endif
}
PUT_END_TAG (1, "clocking-interaction");
-#ifndef GST_DISABLE_INDEX
if (gst_element_is_indexable (element)) {
PUT_STRING (1, "<indexing-capabilities/>");
}
-#endif
PUT_START_TAG (1, "pads");
if (element->numpads) {
#define GST_DISABLE_TRACE 1
#define GST_DISABLE_ALLOC_TRACE 1
#define GST_DISABLE_REGISTRY 1
-#define GST_DISABLE_ENUMTYPES 1
-#define GST_DISABLE_INDEX 1
#define GST_DISABLE_PLUGIN 1
-#define GST_DISABLE_URI 1
#define GST_HAVE_GLIB_2_8 1
#endif
/* #undef GST_DISABLE_REGISTRY */
/* DOES NOT WORK */
-/* #undef GST_DISABLE_ENUMTYPES */
-
-/* DOES NOT WORK */
-/* #undef GST_DISABLE_INDEX */
-
-/* DOES NOT WORK */
/* #undef GST_DISABLE_PLUGIN */
-/* DOES NOT WORK */
-/* #undef GST_DISABLE_URI */
-
/* printf extension format */
/**
* GST_PTR_FORMAT: