summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sourceforge.net>2007-01-29 15:54:09 +0000
committerStefan Kost <ensonic@users.sourceforge.net>2007-01-29 15:54:09 +0000
commitea55e1357ea0b3a9a235975aa08c31e5d18c4225 (patch)
treedac5626b409c20dc7db1a5d2cef1fbe685b0eef6 /gst
parentb7d6efdbd5b13c050395a5c7ffb863c8af9661b2 (diff)
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
Diffstat (limited to 'gst')
-rw-r--r--gst/gst.c19
-rw-r--r--gst/gstbin.c1
-rw-r--r--gst/gstelementfactory.h9
-rw-r--r--gst/gstinfo.h2
-rw-r--r--gst/gstobject.c2
-rw-r--r--gst/gstpad.c1
-rw-r--r--gst/gstregistrybinary.c10
-rw-r--r--gst/gstutils.c18
-rw-r--r--gst/gstvalue.c8
9 files changed, 35 insertions, 35 deletions
diff --git a/gst/gst.c b/gst/gst.c
index c741b0198..e85076b3c 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 7e455672c..bc07fe1f6 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 72f811589..277d814d7 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 3a941b2d0..2042b26df 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 8ee95d5a2..404c3849e 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 838ee2ba0..461bf9177 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 8fcbe83c9..5baff6162 100644
--- a/gst/gstregistrybinary.c
+++ b/gst/gstregistrybinary.c
@@ -1,8 +1,8 @@
/* GStreamer
- * Copyright (C) 2006 Josep Torra <josep@fluendo.com>
- * 2006 Mathieu Garcia <matthieu@fluendo.com>
- * 2006 Stefan Kost <ensonic@sonicpulse.de>
- *
+ * Copyright (C) 2006 Josep Torra <josep@fluendo.com>
+ * 2006 Mathieu Garcia <matthieu@fluendo.com>
+ * 2006,2007 Stefan Kost <ensonic@users.sf.net>
+ *
* 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 e7e8bc1fe..5ac9bd3b6 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 310e5a41b..e47364c84 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));