docs: Initialize the debug category in class_init when possible
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9496>
This commit is contained in:
parent
e8e12db5f4
commit
3f1e8835b8
@ -11880,6 +11880,14 @@ GST_DEBUG_CATEGORY_GET (GST_CAT_PERFORMANCE, "GST_PERFORMANCE");
|
|||||||
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstinfo.h">Initializes a new #GstDebugCategory with the given properties and set to
|
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstinfo.h">Initializes a new #GstDebugCategory with the given properties and set to
|
||||||
the default threshold.
|
the default threshold.
|
||||||
|
|
||||||
|
If your element uses static features, this should be called in
|
||||||
|
`class_init()` for the feature, and not in `plugin_init()` since that will
|
||||||
|
not be called if a static feature is registered manually.
|
||||||
|
|
||||||
|
If you need to share the same category across multiple features, you can
|
||||||
|
move the call to a shared function and use #GOnce to make it re-entrant so
|
||||||
|
that the category is initialized exactly once.
|
||||||
|
|
||||||
> This macro expands to nothing if debugging is disabled.
|
> This macro expands to nothing if debugging is disabled.
|
||||||
>
|
>
|
||||||
> When naming your category, please follow the following conventions to ensure
|
> When naming your category, please follow the following conventions to ensure
|
||||||
|
@ -643,6 +643,14 @@ G_STMT_START{ \
|
|||||||
* Initializes a new #GstDebugCategory with the given properties and set to
|
* Initializes a new #GstDebugCategory with the given properties and set to
|
||||||
* the default threshold.
|
* the default threshold.
|
||||||
*
|
*
|
||||||
|
* If your element uses static features, this should be called in
|
||||||
|
* `class_init()` for the feature, and not in `plugin_init()` since that will
|
||||||
|
* not be called if a static feature is registered manually.
|
||||||
|
*
|
||||||
|
* If you need to share the same category across multiple features, you can
|
||||||
|
* move the call to a shared function and use #GOnce to make it re-entrant so
|
||||||
|
* that the category is initialized exactly once.
|
||||||
|
*
|
||||||
* > This macro expands to nothing if debugging is disabled.
|
* > This macro expands to nothing if debugging is disabled.
|
||||||
* >
|
* >
|
||||||
* > When naming your category, please follow the following conventions to ensure
|
* > When naming your category, please follow the following conventions to ensure
|
||||||
|
Loading…
x
Reference in New Issue
Block a user