After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757046 - tracer: [API] Add factory convenience functions.
tracer: [API] Add factory convenience functions.
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-24 08:57 UTC by Thibault Saunier
Modified: 2017-01-06 16:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tracer: [API] Add factory convenience functions. (7.00 KB, patch)
2015-10-24 08:57 UTC, Thibault Saunier
none Details | Review
tracer: [API] Add factory convenience functions. (7.51 KB, patch)
2015-10-24 09:08 UTC, Thibault Saunier
reviewed Details | Review

Description Thibault Saunier 2015-10-24 08:57:45 UTC
See commit message
Comment 1 Thibault Saunier 2015-10-24 08:57:49 UTC
Created attachment 314002 [details] [review]
tracer: [API] Add factory convenience functions.

+ gst_tracer_factory_create
+ gst_tracer_factory_find
+ gst_tracer_factory_make
Comment 2 Thibault Saunier 2015-10-24 09:08:21 UTC
Created attachment 314003 [details] [review]
tracer: [API] Add factory convenience functions.

+ gst_tracer_factory_create
+ gst_tracer_factory_find
+ gst_tracer_factory_make
Comment 3 Sebastian Dröge (slomo) 2015-10-24 09:43:26 UTC
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
Comment 4 Thibault Saunier 2015-10-24 09:44:52 UTC
(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 :)
Comment 5 Thibault Saunier 2015-10-24 09:46:21 UTC
> > ::: 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.
Comment 6 Sebastian Dröge (slomo) 2015-10-24 10:03:34 UTC
Makes sense, but let's wait if someone else has an opinion on the API too
Comment 7 Tim-Philipp Müller 2015-10-24 11:23:16 UTC
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.
Comment 8 Stefan Sauer (gstreamer, gtkdoc dev) 2015-10-25 03:02:54 UTC
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?
Comment 9 Tim-Philipp Müller 2016-02-16 17:47:51 UTC
Thibault?
Comment 10 Thibault Saunier 2016-02-16 18:40:16 UTC
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.
Comment 11 Thibault Saunier 2017-01-06 16:59:37 UTC
Closing as it seems it is not needed for anyone, and it is only noise.