mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
meta: improve debugging
Add category for metadata debug
This commit is contained in:
parent
afb9d81be9
commit
391b4309f9
3 changed files with 11 additions and 3 deletions
|
@ -198,6 +198,7 @@ GST_EXPORT GstDebugCategory *GST_CAT_SIGNAL;
|
||||||
GST_EXPORT GstDebugCategory *GST_CAT_PROBE;
|
GST_EXPORT GstDebugCategory *GST_CAT_PROBE;
|
||||||
GST_EXPORT GstDebugCategory *GST_CAT_REGISTRY;
|
GST_EXPORT GstDebugCategory *GST_CAT_REGISTRY;
|
||||||
GST_EXPORT GstDebugCategory *GST_CAT_QOS;
|
GST_EXPORT GstDebugCategory *GST_CAT_QOS;
|
||||||
|
GST_EXPORT GstDebugCategory *GST_CAT_META;
|
||||||
|
|
||||||
/* Categories that should be completely private to
|
/* Categories that should be completely private to
|
||||||
* libgstreamer should be done like this: */
|
* libgstreamer should be done like this: */
|
||||||
|
@ -238,6 +239,7 @@ extern GstDebugCategory *_priv_GST_CAT_POLL;
|
||||||
#define GST_CAT_QOS NULL
|
#define GST_CAT_QOS NULL
|
||||||
#define GST_CAT_TYPES NULL
|
#define GST_CAT_TYPES NULL
|
||||||
#define GST_CAT_POLL NULL
|
#define GST_CAT_POLL NULL
|
||||||
|
#define GST_CAT_META NULL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -168,6 +168,7 @@ GstDebugCategory *GST_CAT_PROBE = NULL;
|
||||||
GstDebugCategory *GST_CAT_REGISTRY = NULL;
|
GstDebugCategory *GST_CAT_REGISTRY = NULL;
|
||||||
GstDebugCategory *GST_CAT_QOS = NULL;
|
GstDebugCategory *GST_CAT_QOS = NULL;
|
||||||
GstDebugCategory *_priv_GST_CAT_POLL = NULL;
|
GstDebugCategory *_priv_GST_CAT_POLL = NULL;
|
||||||
|
GstDebugCategory *GST_CAT_META = NULL;
|
||||||
|
|
||||||
|
|
||||||
#endif /* !defined(GST_DISABLE_GST_DEBUG) || !defined(GST_REMOVE_DISABLED) */
|
#endif /* !defined(GST_DISABLE_GST_DEBUG) || !defined(GST_REMOVE_DISABLED) */
|
||||||
|
@ -404,6 +405,7 @@ _priv_gst_debug_init (void)
|
||||||
GST_CAT_REGISTRY = _gst_debug_category_new ("GST_REGISTRY", 0, "registry");
|
GST_CAT_REGISTRY = _gst_debug_category_new ("GST_REGISTRY", 0, "registry");
|
||||||
GST_CAT_QOS = _gst_debug_category_new ("GST_QOS", 0, "QoS");
|
GST_CAT_QOS = _gst_debug_category_new ("GST_QOS", 0, "QoS");
|
||||||
_priv_GST_CAT_POLL = _gst_debug_category_new ("GST_POLL", 0, "poll");
|
_priv_GST_CAT_POLL = _gst_debug_category_new ("GST_POLL", 0, "poll");
|
||||||
|
GST_CAT_META = _gst_debug_category_new ("GST_META", 0, "meta");
|
||||||
|
|
||||||
|
|
||||||
/* print out the valgrind message if we're in valgrind */
|
/* print out the valgrind message if we're in valgrind */
|
||||||
|
|
|
@ -66,14 +66,17 @@ gst_meta_api_type_register (const gchar * api, const gchar ** tags)
|
||||||
g_return_val_if_fail (api != NULL, 0);
|
g_return_val_if_fail (api != NULL, 0);
|
||||||
g_return_val_if_fail (tags != NULL, 0);
|
g_return_val_if_fail (tags != NULL, 0);
|
||||||
|
|
||||||
|
GST_CAT_DEBUG (GST_CAT_META, "register API \"%s\"", api);
|
||||||
type = g_pointer_type_register_static (api);
|
type = g_pointer_type_register_static (api);
|
||||||
|
|
||||||
if (type != 0) {
|
if (type != 0) {
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
for (i = 0; tags[i]; i++)
|
for (i = 0; tags[i]; i++) {
|
||||||
|
GST_CAT_DEBUG (GST_CAT_META, " adding tag \"%s\"", tags[i]);
|
||||||
g_type_set_qdata (type, g_quark_from_string (tags[i]),
|
g_type_set_qdata (type, g_quark_from_string (tags[i]),
|
||||||
GINT_TO_POINTER (TRUE));
|
GINT_TO_POINTER (TRUE));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
@ -134,8 +137,9 @@ gst_meta_register (GType api, const gchar * impl, gsize size,
|
||||||
info->free_func = free_func;
|
info->free_func = free_func;
|
||||||
info->transform_func = transform_func;
|
info->transform_func = transform_func;
|
||||||
|
|
||||||
GST_DEBUG ("register \"%s\" implementing \"%s\" of size %" G_GSIZE_FORMAT,
|
GST_CAT_DEBUG (GST_CAT_META,
|
||||||
api, impl, size);
|
"register \"%s\" implementing \"%s\" of size %" G_GSIZE_FORMAT, impl,
|
||||||
|
g_type_name (api), size);
|
||||||
|
|
||||||
g_rw_lock_writer_lock (&lock);
|
g_rw_lock_writer_lock (&lock);
|
||||||
g_hash_table_insert (metainfo, (gpointer) impl, (gpointer) info);
|
g_hash_table_insert (metainfo, (gpointer) impl, (gpointer) info);
|
||||||
|
|
Loading…
Reference in a new issue