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

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Jul 11 15:34:48 UTC 2016


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

--- Comment #14 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Vincent, what's the status here? Would be good to get that in for 1.10.

(In reply to Tim-Philipp Müller from comment #12)

> > #define GST_ELEMENT_ERROR_WITH_DETAILS(el, domain, code, text, debug, args...)
> 
> Variadic macros are a bit tricky, there are multiple flavours and we need a
> backup for when not available, see gstinfo.h

Maybe instead of a variadic macro we can do it like GST_ELEMENT_ERROR()? :)

GST_ELEMENT_ERROR_WITH_DETAILS(el, domain, code, text, debug, ("foo",
G_TYPE_INT, 123, "bar", G_TYPE_STRING, "123", NULL))

Where GST_ELEMENT_ERROR_DETAILS() expands to a call to gst_structure_new()?
Basically like the "debug" and "text" parts are currently passed to
g_strdup_printf().

> - I wonder if _set_details() should be _take_details() with transfer full so
> that we don't copy the structure again

Yes because above :)

> - I wonder if the detail fields should be set as a separate structure or
> actually directly on the existing GstMessage structure?

Separate structure because otherwise we could get annoying name clashes.

> - I wonder if _parse_details() shouldn't return a const GstStructure * that
> is valid as long as the message is valid, thus avoiding a structure copy
> when parsing it, and a free.

Yes!

-- 
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