mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
gstinfo: API: Add GST_DEBUG_REGISTER_FUNCPTR method.
This is a variant of GST_DEBUG_FUNCPTR which does not return anything.
This commit is contained in:
parent
7796ae457e
commit
8f40effea6
2 changed files with 17 additions and 0 deletions
|
@ -1017,6 +1017,7 @@ GST_DEBUG
|
||||||
GST_LOG
|
GST_LOG
|
||||||
GST_FIXME
|
GST_FIXME
|
||||||
GST_MEMDUMP
|
GST_MEMDUMP
|
||||||
|
GST_DEBUG_REGISTER_FUNCPTR
|
||||||
GST_DEBUG_FUNCPTR
|
GST_DEBUG_FUNCPTR
|
||||||
GST_DEBUG_FUNCPTR_NAME
|
GST_DEBUG_FUNCPTR_NAME
|
||||||
GST_DEBUG_BIN_TO_DOT_FILE
|
GST_DEBUG_BIN_TO_DOT_FILE
|
||||||
|
|
|
@ -1100,12 +1100,27 @@ void _gst_debug_register_funcptr (GstDebugFuncPtr func,
|
||||||
G_CONST_RETURN gchar *
|
G_CONST_RETURN gchar *
|
||||||
_gst_debug_nameof_funcptr (GstDebugFuncPtr func);
|
_gst_debug_nameof_funcptr (GstDebugFuncPtr func);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GST_DEBUG_REGISTER_FUNCPTR:
|
||||||
|
* @ptr: pointer to the function to register
|
||||||
|
*
|
||||||
|
* Register a pointer to a function with its name, so it can later be used by
|
||||||
|
* GST_DEBUG_FUNCPTR_NAME().
|
||||||
|
*
|
||||||
|
* Use this variant of #GST_DEBUG_FUNCPTR if you do not need to use @ptr.
|
||||||
|
*
|
||||||
|
* Since: 0.10.26
|
||||||
|
*/
|
||||||
|
#define GST_DEBUG_REGISTER_FUNCPTR(ptr) \
|
||||||
|
_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr)
|
||||||
/**
|
/**
|
||||||
* GST_DEBUG_FUNCPTR:
|
* GST_DEBUG_FUNCPTR:
|
||||||
* @ptr: pointer to the function to register
|
* @ptr: pointer to the function to register
|
||||||
*
|
*
|
||||||
* Register a pointer to a function with its name, so it can later be used by
|
* Register a pointer to a function with its name, so it can later be used by
|
||||||
* GST_DEBUG_FUNCPTR_NAME().
|
* GST_DEBUG_FUNCPTR_NAME().
|
||||||
|
*
|
||||||
|
* Returns: the value passed to @ptr.
|
||||||
*/
|
*/
|
||||||
#define GST_DEBUG_FUNCPTR(ptr) \
|
#define GST_DEBUG_FUNCPTR(ptr) \
|
||||||
(_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
|
(_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
|
||||||
|
@ -1379,6 +1394,7 @@ GST_FIXME (const char *format, ...)
|
||||||
#endif /* G_HAVE_GNUC_VARARGS */
|
#endif /* G_HAVE_GNUC_VARARGS */
|
||||||
#endif /* G_HAVE_ISO_VARARGS */
|
#endif /* G_HAVE_ISO_VARARGS */
|
||||||
|
|
||||||
|
#define GST_DEBUG_REGISTER_FUNCPTR(ptr) G_STMT_START{ }G_STMT_END
|
||||||
#define GST_DEBUG_FUNCPTR(ptr) (ptr)
|
#define GST_DEBUG_FUNCPTR(ptr) (ptr)
|
||||||
#define GST_DEBUG_FUNCPTR_NAME(ptr) (g_strdup_printf ("%p", ptr))
|
#define GST_DEBUG_FUNCPTR_NAME(ptr) (g_strdup_printf ("%p", ptr))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue