[Bug 760267] tracer: how to pass and structure tracing data (GstStructure, GVariant, etc.)
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Sun Jan 10 05:14:59 PST 2016
https://bugzilla.gnome.org/show_bug.cgi?id=760267
--- Comment #7 from Stefan Sauer (gstreamer, gtkdoc dev) <ensonic at sonicpulse.de> ---
Did you look at my doc? We can make the GstStructure part even faster.
Also your proposal to take vararg to not hardcode the structure, is not going
to fly (sorry):
gst_tracer_log("name", "field1", type1, val1, "field2", type2, val2, ...) still
implies structure. Anyway what I proposed in the doc could actually get us
there.
Here is the essence:
We add a GstTracerRecord (object/miniobject). In the tracer plugin init we
create new GstTracerRecord instances by passing the large nested GstStructure
that described the log format. This will be extended to also list the types.
Now gst_tracer_record_new(GstStructure *spec) will generate a printf style
format string from the spec. That is we do a variant of gst_structure_to_string
that instead of writing the values write the format placeholder (e.g. %u for an
G_TYPE_UINT and % + GST_PTR_FMT for Caps/Structure/…). Based on that we can
provide gst_tracer_record_log(GstTracerRecord *self, …); that will only that
the values.
Also for the size math. The gvariant output is not a third, it is 2/3 of the
structure output.
--
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