Blame gst/gsttracerrecord.h

Packit f546b1
/* GStreamer
Packit f546b1
 * Copyright (C) 2016 Stefan Sauer <ensonic@users.sf.net>
Packit f546b1
 *
Packit f546b1
 * gsttracerrecord.h: tracer log record class
Packit f546b1
 *
Packit f546b1
 * This library is free software; you can redistribute it and/or
Packit f546b1
 * modify it under the terms of the GNU Library General Public
Packit f546b1
 * License as published by the Free Software Foundation; either
Packit f546b1
 * version 2 of the License, or (at your option) any later version.
Packit f546b1
 *
Packit f546b1
 * This library is distributed in the hope that it will be useful,
Packit f546b1
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit f546b1
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit f546b1
 * Library General Public License for more details.
Packit f546b1
 *
Packit f546b1
 * You should have received a copy of the GNU Library General Public
Packit f546b1
 * License along with this library; if not, write to the
Packit f546b1
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Packit f546b1
 * Boston, MA 02110-1301, USA.
Packit f546b1
 */
Packit f546b1
Packit f546b1
#ifndef __GST_TRACER_RECORD_H__
Packit f546b1
#define __GST_TRACER_RECORD_H__
Packit f546b1
Packit f546b1
#include <gst/gstobject.h>
Packit f546b1
Packit f546b1
G_BEGIN_DECLS
Packit f546b1
Packit f546b1
typedef struct _GstTracerRecord GstTracerRecord;
Packit f546b1
typedef struct _GstTracerRecordClass GstTracerRecordClass;
Packit f546b1
Packit f546b1
#define GST_TYPE_TRACER_RECORD            (gst_tracer_record_get_type())
Packit f546b1
#define GST_TRACER_RECORD(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TRACER_RECORD,GstTracerRecord))
Packit f546b1
#define GST_TRACER_RECORD_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TRACER_RECORD,GstTracerRecordClass))
Packit f546b1
#define GST_IS_TRACER_RECORD(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TRACER_RECORD))
Packit f546b1
#define GST_IS_TRACER_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TRACER_RECORD))
Packit f546b1
#define GST_TRACER_RECORD_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_TRACER_RECORD,GstTracerRecordClass))
Packit f546b1
#define GST_TRACER_RECORD_CAST(obj)       ((GstTracerRecord *)(obj))
Packit f546b1
Packit f546b1
GST_API
Packit f546b1
GType gst_tracer_record_get_type          (void);
Packit f546b1
Packit f546b1
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
Packit f546b1
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTracerRecord, gst_object_unref)
Packit f546b1
#endif
Packit f546b1
Packit f546b1
/**
Packit f546b1
 * GstTracerValueScope:
Packit f546b1
 * @GST_TRACER_VALUE_SCOPE_PROCESS: the value is related to the process
Packit f546b1
 * @GST_TRACER_VALUE_SCOPE_THREAD: the value is related to a thread
Packit f546b1
 * @GST_TRACER_VALUE_SCOPE_ELEMENT: the value is related to an #GstElement
Packit f546b1
 * @GST_TRACER_VALUE_SCOPE_PAD: the value is related to a #GstPad
Packit f546b1
 *
Packit f546b1
 * Tracing record will contain fields that contain a meassured value or extra
Packit f546b1
 * meta-data. One such meta data are values that tell where a measurement was
Packit f546b1
 * taken. This enumerating declares to which scope such a meta data field
Packit f546b1
 * relates to. If it is e.g. %GST_TRACER_VALUE_SCOPE_PAD, then each of the log
Packit f546b1
 * events may contain values for different #GstPads.
Packit f546b1
 *
Packit f546b1
 * Since: 1.8
Packit f546b1
 */
Packit f546b1
typedef enum
Packit f546b1
{
Packit f546b1
  GST_TRACER_VALUE_SCOPE_PROCESS,
Packit f546b1
  GST_TRACER_VALUE_SCOPE_THREAD,
Packit f546b1
  GST_TRACER_VALUE_SCOPE_ELEMENT,
Packit f546b1
  GST_TRACER_VALUE_SCOPE_PAD
Packit f546b1
} GstTracerValueScope;
Packit f546b1
Packit f546b1
/**
Packit f546b1
 * GstTracerValueFlags:
Packit f546b1
 * @GST_TRACER_VALUE_FLAGS_NONE: no flags
Packit f546b1
 * @GST_TRACER_VALUE_FLAGS_OPTIONAL: the value is optional. When using this flag
Packit f546b1
 *   one need to have an additional boolean arg before this value in the
Packit f546b1
 *   var-args list passed to  gst_tracer_record_log().
Packit f546b1
 * @GST_TRACER_VALUE_FLAGS_AGGREGATED: the value is a combined figure, since the
Packit f546b1
 *   start of tracing. Examples are averages or timestamps.
Packit f546b1
 *
Packit f546b1
 * Flag that describe the value. These flags help applications processing the
Packit f546b1
 * logs to understand the values.
Packit f546b1
 */
Packit f546b1
typedef enum
Packit f546b1
{
Packit f546b1
  GST_TRACER_VALUE_FLAGS_NONE = 0,
Packit f546b1
  GST_TRACER_VALUE_FLAGS_OPTIONAL = (1 << 0),
Packit f546b1
  GST_TRACER_VALUE_FLAGS_AGGREGATED = (1 << 1),
Packit f546b1
} GstTracerValueFlags;
Packit f546b1
Packit f546b1
#ifdef GST_USE_UNSTABLE_API
Packit f546b1
Packit f546b1
GST_API
Packit f546b1
GstTracerRecord * gst_tracer_record_new (const gchar * name, const gchar * firstfield, ...);
Packit f546b1
Packit f546b1
#ifndef GST_DISABLE_GST_DEBUG
Packit f546b1
GST_API
Packit f546b1
void              gst_tracer_record_log (GstTracerRecord *self, ...);
Packit f546b1
#else
Packit f546b1
#define gst_tracer_record_log(...) G_STMT_START {} G_STMT_END
Packit f546b1
#endif
Packit f546b1
Packit f546b1
#endif
Packit f546b1
Packit f546b1
G_END_DECLS
Packit f546b1
Packit f546b1
#endif /* __GST_TRACER_RECORD_H__ */