mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
API: add GST_MESSAGE_SRC_NAME macro
Add GST_MESSAGE_SRC_NAME macro that always returns a non-NULL string. Useful for debugging and logging purposes.
This commit is contained in:
parent
92984a116b
commit
604097bc3a
2 changed files with 12 additions and 0 deletions
|
@ -1092,6 +1092,7 @@ gst_iterator_result_get_type
|
|||
GstMessage
|
||||
GstMessageType
|
||||
GST_MESSAGE_SRC
|
||||
GST_MESSAGE_SRC_NAME
|
||||
GST_MESSAGE_TIMESTAMP
|
||||
GST_MESSAGE_TYPE
|
||||
GST_MESSAGE_TYPE_NAME
|
||||
|
|
|
@ -182,6 +182,17 @@ typedef enum
|
|||
* Get the object that posted @message.
|
||||
*/
|
||||
#define GST_MESSAGE_SRC(message) (GST_MESSAGE(message)->src)
|
||||
/**
|
||||
* GST_MESSAGE_SRC_NAME:
|
||||
* @message: a #GstMessage
|
||||
*
|
||||
* Get the name of the object that posted @message. Returns "(NULL)" if
|
||||
* the message has no source object set.
|
||||
*
|
||||
* Since: 0.10.24
|
||||
*/
|
||||
#define GST_MESSAGE_SRC_NAME(message) (GST_MESSAGE_SRC(message) ? \
|
||||
GST_OBJECT_NAME (GST_MESSAGE_SRC(message)) : "(NULL)")
|
||||
|
||||
/**
|
||||
* GstStructureChangeType:
|
||||
|
|
Loading…
Reference in a new issue