mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
qa-report: Pass the whole monitor when creating a report
So we have the proper source name already avalaible and in the future we might need some more informations about the monitor itself.
This commit is contained in:
parent
dd672acf8b
commit
eebb3522bf
3 changed files with 9 additions and 10 deletions
|
@ -236,9 +236,7 @@ gst_qa_monitor_do_report_valist (GstQaMonitor * monitor,
|
|||
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);
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#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;
|
||||
|
@ -175,7 +176,7 @@ gst_qa_report_check_abort (GstQaReport * report)
|
|||
}
|
||||
|
||||
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);
|
||||
|
@ -183,11 +184,7 @@ gst_qa_report_new (GstObject * source, GstQaReportLevel level,
|
|||
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;
|
||||
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
|
||||
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 ())
|
||||
|
||||
|
@ -103,7 +106,8 @@ typedef struct {
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue