From be875073d58e4ad34c5954e7d233f0f1d69d221e Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Wed, 21 Feb 2007 15:34:14 +0000 Subject: [PATCH] Fix up documentation to link to the correct GstGError section. Original commit message from CVS: * docs/gst/gstreamer-sections.txt: * gst/gstelement.h: Fix up documentation to link to the correct GstGError section. Add GST_ELEMENT_INFO macro since someone else added a Info message. --- ChangeLog | 7 +++++++ docs/gst/gstreamer-sections.txt | 1 + gst/gstelement.h | 32 ++++++++++++++++++++++++++++++-- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac471af42e..478ca0c77e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-02-21 Thomas Vander Stichele + + * docs/gst/gstreamer-sections.txt: + * gst/gstelement.h: + Fix up documentation to link to the correct GstGError section. + Add GST_ELEMENT_INFO macro since someone else added a Info message. + 2007-02-21 Thomas Vander Stichele * tools/gst-launch.c: (event_loop): diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 74377b533e..ea457277d8 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -427,6 +427,7 @@ GST_ELEMENT_CLOCK GST_ELEMENT_PADS GST_ELEMENT_ERROR GST_ELEMENT_WARNING +GST_ELEMENT_INFO GST_ELEMENT_IS_LOCKED_STATE diff --git a/gst/gstelement.h b/gst/gstelement.h index 0fe6fa22c5..d80a9b52ec 100644 --- a/gst/gstelement.h +++ b/gst/gstelement.h @@ -282,8 +282,8 @@ G_STMT_START { \ /** * GST_ELEMENT_WARNING: * @el: the element that generates the warning - * @domain: like CORE, LIBRARY, RESOURCE or STREAM (see #GstGError) - * @code: error code defined for that domain (see #GstGError) + * @domain: like CORE, LIBRARY, RESOURCE or STREAM (see #gstreamer-GstGError) + * @code: error code defined for that domain (see #gstreamer-GstGError) * @text: the message to display (format string and args enclosed in parentheses) * @debug: debugging information for the message (format string and args @@ -306,6 +306,34 @@ G_STMT_START { \ __txt, __dbg, __FILE__, GST_FUNCTION, __LINE__); \ } G_STMT_END +/** + * GST_ELEMENT_INFO: + * @el: the element that generates the information + * @domain: like CORE, LIBRARY, RESOURCE or STREAM (see #gstreamer-GstGError) + * @code: error code defined for that domain (see #gstreamer-GstGError) + * @text: the message to display (format string and args enclosed in + parentheses) + * @debug: debugging information for the message (format string and args + enclosed in parentheses) + * + * Utility function that elements can use in case they want to inform + * the application of something noteworthy that is not an error. + * The pipeline will post a warning message and the + * application will be informed. + */ +#define GST_ELEMENT_INFO(el, domain, code, text, debug) \ +G_STMT_START { \ + gchar *__txt = _gst_element_error_printf text; \ + gchar *__dbg = _gst_element_error_printf debug; \ + if (__txt) \ + GST_INFO_OBJECT (el, "info: %s", __txt); \ + if (__dbg) \ + GST_INFO_OBJECT (el, "info: %s", __dbg); \ + gst_element_message_full (GST_ELEMENT(el), GST_MESSAGE_INFO, \ + GST_ ## domain ## _ERROR, GST_ ## domain ## _ERROR_ ## code, \ + __txt, __dbg, __FILE__, GST_FUNCTION, __LINE__); \ +} G_STMT_END + /* the state change mutexes and conds */ /** * GST_STATE_GET_LOCK: