mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
gst.h: Don't spew warnings if GST_USE_UNSTABLE_API is not defined
Only hide GstTracer and GstTracerRecord API behind GST_USE_UNSTABLE_API,
but don't spew any warnings, otherwise everyone has to define this
to avoid compiler warnings.
This reverts parts of commit 89ee5d948d
.
This commit is contained in:
parent
7801a46e5f
commit
8b88fc487f
10 changed files with 27 additions and 18 deletions
|
@ -922,8 +922,8 @@ dnl - src and build dirs need to be added because every piece that gets built
|
|||
dnl will need the GStreamer source and generated headers
|
||||
dnl LIBS: XML doesn't need to be added because we don't explicitly use symbols
|
||||
dnl from LibXML except for in the core library
|
||||
GST_ALL_CXXFLAGS="-I\$(top_srcdir)/libs -I\$(top_srcdir) -I\$(top_builddir)/libs -I\$(top_builddir) $GLIB_CFLAGS \$(GLIB_EXTRA_CFLAGS) $XML_CFLAGS \$(GST_OPTION_CXXFLAGS) \$(ERROR_CXXFLAGS) -DGST_USE_UNSTABLE_API"
|
||||
GST_ALL_CFLAGS="-I\$(top_srcdir)/libs -I\$(top_srcdir) -I\$(top_builddir)/libs -I\$(top_builddir) $GLIB_CFLAGS \$(GLIB_EXTRA_CFLAGS) $XML_CFLAGS \$(GST_OPTION_CFLAGS) \$(ERROR_CFLAGS) -DGST_USE_UNSTABLE_API"
|
||||
GST_ALL_CXXFLAGS="-I\$(top_srcdir)/libs -I\$(top_srcdir) -I\$(top_builddir)/libs -I\$(top_builddir) $GLIB_CFLAGS \$(GLIB_EXTRA_CFLAGS) $XML_CFLAGS \$(GST_OPTION_CXXFLAGS) \$(ERROR_CXXFLAGS)"
|
||||
GST_ALL_CFLAGS="-I\$(top_srcdir)/libs -I\$(top_srcdir) -I\$(top_builddir)/libs -I\$(top_builddir) $GLIB_CFLAGS \$(GLIB_EXTRA_CFLAGS) $XML_CFLAGS \$(GST_OPTION_CFLAGS) \$(ERROR_CFLAGS)"
|
||||
|
||||
dnl FIXME: check if LTLIBINTL is needed everywhere
|
||||
dnl I presume it is given that it contains the symbols that _() stuff maps to
|
||||
|
|
|
@ -75,7 +75,7 @@ extra_files = gst-universe.dot
|
|||
|
||||
# CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
|
||||
# contains GtkObjects/GObjects and you want to document signals and properties.
|
||||
GTKDOC_CFLAGS = $(GST_OBJ_CFLAGS)
|
||||
GTKDOC_CFLAGS = $(GST_OBJ_CFLAGS) -DGST_USE_UNSTABLE_API
|
||||
GTKDOC_LIBS = $(GST_OBJ_LIBS) \
|
||||
$(top_builddir)/gst/libgstreamer-@GST_API_VERSION@.la \
|
||||
$(top_builddir)/libs/gst/base/libgstbase-@GST_API_VERSION@.la \
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#include <gst/gsttaskpool.h>
|
||||
#include <gst/gsttoc.h>
|
||||
#include <gst/gsttocsetter.h>
|
||||
#include <gst/gsttracer.h>
|
||||
#include <gst/gsttracerfactory.h>
|
||||
#include <gst/gsttracerrecord.h>
|
||||
#include <gst/gsttypefind.h>
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
* Since: 1.8
|
||||
*/
|
||||
|
||||
#define GST_USE_UNSTABLE_API
|
||||
|
||||
#include "gst_private.h"
|
||||
#include "gstenumtypes.h"
|
||||
#include "gsttracer.h"
|
||||
|
|
|
@ -22,11 +22,6 @@
|
|||
#ifndef __GST_TRACER_H__
|
||||
#define __GST_TRACER_H__
|
||||
|
||||
#ifndef GST_USE_UNSTABLE_API
|
||||
#warning "The tracer subsystem is unstable API and may change in future."
|
||||
#warning "You can define GST_USE_UNSTABLE_API to avoid this warning."
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
#include <gst/gstconfig.h>
|
||||
|
@ -62,12 +57,16 @@ struct _GstTracerClass {
|
|||
|
||||
GType gst_tracer_get_type (void);
|
||||
|
||||
#ifdef GST_USE_UNSTABLE_API
|
||||
|
||||
void gst_tracing_register_hook (GstTracer *tracer, const gchar *detail,
|
||||
GCallback func);
|
||||
|
||||
/* tracing modules */
|
||||
gboolean gst_tracer_register (GstPlugin * plugin, const gchar * name, GType type);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTracer, gst_object_unref)
|
||||
#endif
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
* Since: 1.8
|
||||
*/
|
||||
|
||||
#define GST_USE_UNSTABLE_API
|
||||
|
||||
#include "gst_private.h"
|
||||
#include "gstinfo.h"
|
||||
#include "gststructure.h"
|
||||
|
|
|
@ -22,11 +22,6 @@
|
|||
#ifndef __GST_TRACER_RECORD_H__
|
||||
#define __GST_TRACER_RECORD_H__
|
||||
|
||||
#ifndef GST_USE_UNSTABLE_API
|
||||
#warning "The tracer subsystem is unstable API and may change in future."
|
||||
#warning "You can define GST_USE_UNSTABLE_API to avoid this warning."
|
||||
#endif
|
||||
|
||||
#include <gst/gstobject.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
@ -45,9 +40,6 @@ typedef struct _GstTracerRecordClass GstTracerRecordClass;
|
|||
|
||||
GType gst_tracer_record_get_type (void);
|
||||
|
||||
GstTracerRecord * gst_tracer_record_new (GstStructure *spec);
|
||||
void gst_tracer_record_log (GstTracerRecord *self, ...);
|
||||
|
||||
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTracerRecord, gst_object_unref)
|
||||
#endif
|
||||
|
@ -64,6 +56,8 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTracerRecord, gst_object_unref)
|
|||
* taken. This enumerating declares to which scope such a meta data field
|
||||
* relates to. If it is e.g. %GST_TRACER_VALUE_SCOPE_PAD, then each of the log
|
||||
* events may contain values for different #GstPads.
|
||||
*
|
||||
* Since: 1.8
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
|
@ -73,6 +67,14 @@ typedef enum
|
|||
GST_TRACER_VALUE_SCOPE_PAD
|
||||
} GstTracerValueScope;
|
||||
|
||||
#ifdef GST_USE_UNSTABLE_API
|
||||
|
||||
GstTracerRecord * gst_tracer_record_new (GstStructure *spec);
|
||||
|
||||
void gst_tracer_record_log (GstTracerRecord *self, ...);
|
||||
|
||||
#endif
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_TRACER_RECORD_H__ */
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
* to a ';' separated list of tracers.
|
||||
*/
|
||||
|
||||
#define GST_USE_UNSTABLE_API
|
||||
|
||||
#include "gst_private.h"
|
||||
#include "gsttracer.h"
|
||||
#include "gsttracerfactory.h"
|
||||
|
|
|
@ -23,7 +23,8 @@ libgstcoretracers_la_SOURCES = \
|
|||
gststats.c \
|
||||
gsttracers.c
|
||||
|
||||
libgstcoretracers_la_CFLAGS = $(GST_OBJ_CFLAGS)
|
||||
libgstcoretracers_la_CFLAGS = $(GST_OBJ_CFLAGS) \
|
||||
-DGST_USE_UNSTABLE_API
|
||||
libgstcoretracers_la_LIBADD = \
|
||||
$(GST_PRINTF_LA) \
|
||||
$(GST_OBJ_LIBS)
|
||||
|
|
|
@ -207,7 +207,7 @@ gst_gstcpp_SOURCES = gst/gstcpp.cc
|
|||
|
||||
libs_gstlibscpp_SOURCES = libs/gstlibscpp.cc
|
||||
|
||||
gst_gsttracerrecord_CFLAGS = $(GST_OBJ_CFLAGS) $(AM_CFLAGS)
|
||||
gst_gsttracerrecord_CFLAGS = $(GST_OBJ_CFLAGS) $(AM_CFLAGS) -DGST_USE_UNSTABLE_API
|
||||
|
||||
gst_gstutils_LDADD = $(LDADD) $(GSL_LIBS) $(GMP_LIBS)
|
||||
|
||||
|
|
Loading…
Reference in a new issue