summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--docs/gst/gstreamer-sections.txt1
-rw-r--r--gst/gstelement.h32
3 files changed, 38 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ac471af42..478ca0c77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2007-02-21 Thomas Vander Stichele <thomas at apestaart dot org>
+ * 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 <thomas at apestaart dot org>
+
* tools/gst-launch.c: (event_loop):
Make sure that we actually show the important message part of a
warning message.
diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt
index 74377b533..ea457277d 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
<SUBSECTION element-construction>
diff --git a/gst/gstelement.h b/gst/gstelement.h
index 0fe6fa22c..d80a9b52e 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: