Olivier Naudan | b28313f | 2012-04-16 08:10:18 -0400 | [diff] [blame] | 1 | /* GStreamer
|
| 2 | * Copyright (C) <2009> Руслан Ижбулатов <lrn1986 _at_ gmail _dot_ com>
|
| 3 | *
|
| 4 | * This library is free software; you can redistribute it and/or
|
| 5 | * modify it under the terms of the GNU Lesser General Public
|
| 6 | * License as published by the Free Software Foundation; either
|
| 7 | * version 2.1 of the License, or (at your option) any later version.
|
| 8 | *
|
| 9 | * This library is distributed in the hope that it will be useful,
|
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
| 12 | * Lesser General Public License for more details.
|
| 13 |
|
| 14 | * You should have received a copy of the GNU Lesser General Public
|
| 15 | * License along with this library; if not, write to the Free Software
|
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
| 17 | * Boston, MA 02110-1301 USA
|
| 18 | */
|
| 19 |
|
| 20 | #ifndef __GST_MEASURE_COLLECTOR_H__
|
| 21 | #define __GST_MEASURE_COLLECTOR_H__
|
| 22 |
|
| 23 | #include "gstvideomeasure.h"
|
| 24 | #include <gst/base/gstbasetransform.h>
|
| 25 |
|
| 26 | G_BEGIN_DECLS
|
| 27 |
|
| 28 | typedef struct _GstMeasureCollector GstMeasureCollector;
|
| 29 | typedef struct _GstMeasureCollectorClass GstMeasureCollectorClass;
|
| 30 |
|
| 31 | #define GST_TYPE_MEASURE_COLLECTOR (gst_measure_collector_get_type())
|
| 32 | #define GST_MEASURE_COLLECTOR(obj) \
|
| 33 | (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MEASURE_COLLECTOR, \
|
| 34 | GstMeasureCollector))
|
| 35 | #define GST_IS_MEASURE_COLLECTOR(obj) \
|
| 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_MEASURE_COLLECTOR))
|
| 37 | #define GST_MEASURE_COLLECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),\
|
| 38 | GST_TYPE_MEASURE_COLLECTOR, GstMeasureCollectorClass))
|
| 39 | #define GST_IS_MEASURE_COLLECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),\
|
| 40 | GST_TYPE_MEASURE_COLLECTOR))
|
| 41 | #define GST_MEASURE_COLLECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),\
|
| 42 | GST_TYPE_MEASURE_COLLECTOR, GstMeasureCollectorClass))
|
| 43 |
|
| 44 | typedef enum {
|
| 45 | GST_MEASURE_COLLECTOR_0 = 0,
|
| 46 | GST_MEASURE_COLLECTOR_WRITE_CSV = 0x1,
|
| 47 | GST_MEASURE_COLLECTOR_EMIT_MESSAGE = 0x1 << 1,
|
| 48 | GST_MEASURE_COLLECTOR_ALL =
|
| 49 | GST_MEASURE_COLLECTOR_WRITE_CSV |
|
| 50 | GST_MEASURE_COLLECTOR_EMIT_MESSAGE
|
| 51 | } GstMeasureCollectorFlags;
|
| 52 |
|
| 53 | struct _GstMeasureCollector {
|
| 54 | GstBaseTransform element;
|
| 55 |
|
| 56 | guint64 flags;
|
| 57 |
|
| 58 | gchar *filename;
|
| 59 |
|
| 60 | /* Array of pointers to GstStructure */
|
| 61 | GPtrArray *measurements;
|
| 62 |
|
| 63 | GValue *result;
|
| 64 |
|
| 65 | guint64 nextoffset;
|
| 66 |
|
| 67 | gchar *metric;
|
| 68 |
|
| 69 | gboolean inited;
|
| 70 | };
|
| 71 |
|
| 72 | struct _GstMeasureCollectorClass {
|
| 73 | GstBaseTransformClass parent_class;
|
| 74 | };
|
| 75 |
|
| 76 | GType gst_measure_collector_get_type (void);
|
| 77 |
|
| 78 | G_END_DECLS
|
| 79 |
|
| 80 | #endif /* __GST_MEASURE_COLLECTOR_H__ */
|