X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Fgsttracerrecord.h;h=2392d1cd95a2db2474090d1207dcfaaa1a09a3c0;hb=b89b1802df44829a0c034db5807bc893ad3c7774;hp=fa561454ec3a251242ddfe17c78a9340e291e5a4;hpb=89ee5d948dff560204e6edd210c44ed2b8654b8e;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/gsttracerrecord.h b/gst/gsttracerrecord.h index fa56145..2392d1c 100644 --- a/gst/gsttracerrecord.h +++ b/gst/gsttracerrecord.h @@ -22,17 +22,11 @@ #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 G_BEGIN_DECLS typedef struct _GstTracerRecord GstTracerRecord; -typedef struct _GstTracerRecordPrivate GstTracerRecordPrivate; typedef struct _GstTracerRecordClass GstTracerRecordClass; #define GST_TYPE_TRACER_RECORD (gst_tracer_record_get_type()) @@ -43,11 +37,9 @@ typedef struct _GstTracerRecordClass GstTracerRecordClass; #define GST_TRACER_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_TRACER_RECORD,GstTracerRecordClass)) #define GST_TRACER_RECORD_CAST(obj) ((GstTracerRecord *)(obj)) +GST_API 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 @@ -59,11 +51,13 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTracerRecord, gst_object_unref) * @GST_TRACER_VALUE_SCOPE_ELEMENT: the value is related to an #GstElement * @GST_TRACER_VALUE_SCOPE_PAD: the value is related to a #GstPad * - * Tracing record will contain fields that contain a meassured value or extra + * Tracing record will contain fields that contain a measured value or extra * meta-data. One such meta data are values that tell where a measurement was * 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,39 @@ typedef enum GST_TRACER_VALUE_SCOPE_PAD } GstTracerValueScope; +/** + * GstTracerValueFlags: + * @GST_TRACER_VALUE_FLAGS_NONE: no flags + * @GST_TRACER_VALUE_FLAGS_OPTIONAL: the value is optional. When using this flag + * one need to have an additional boolean arg before this value in the + * var-args list passed to gst_tracer_record_log(). + * @GST_TRACER_VALUE_FLAGS_AGGREGATED: the value is a combined figure, since the + * start of tracing. Examples are averages or timestamps. + * + * Flag that describe the value. These flags help applications processing the + * logs to understand the values. + */ +typedef enum +{ + GST_TRACER_VALUE_FLAGS_NONE = 0, + GST_TRACER_VALUE_FLAGS_OPTIONAL = (1 << 0), + GST_TRACER_VALUE_FLAGS_AGGREGATED = (1 << 1), +} GstTracerValueFlags; + +#ifdef GST_USE_UNSTABLE_API + +GST_API +GstTracerRecord * gst_tracer_record_new (const gchar * name, const gchar * firstfield, ...); + +#ifndef GST_DISABLE_GST_DEBUG +GST_API +void gst_tracer_record_log (GstTracerRecord *self, ...); +#else +#define gst_tracer_record_log(...) G_STMT_START {} G_STMT_END +#endif + +#endif + G_END_DECLS #endif /* __GST_TRACER_RECORD_H__ */