gst.h: Don't spew warnings if GST_USE_UNSTABLE_API is not defined
[platform/upstream/gstreamer.git] / gst / gsttracerrecord.h
1 /* GStreamer
2  * Copyright (C) 2016 Stefan Sauer <ensonic@users.sf.net>
3  *
4  * gsttracerrecord.h: tracer log record class
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21
22 #ifndef __GST_TRACER_RECORD_H__
23 #define __GST_TRACER_RECORD_H__
24
25 #include <gst/gstobject.h>
26
27 G_BEGIN_DECLS
28
29 typedef struct _GstTracerRecord GstTracerRecord;
30 typedef struct _GstTracerRecordPrivate GstTracerRecordPrivate;
31 typedef struct _GstTracerRecordClass GstTracerRecordClass;
32
33 #define GST_TYPE_TRACER_RECORD            (gst_tracer_record_get_type())
34 #define GST_TRACER_RECORD(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TRACER_RECORD,GstTracerRecord))
35 #define GST_TRACER_RECORD_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TRACER_RECORD,GstTracerRecordClass))
36 #define GST_IS_TRACER_RECORD(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TRACER_RECORD))
37 #define GST_IS_TRACER_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TRACER_RECORD))
38 #define GST_TRACER_RECORD_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_TRACER_RECORD,GstTracerRecordClass))
39 #define GST_TRACER_RECORD_CAST(obj)       ((GstTracerRecord *)(obj))
40
41 GType gst_tracer_record_get_type          (void);
42
43 #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
44 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTracerRecord, gst_object_unref)
45 #endif
46
47 /**
48  * GstTracerValueScope:
49  * @GST_TRACER_VALUE_SCOPE_PROCESS: the value is related to the process
50  * @GST_TRACER_VALUE_SCOPE_THREAD: the value is related to a thread
51  * @GST_TRACER_VALUE_SCOPE_ELEMENT: the value is related to an #GstElement
52  * @GST_TRACER_VALUE_SCOPE_PAD: the value is related to a #GstPad
53  *
54  * Tracing record will contain fields that contain a meassured value or extra
55  * meta-data. One such meta data are values that tell where a measurement was
56  * taken. This enumerating declares to which scope such a meta data field
57  * relates to. If it is e.g. %GST_TRACER_VALUE_SCOPE_PAD, then each of the log
58  * events may contain values for different #GstPads.
59  *
60  * Since: 1.8
61  */
62 typedef enum
63 {
64   GST_TRACER_VALUE_SCOPE_PROCESS,
65   GST_TRACER_VALUE_SCOPE_THREAD,
66   GST_TRACER_VALUE_SCOPE_ELEMENT,
67   GST_TRACER_VALUE_SCOPE_PAD
68 } GstTracerValueScope;
69
70 #ifdef GST_USE_UNSTABLE_API
71
72 GstTracerRecord * gst_tracer_record_new (GstStructure *spec);
73
74 void              gst_tracer_record_log (GstTracerRecord *self, ...);
75
76 #endif
77
78 G_END_DECLS
79
80 #endif /* __GST_TRACER_RECORD_H__ */