From ea55e1357ea0b3a9a235975aa08c31e5d18c4225 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 29 Jan 2007 15:54:09 +0000 Subject: [PATCH] configure.ac: comment about refining the xml deps Original commit message from CVS: * configure.ac: comment about refining the xml deps * docs/manuals.mak: comments about moving away from jade for docs * gst/gst.c: recommit the ifdefs to use the binary registry * gst/gstbin.c: (gst_bin_change_state_func): this break is obsolete * gst/gstelementfactory.h: better GST_ELEMENT_DETAILS docs, add comment about translation * gst/gstinfo.h: remove eol slash * gst/gstobject.c: (gst_signal_object_get_type): add G_UNLIKELY as usual * gst/gstpad.c: (gst_pad_event_default): add fall trhu comment * gst/gstregistrybinary.c: (gst_registry_binary_write), (gst_registry_binary_initialize_magic), (gst_registry_binary_save_string), (gst_registry_binary_save_pad_template), (gst_registry_binary_save_feature), (gst_registry_binary_save_plugin), (gst_registry_binary_write_cache), (gst_registry_binary_check_magic), (gst_registry_binary_load_pad_template), (gst_registry_binary_load_feature), (gst_registry_binary_load_plugin), (gst_registry_binary_read_cache): comment typo and formatting * gst/gstutils.c: (gst_element_state_get_name), (gst_element_state_change_return_get_name): remove obsolete breaks * gst/gstvalue.c: (gst_date_get_type), (_gst_value_initialize): add FIXME 0.11 and remove cpp comment --- ChangeLog | 47 +++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 1 + docs/manuals.mak | 6 ++++++ gst/gst.c | 19 ++++++++++++++++++- gst/gstbin.c | 1 - gst/gstelementfactory.h | 9 ++++++--- gst/gstinfo.h | 2 +- gst/gstobject.c | 2 +- gst/gstpad.c | 1 + gst/gstregistrybinary.c | 10 +++++----- gst/gstutils.c | 18 ------------------ gst/gstvalue.c | 8 +++----- 12 files changed, 89 insertions(+), 35 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0904bf0..39019e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,50 @@ +2007-01-29 Stefan Kost + + * configure.ac: + comment about refining the xml deps + + * docs/manuals.mak: + comments about moving away from jade for docs + + * gst/gst.c: + recommit the ifdefs to use the binary registry + + * gst/gstbin.c: (gst_bin_change_state_func): + this break is obsolete + + * gst/gstelementfactory.h: + better GST_ELEMENT_DETAILS docs, add comment about translation + + * gst/gstinfo.h: + remove eol slash + + * gst/gstobject.c: (gst_signal_object_get_type): + add G_UNLIKELY as usual + + * gst/gstpad.c: (gst_pad_event_default): + add fall trhu comment + + * gst/gstregistrybinary.c: (gst_registry_binary_write), + (gst_registry_binary_initialize_magic), + (gst_registry_binary_save_string), + (gst_registry_binary_save_pad_template), + (gst_registry_binary_save_feature), + (gst_registry_binary_save_plugin), + (gst_registry_binary_write_cache), + (gst_registry_binary_check_magic), + (gst_registry_binary_load_pad_template), + (gst_registry_binary_load_feature), + (gst_registry_binary_load_plugin), + (gst_registry_binary_read_cache): + comment typo and formatting + + * gst/gstutils.c: (gst_element_state_get_name), + (gst_element_state_change_return_get_name): + remove obsolete breaks + + * gst/gstvalue.c: (gst_date_get_type), (_gst_value_initialize): + add FIXME 0.11 and remove cpp comment + 2007-01-29 Edward Hervey * gst/gstregistrybinary.c: (gst_registry_binary_read_cache): diff --git a/configure.ac b/configure.ac index f89def9..6a81539 100644 --- a/configure.ac +++ b/configure.ac @@ -397,6 +397,7 @@ dnl Check for glib2 without extra fat, useful for the unversioned tool frontends PKG_CHECK_MODULES(GLIB_ONLY, glib-2.0 >= $GLIB_REQ) dnl libxml 2, which is/should be optional (FIXME) +dnl (FIXME) if we use binary registry, the DISABLE_REGISTRY check need to go if test "x$GST_DISABLE_LOADSAVE" = "xyes" && \ test "x$GST_DISABLE_REGISTRY" = "xyes" then diff --git a/docs/manuals.mak b/docs/manuals.mak index 87a26fa..23eb9ff 100644 --- a/docs/manuals.mak +++ b/docs/manuals.mak @@ -87,6 +87,12 @@ $(BUILDDIR)/$(MAIN): $(XML) $(CSS) $(EXTRA_SRC) @cp ../version.entities $(BUILDDIR) @cp $(top_srcdir)/docs/url.entities $(BUILDDIR) +# we should switch to xsltproc +# docbook2html aka jade can't add the encoding easily to the html meta +# jw -f docbook -b html -d pwg.dsl -o ../html -V '%use-id-as-filename%' $(MAIN) +# this is a startng point +# xsltproc --nonet /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl pwg.xml +# html/index.html: $(BUILDDIR)/$(MAIN) $(PNG_BUILT) $(FIG_SRC) @make check-local @echo "*** Generating HTML output ***" diff --git a/gst/gst.c b/gst/gst.c index c741b01..e85076b 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -643,8 +643,11 @@ scan_and_update_registry (GstRegistry * default_registry, GList *l; GST_DEBUG ("reading registry cache: %s", registry_file); +#ifdef USE_BINARY_REGISTRY + gst_registry_binary_read_cache (default_registry, registry_file); +#else gst_registry_xml_read_cache (default_registry, registry_file); - +#endif /* scan paths specified via --gst-plugin-path */ GST_DEBUG ("scanning paths added via --gst-plugin-path"); for (l = plugin_paths; l != NULL; l = l->next) { @@ -715,7 +718,11 @@ scan_and_update_registry (GstRegistry * default_registry, } GST_INFO ("Registry cache changed. Writing new registry cache"); +#ifdef USE_BINARY_REGISTRY + if (!gst_registry_binary_write_cache (default_registry, registry_file)) { +#else if (!gst_registry_xml_write_cache (default_registry, registry_file)) { +#endif g_set_error (error, GST_CORE_ERROR, GST_CORE_ERROR_FAILED, _("Error writing registry cache to %s: %s"), registry_file, g_strerror (errno)); @@ -830,7 +837,11 @@ ensure_current_registry_forking (GstRegistry * default_registry, if (res_byte == '1') { GST_DEBUG ("Child succeeded. Parent reading registry cache"); +#ifdef USE_BINARY_REGISTRY + gst_registry_binary_read_cache (default_registry, registry_file); +#else gst_registry_xml_read_cache (default_registry, registry_file); +#endif } else { GST_DEBUG ("Child failed. Parent re-scanning registry, ignoring errors."); scan_and_update_registry (default_registry, registry_file, FALSE, NULL); @@ -851,8 +862,13 @@ ensure_current_registry (GError ** error) default_registry = gst_registry_get_default (); registry_file = g_strdup (g_getenv ("GST_REGISTRY")); if (registry_file == NULL) { +#ifdef USE_BINARY_REGISTRY + registry_file = g_build_filename (g_get_home_dir (), + ".gstreamer-" GST_MAJORMINOR, "registry." HOST_CPU ".bin", NULL); +#else registry_file = g_build_filename (g_get_home_dir (), ".gstreamer-" GST_MAJORMINOR, "registry." HOST_CPU ".xml", NULL); +#endif } /* first see if forking is enabled */ @@ -987,6 +1003,7 @@ sort_by_category_name (gconstpointer a, gconstpointer b) return strcmp (gst_debug_category_get_name ((GstDebugCategory *) a), gst_debug_category_get_name ((GstDebugCategory *) b)); } + static void gst_debug_help (void) { diff --git a/gst/gstbin.c b/gst/gstbin.c index 7e45567..bc07fe1 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -1968,7 +1968,6 @@ restart: GST_CAT_DEBUG (GST_CAT_STATES, "iterator doing resync"); gst_iterator_resync (it); goto restart; - break; default: case GST_ITERATOR_DONE: GST_CAT_DEBUG (GST_CAT_STATES, "iterator done"); diff --git a/gst/gstelementfactory.h b/gst/gstelementfactory.h index 72f8115..277d814 100644 --- a/gst/gstelementfactory.h +++ b/gst/gstelementfactory.h @@ -51,7 +51,10 @@ typedef struct _GstElementDetails GstElementDetails; * The @klass member can be used by applications to filter elements based * on functionality. */ -/* FIXME: need translatable stuff in here (how handle in registry)? */ +/* FIXME: need translatable stuff in here (how handle in registry)? + * can't we use _N("long name") in element implementations and use _(longname) + * in gst_element_factory_get_longname() + */ struct _GstElementDetails { /*< public > */ @@ -67,9 +70,9 @@ struct _GstElementDetails /** * GST_ELEMENT_DETAILS: * @longname: long, english name - * @klass: type of element, as hierarchy + * @klass: type of element, as hierarchy with '/' as a delimiter * @description: what the element is about - * @author: who wrote this thing? + * @author: who wrote this element * * Macro to initialize #GstElementDetails. */ diff --git a/gst/gstinfo.h b/gst/gstinfo.h index 3a941b2..2042b26 100644 --- a/gst/gstinfo.h +++ b/gst/gstinfo.h @@ -449,7 +449,7 @@ static inline void GST_CAT_LEVEL_LOG (GstDebugCategory * cat, GstDebugLevel level, gpointer object, const char *format, ...) { - if (G_UNLIKELY (level <= __gst_debug_min)) { \ + if (G_UNLIKELY (level <= __gst_debug_min)) { va_list varargs; va_start (varargs, format); diff --git a/gst/gstobject.c b/gst/gstobject.c index 8ee95d5..404c384 100644 --- a/gst/gstobject.c +++ b/gst/gstobject.c @@ -1142,7 +1142,7 @@ gst_signal_object_get_type (void) { static GType signal_object_type = 0; - if (!signal_object_type) { + if (G_UNLIKELY (signal_object_type == 0)) { static const GTypeInfo signal_object_info = { sizeof (GstSignalObjectClass), NULL, diff --git a/gst/gstpad.c b/gst/gstpad.c index 838ee2b..461bf91 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -2941,6 +2941,7 @@ gst_pad_event_default (GstPad * pad, GstEvent * event) GST_DEBUG_OBJECT (pad, "pausing task because of eos"); gst_pad_pause_task (pad); } + /* fall thru */ default: break; } diff --git a/gst/gstregistrybinary.c b/gst/gstregistrybinary.c index 8fcbe83..5baff61 100644 --- a/gst/gstregistrybinary.c +++ b/gst/gstregistrybinary.c @@ -1,8 +1,8 @@ /* GStreamer - * Copyright (C) 2006 Josep Torra - * 2006 Mathieu Garcia - * 2006 Stefan Kost - * + * Copyright (C) 2006 Josep Torra + * 2006 Mathieu Garcia + * 2006,2007 Stefan Kost + * * gstregistrybinary.c: GstRegistryBinary object, support routines * * This library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ * (need const flags in GstPlugin, etc.) * - why do we collect a list of binary chunks and not write immediately * - because we need to process subchunks, before we can set e.g. nr_of_items - * in parnt chunk + * in parent chunk * - need more robustness * - don't parse beyond mem-block size * - include md5-sum ? diff --git a/gst/gstutils.c b/gst/gstutils.c index e7e8bc1..5ac9bd3 100644 --- a/gst/gstutils.c +++ b/gst/gstutils.c @@ -994,38 +994,28 @@ gst_element_state_get_name (GstState state) #ifdef GST_DEBUG_COLOR case GST_STATE_VOID_PENDING: return "VOID_PENDING"; - break; case GST_STATE_NULL: return "\033[01;34mNULL\033[00m"; - break; case GST_STATE_READY: return "\033[01;31mREADY\033[00m"; - break; case GST_STATE_PLAYING: return "\033[01;32mPLAYING\033[00m"; - break; case GST_STATE_PAUSED: return "\033[01;33mPAUSED\033[00m"; - break; default: /* This is a memory leak */ return g_strdup_printf ("\033[01;35;41mUNKNOWN!\033[00m(%d)", state); #else case GST_STATE_VOID_PENDING: return "VOID_PENDING"; - break; case GST_STATE_NULL: return "NULL"; - break; case GST_STATE_READY: return "READY"; - break; case GST_STATE_PLAYING: return "PLAYING"; - break; case GST_STATE_PAUSED: return "PAUSED"; - break; default: /* This is a memory leak */ return g_strdup_printf ("UNKNOWN!(%d)", state); @@ -1048,32 +1038,24 @@ gst_element_state_change_return_get_name (GstStateChangeReturn state_ret) #ifdef GST_DEBUG_COLOR case GST_STATE_CHANGE_FAILURE: return "\033[01;31mFAILURE\033[00m"; - break; case GST_STATE_CHANGE_SUCCESS: return "\033[01;32mSUCCESS\033[00m"; - break; case GST_STATE_CHANGE_ASYNC: return "\033[01;33mASYNC\033[00m"; - break; case GST_STATE_CHANGE_NO_PREROLL: return "\033[01;34mNO PREROLL\033[00m"; - break; default: /* This is a memory leak */ return g_strdup_printf ("\033[01;35;41mUNKNOWN!\033[00m(%d)", state_ret); #else case GST_STATE_CHANGE_FAILURE: return "FAILURE"; - break; case GST_STATE_CHANGE_SUCCESS: return "SUCCESS"; - break; case GST_STATE_CHANGE_ASYNC: return "ASYNC"; - break; case GST_STATE_CHANGE_NO_PREROLL: return "NO PREROLL"; - break; default: /* This is a memory leak */ return g_strdup_printf ("UNKNOWN!(%d)", state_ret); diff --git a/gst/gstvalue.c b/gst/gstvalue.c index 310e5a4..e47364c 100644 --- a/gst/gstvalue.c +++ b/gst/gstvalue.c @@ -3964,11 +3964,11 @@ gst_date_get_type (void) static GType gst_date_type = 0; if (G_UNLIKELY (gst_date_type == 0)) { - /* Not using G_TYPE_DATE here on purpose, even if we could + /* FIXME 0.11: we require GLib 2.8 already + * Not using G_TYPE_DATE here on purpose, even if we could * if GLIB_CHECK_VERSION(2,8,0) was true: we don't want the * serialised strings to have different type strings depending - * on what version is used, so FIXME when we - * require GLib-2.8 */ + * on what version is used, so FIXME when we require GLib-2.8 */ gst_date_type = g_boxed_type_register_static ("GstDate", (GBoxedCopyFunc) gst_date_copy, (GBoxedFreeFunc) g_date_free); } @@ -3979,8 +3979,6 @@ gst_date_get_type (void) void _gst_value_initialize (void) { - //const GTypeFundamentalInfo finfo = { G_TYPE_FLAG_DERIVABLE, }; - gst_value_table = g_array_new (FALSE, FALSE, sizeof (GstValueTable)); gst_value_union_funcs = g_array_new (FALSE, FALSE, sizeof (GstValueUnionInfo)); -- 2.7.4