GNOME Bugzilla – Bug 757046
tracer: [API] Add factory convenience functions.
Last modified: 2017-01-06 16:59:37 UTC
See commit message
Created attachment 314002 [details] [review] tracer: [API] Add factory convenience functions. + gst_tracer_factory_create + gst_tracer_factory_find + gst_tracer_factory_make
Created attachment 314003 [details] [review] tracer: [API] Add factory convenience functions. + gst_tracer_factory_create + gst_tracer_factory_find + gst_tracer_factory_make
Review of attachment 314003 [details] [review]: How would that be used outside of gsttracer.c for example? ::: gst/gsttracerutils.c @@ +71,3 @@ + * + * Returns: (transfer floating) (nullable): new #GstTracer or %NULL + * if the tracer couldn't be created Since: 1.8 everywhere
(In reply to Sebastian Dröge (slomo) from comment #3) > Review of attachment 314003 [details] [review] [review]: > > How would that be used outside of gsttracer.c for example? In GstValidate we want to instanciate the tracer ourself to monitor each component, see https://bugzilla.gnome.org/show_bug.cgi?id=757047 > ::: gst/gsttracerutils.c > @@ +71,3 @@ > + * > + * Returns: (transfer floating) (nullable): new #GstTracer or %NULL > + * if the tracer couldn't be created > > Since: 1.8 everywhere Sure, sorry :)
> > ::: gst/gsttracerutils.c > > @@ +71,3 @@ > > + * > > + * Returns: (transfer floating) (nullable): new #GstTracer or %NULL > > + * if the tracer couldn't be created > > > > Since: 1.8 everywhere > > Sure, sorry :) Actually the whole tracer API is `Since 1.8` makes no sense to me to add it for each of its symbols.
Makes sense, but let's wait if someone else has an opinion on the API too
We do tend to add 'since' markers for all API even if the entire API is new in a version, that requires less background knowledge from people who want to use this.
Review of attachment 314003 [details] [review]: The reason I did no do this, is that the tracing subsystem should be initialized *before* pipelines run in a sequential fashion. This way the registration data is immutable when the tracers run and hence I can avoid expensive locking. Now you are exposing this to everyone. Why would you need to create tracers from GstValidate instead of cosuming the trace output? What we *can* do is to rewrite _priv_gst_tracing_init and expose api to pass the tracer initialisation from a 'spec', so that you can call this instead of relying on the env-var. These _init() functions can ensure that things are only initilaized once. ::: gst/gsttracer.h @@ +77,3 @@ +GstTracer * gst_tracer_factory_make (const gchar *, const gchar *); +GstTracer * gst_tracer_factory_create (GstTracerFactory * factory, const gchar * params); +GstTracerFactory * gst_tracer_factory_find (const gchar * name); this should be in tracerutils.h then, right?
Thibault?
It is not strictly needed for me anymore, I think we could keep it out for now and decide later if exposing that becomes really necessary.
Closing as it seems it is not needed for anyone, and it is only noise.