GstQaReport *report;
message = g_strdup_vprintf (format, var_args);
- report =
- gst_qa_report_new (GST_OBJECT_CAST (GST_QA_MONITOR_GET_OBJECT
- (monitor)), level, area, subarea, message);
+ report = gst_qa_report_new (monitor, level, area, subarea, message);
GST_INFO_OBJECT (monitor, "Received error report %d : %d : %d : %s",
level, area, subarea, message);
#include <string.h>
#include "gst-qa-report.h"
+#include "gst-qa-monitor.h"
static GstClockTime _gst_qa_report_start_time = 0;
static GstQaDebugFlags _gst_qa_flags = 0;
}
GstQaReport *
-gst_qa_report_new (GstObject * source, GstQaReportLevel level,
+gst_qa_report_new (GstQaMonitor * monitor, GstQaReportLevel level,
GstQaReportArea area, gint subarea, const gchar * message)
{
GstQaReport *report = g_slice_new0 (GstQaReport);
report->level = level;
report->area = area;
report->subarea = subarea;
- if (GST_IS_PAD (source))
- report->source_name =
- g_strdup_printf ("%s:%s", GST_DEBUG_PAD_NAME (source));
- else
- report->source_name = g_strdup (GST_OBJECT_NAME (source));
+ report->source_name = g_strdup (monitor->target_name);
report->message = g_strdup (message);
report->timestamp = gst_util_get_timestamp () - _gst_qa_report_start_time;
G_BEGIN_DECLS
+/* forward declaration */
+typedef struct _GstQaMonitor GstQaMonitor;
+
GType gst_qa_report_get_type (void);
#define GST_TYPE_QA_REPORT (gst_qa_report_get_type ())
r->message
void gst_qa_report_init (void);
-GstQaReport * gst_qa_report_new (GstObject * source, GstQaReportLevel level, GstQaReportArea area,
+GstQaReport * gst_qa_report_new (GstQaMonitor * monitor, GstQaReportLevel level,
+ GstQaReportArea area,
gint subarea, const gchar * message);
void gst_qa_report_unref (GstQaReport * report);
GstQaReport * gst_qa_report_ref (GstQaReport * report);