From: Tim-Philipp Müller Date: Wed, 3 Jun 2009 20:10:39 +0000 (+0100) Subject: API: add GST_MESSAGE_SRC_NAME macro X-Git-Tag: RELEASE-0.10.24~157 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=604097bc3a4a241803350e0ba51ee064023d8c48;p=platform%2Fupstream%2Fgstreamer.git 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. --- diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 790b0b9..448eff7 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -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 diff --git a/gst/gstmessage.h b/gst/gstmessage.h index 48339b4..12284a9 100644 --- a/gst/gstmessage.h +++ b/gst/gstmessage.h @@ -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: