[Bug 756806] message: Add extra information fields to error/warning/info messages

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Jul 22 11:30:40 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=756806

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #331733|none                        |needs-work
             status|                            |

--- Comment #25 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 331733:
 --> (https://bugzilla.gnome.org/review?bug=756806&attachment=331733)

::: gst/gstelement.c
@@ +3482,3 @@
+
+GstStructure *
+gst_structure_new_details (const char *name, ...)

This should probably be named a bit different. It's not a structure with
details or something, but a very specific kind of structure.

gst_message_details_new() or something like that maybe.

::: gst/gstelement.h
@@ +401,3 @@

+GstStructure *gst_structure_new_details(const char *name, ...);
+#define MAKE_DETAILS(args) gst_structure_new_details args

Namespace pollution

@@ +418,3 @@
+ * Utility function that elements can use in case they encountered a fatal
+ * data processing error. The pipeline will post an error message and the
+ * application will be requested to stop further media processing.

Since: 1.10

@@ +459,3 @@
+    GST_MESSAGE_ERROR, GST_ ## domain ## _ERROR,                        \
+      GST_ ## domain ## _ERROR_ ## code, __txt, __dbg, __FILE__,        \
+      GST_FUNCTION, __LINE__);                                          \

Instead of all the duplication, can't this just map to
GST_ELEMENT_ERROR_WITH_DETAILS(..., (NULL))?

::: gst/gstmessage.c
@@ +451,3 @@
+ * Attaches optional additional details to an error message.
+ *
+ * Since: 1.10

Where would this function be used, do you have an example usage in mind?

@@ +699,3 @@
+
+  *structure = NULL;
+  v = gst_structure_get_value (GST_MESSAGE_STRUCTURE (message), "details");

You might want to add a quark for the "details" string

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list