2 * Copyright (C) 2016 Stefan Sauer <ensonic@users.sf.net>
4 * gsttracerrecord.h: tracer log record class
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.
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.
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.
22 #ifndef __GST_TRACER_RECORD_H__
23 #define __GST_TRACER_RECORD_H__
25 #ifndef GST_USE_UNSTABLE_API
26 #warning "The tracer subsystem is unstable API and may change in future."
27 #warning "You can define GST_USE_UNSTABLE_API to avoid this warning."
30 #include <gst/gstobject.h>
34 typedef struct _GstTracerRecord GstTracerRecord;
35 typedef struct _GstTracerRecordPrivate GstTracerRecordPrivate;
36 typedef struct _GstTracerRecordClass GstTracerRecordClass;
38 #define GST_TYPE_TRACER_RECORD (gst_tracer_record_get_type())
39 #define GST_TRACER_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TRACER_RECORD,GstTracerRecord))
40 #define GST_TRACER_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TRACER_RECORD,GstTracerRecordClass))
41 #define GST_IS_TRACER_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TRACER_RECORD))
42 #define GST_IS_TRACER_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TRACER_RECORD))
43 #define GST_TRACER_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_TRACER_RECORD,GstTracerRecordClass))
44 #define GST_TRACER_RECORD_CAST(obj) ((GstTracerRecord *)(obj))
46 GType gst_tracer_record_get_type (void);
48 GstTracerRecord * gst_tracer_record_new (GstStructure *spec);
49 void gst_tracer_record_log (GstTracerRecord *self, ...);
51 #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
52 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTracerRecord, gst_object_unref)
56 * GstTracerValueScope:
57 * @GST_TRACER_VALUE_SCOPE_PROCESS: the value is related to the process
58 * @GST_TRACER_VALUE_SCOPE_THREAD: the value is related to a thread
59 * @GST_TRACER_VALUE_SCOPE_ELEMENT: the value is related to an #GstElement
60 * @GST_TRACER_VALUE_SCOPE_PAD: the value is related to a #GstPad
62 * Tracing record will contain fields that contain a meassured value or extra
63 * meta-data. One such meta data are values that tell where a measurement was
64 * taken. This enumerating declares to which scope such a meta data field
65 * relates to. If it is e.g. %GST_TRACER_VALUE_SCOPE_PAD, then each of the log
66 * events may contain values for different #GstPads.
70 GST_TRACER_VALUE_SCOPE_PROCESS,
71 GST_TRACER_VALUE_SCOPE_THREAD,
72 GST_TRACER_VALUE_SCOPE_ELEMENT,
73 GST_TRACER_VALUE_SCOPE_PAD
74 } GstTracerValueScope;
78 #endif /* __GST_TRACER_RECORD_H__ */