2013-07-12 05:10:06 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 2013 Thiago Santos <thiago.sousa.santos@collabora.com>
|
|
|
|
*
|
|
|
|
* gst-qa-monitor-report.h - QA Element report structures and functions
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GST_QA_REPORT_H__
|
|
|
|
#define __GST_QA_REPORT_H__
|
|
|
|
|
|
|
|
#include <glib-object.h>
|
|
|
|
#include <gst/gst.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2013-07-18 16:11:00 +00:00
|
|
|
/* forward declaration */
|
|
|
|
typedef struct _GstQaMonitor GstQaMonitor;
|
|
|
|
|
2013-07-17 23:56:52 +00:00
|
|
|
GType gst_qa_report_get_type (void);
|
|
|
|
#define GST_TYPE_QA_REPORT (gst_qa_report_get_type ())
|
|
|
|
|
2013-07-18 15:09:13 +00:00
|
|
|
typedef enum {
|
|
|
|
GST_QA_FATAL_DEFAULT = 0,
|
|
|
|
GST_QA_FATAL_ISSUES = 1 << 0,
|
|
|
|
GST_QA_FATAL_WARNINGS = 1 << 1,
|
|
|
|
GST_QA_FATAL_CRITICALS = 1 << 2
|
|
|
|
} GstQaDebugFlags;
|
|
|
|
|
2013-07-12 05:10:06 +00:00
|
|
|
typedef enum {
|
2013-07-17 00:15:09 +00:00
|
|
|
GST_QA_REPORT_LEVEL_CRITICAL,
|
|
|
|
GST_QA_REPORT_LEVEL_WARNING,
|
|
|
|
GST_QA_REPORT_LEVEL_ISSUE,
|
|
|
|
GST_QA_REPORT_LEVEL_NUM_ENTRIES,
|
|
|
|
} GstQaReportLevel;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
GST_QA_AREA_EVENT=0,
|
|
|
|
GST_QA_AREA_BUFFER,
|
|
|
|
GST_QA_AREA_QUERY,
|
|
|
|
GST_QA_AREA_CAPS_NEGOTIATION,
|
|
|
|
GST_QA_AREA_OTHER=100,
|
|
|
|
} GstQaReportArea;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
GST_QA_AREA_EVENT_SEQNUM,
|
|
|
|
GST_QA_AREA_EVENT_UNEXPECTED,
|
|
|
|
GST_QA_AREA_EVENT_EXPECTED,
|
|
|
|
|
|
|
|
GST_QA_AREA_EVENT_NUM_ENTRIES
|
|
|
|
} GstQaReportAreaEvent;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
GST_QA_AREA_BUFFER_TIMESTAMP,
|
|
|
|
GST_QA_AREA_BUFFER_DURATION,
|
|
|
|
GST_QA_AREA_BUFFER_FLAGS,
|
|
|
|
GST_QA_AREA_BUFFER_UNEXPECTED,
|
|
|
|
|
|
|
|
GST_QA_AREA_BUFFER_NUM_ENTRIES
|
|
|
|
} GstQaReportAreaBuffer;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
GST_QA_AREA_QUERY_UNEXPECTED,
|
|
|
|
|
|
|
|
GST_QA_AREA_QUERY_NUM_ENTRIES
|
|
|
|
} GstQaReportAreaQuery;
|
2013-07-12 05:10:06 +00:00
|
|
|
|
2013-07-17 03:29:04 +00:00
|
|
|
typedef enum {
|
|
|
|
GST_QA_AREA_CAPS_NEGOTIATION_MISSING_FIELD,
|
|
|
|
GST_QA_AREA_CAPS_NEGOTIATION_BAD_FIELD_TYPE,
|
2013-07-19 19:52:45 +00:00
|
|
|
GST_QA_AREA_CAPS_NEGOTIATION_GET_CAPS,
|
2013-07-17 03:29:04 +00:00
|
|
|
|
|
|
|
GST_QA_AREA_CAPS_NEGOTIATION_NUM_ENTRIES
|
|
|
|
} GstQaReportAreaCapsNegotiation;
|
|
|
|
|
2013-07-12 05:10:06 +00:00
|
|
|
typedef struct {
|
2013-07-17 23:56:52 +00:00
|
|
|
gint refcount;
|
|
|
|
|
2013-07-17 00:15:09 +00:00
|
|
|
GstQaReportLevel level;
|
|
|
|
GstQaReportArea area;
|
|
|
|
gint subarea;
|
2013-07-12 05:10:06 +00:00
|
|
|
gchar *message;
|
2013-07-18 21:49:44 +00:00
|
|
|
gchar *id;
|
2013-07-12 05:10:06 +00:00
|
|
|
|
2013-07-18 14:59:11 +00:00
|
|
|
gchar *source_name;
|
2013-07-15 13:15:06 +00:00
|
|
|
guint64 timestamp;
|
2013-07-17 00:15:09 +00:00
|
|
|
} GstQaReport;
|
2013-07-12 05:10:06 +00:00
|
|
|
|
2013-07-17 00:15:09 +00:00
|
|
|
#define GST_QA_ERROR_REPORT_PRINT_FORMAT GST_TIME_FORMAT " (%s): %s, %s(%d)) %s(%d): %s"
|
2013-07-15 13:15:06 +00:00
|
|
|
#define GST_QA_REPORT_PRINT_ARGS(r) GST_TIME_ARGS (r->timestamp), \
|
2013-07-17 00:15:09 +00:00
|
|
|
gst_qa_report_level_get_name (r->level), \
|
2013-07-18 14:59:11 +00:00
|
|
|
r->source_name, \
|
2013-07-17 00:15:09 +00:00
|
|
|
gst_qa_report_area_get_name(r->area), r->area, \
|
|
|
|
gst_qa_report_subarea_get_name(r->area, r->subarea), r->subarea, \
|
|
|
|
r->message
|
2013-07-12 05:10:06 +00:00
|
|
|
|
2013-07-15 13:15:06 +00:00
|
|
|
void gst_qa_report_init (void);
|
2013-07-22 23:17:53 +00:00
|
|
|
GstQaReport * gst_qa_report_new (const gchar * source_name,
|
|
|
|
GstQaReportLevel level,
|
2013-07-18 16:11:00 +00:00
|
|
|
GstQaReportArea area,
|
2013-07-18 21:49:44 +00:00
|
|
|
gint subarea,
|
|
|
|
const gchar *format,
|
|
|
|
const gchar * message);
|
2013-07-17 23:56:52 +00:00
|
|
|
void gst_qa_report_unref (GstQaReport * report);
|
|
|
|
GstQaReport * gst_qa_report_ref (GstQaReport * report);
|
2013-07-12 05:10:06 +00:00
|
|
|
|
2013-07-17 00:15:09 +00:00
|
|
|
void gst_qa_report_printf (GstQaReport * report);
|
2013-07-12 05:10:06 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GST_QA_REPORT_H__ */
|
|
|
|
|