tracer: declare GstTracer API stable

It's been around for more than 4 years and people have built
lots of stuff on top of it, doesn't really make sense to keep
it marked as unstable. We're unlikely to change it now, and
we can always deprecate it and make a new one if needed.

This stabilises the following API:
- gst_tracer_register()
- gst_tracing_get_active_tracers()
- gst_tracing_register_hook()
- gst_tracer_record_new()
- gst_tracer_record_log()

Might also help a bit with #424

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/576>
This commit is contained in:
Tim-Philipp Müller 2020-07-24 13:30:39 +01:00
parent 39aa702659
commit e4f7cdb0df
8 changed files with 2 additions and 19 deletions

View file

@ -32,8 +32,6 @@
* Since: 1.8 * Since: 1.8
*/ */
#define GST_USE_UNSTABLE_API
#include "gst_private.h" #include "gst_private.h"
#include "gstenumtypes.h" #include "gstenumtypes.h"
#include "gsttracer.h" #include "gsttracer.h"

View file

@ -63,8 +63,6 @@ struct _GstTracerClass {
GST_API GST_API
GType gst_tracer_get_type (void); GType gst_tracer_get_type (void);
#ifdef GST_USE_UNSTABLE_API
GST_API GST_API
void gst_tracing_register_hook (GstTracer *tracer, const gchar *detail, void gst_tracing_register_hook (GstTracer *tracer, const gchar *detail,
GCallback func); GCallback func);
@ -77,8 +75,6 @@ gboolean gst_tracer_register (GstPlugin * plugin, const gchar * name, GType type
GST_API GST_API
GList* gst_tracing_get_active_tracers (void); GList* gst_tracing_get_active_tracers (void);
#endif
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTracer, gst_object_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTracer, gst_object_unref)
G_END_DECLS G_END_DECLS

View file

@ -30,8 +30,6 @@
* Since: 1.8 * Since: 1.8
*/ */
#define GST_USE_UNSTABLE_API
#include "gst_private.h" #include "gst_private.h"
#include "gstenumtypes.h" #include "gstenumtypes.h"
#include "gstinfo.h" #include "gstinfo.h"

View file

@ -91,8 +91,6 @@ typedef enum
GST_TRACER_VALUE_FLAGS_AGGREGATED = (1 << 1), GST_TRACER_VALUE_FLAGS_AGGREGATED = (1 << 1),
} GstTracerValueFlags; } GstTracerValueFlags;
#ifdef GST_USE_UNSTABLE_API
GST_API GST_API
GstTracerRecord * gst_tracer_record_new (const gchar * name, const gchar * firstfield, ...); GstTracerRecord * gst_tracer_record_new (const gchar * name, const gchar * firstfield, ...);
@ -103,8 +101,6 @@ void gst_tracer_record_log (GstTracerRecord *self, ...);
#define gst_tracer_record_log(...) G_STMT_START {} G_STMT_END #define gst_tracer_record_log(...) G_STMT_START {} G_STMT_END
#endif #endif
#endif
G_END_DECLS G_END_DECLS
#endif /* __GST_TRACER_RECORD_H__ */ #endif /* __GST_TRACER_RECORD_H__ */

View file

@ -31,8 +31,6 @@
* and needs to be done before any pipeline state is set to PAUSED. * and needs to be done before any pipeline state is set to PAUSED.
*/ */
#define GST_USE_UNSTABLE_API
#include "gst_private.h" #include "gst_private.h"
#include "gsttracer.h" #include "gsttracer.h"
#include "gsttracerfactory.h" #include "gsttracerfactory.h"

View file

@ -251,7 +251,7 @@ libgst = library('gstreamer-1.0', gst_sources,
) )
if build_gir if build_gir
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/gst.h', '-DGST_USE_UNSTABLE_API' ] gst_gir_extra_args = gir_init_section + ['--c-include=gst/gst.h']
if meson.is_subproject() if meson.is_subproject()
# FIXME: There must be a better way to do this # FIXME: There must be a better way to do this
# Need to pass the include path to find gst/gst.h and gst/gstenumtypes.h (built) # Need to pass the include path to find gst/gst.h and gst/gstenumtypes.h (built)

View file

@ -20,13 +20,11 @@ if cdata.has('HAVE_GETRUSAGE')
gst_tracers_sources += ['gstrusage.c'] gst_tracers_sources += ['gstrusage.c']
endif endif
tracers_args = gst_c_args + ['-DGST_USE_UNSTABLE_API']
thread_dep = dependency('threads', required : false) thread_dep = dependency('threads', required : false)
gst_tracers = library('gstcoretracers', gst_tracers = library('gstcoretracers',
gst_tracers_sources, gst_tracers_sources,
c_args : tracers_args, c_args : gst_c_args,
include_directories : [configinc], include_directories : [configinc],
dependencies : [gst_dep, thread_dep], dependencies : [gst_dep, thread_dep],
install : true, install : true,

View file

@ -125,7 +125,6 @@ test_defines = [
'-UG_DISABLE_CAST_CHECKS', '-UG_DISABLE_CAST_CHECKS',
'-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"', '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
'-DTESTFILE="' + meson.current_source_dir() + '/meson.build"', '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"',
'-DGST_USE_UNSTABLE_API',
'-DGST_DISABLE_DEPRECATED', '-DGST_DISABLE_DEPRECATED',
] ]