mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 13:08:49 +00:00
qa-runner: Add a 'report-added' signal
So it is possible to plug into the runner to get information about what is going from outside of it.
This commit is contained in:
parent
5f62fd2e2a
commit
7faac43afb
1 changed files with 18 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gst-qa-runner.h"
|
#include "gst-qa-runner.h"
|
||||||
|
#include "gst-qa-report.h"
|
||||||
#include "gst-qa-monitor-factory.h"
|
#include "gst-qa-monitor-factory.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,6 +38,16 @@ GST_DEBUG_CATEGORY_STATIC (gst_qa_runner_debug);
|
||||||
#define gst_qa_runner_parent_class parent_class
|
#define gst_qa_runner_parent_class parent_class
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstQaRunner, gst_qa_runner, G_TYPE_OBJECT, _do_init);
|
G_DEFINE_TYPE_WITH_CODE (GstQaRunner, gst_qa_runner, G_TYPE_OBJECT, _do_init);
|
||||||
|
|
||||||
|
/* signals */
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
REPORT_ADDED_SIGNAL,
|
||||||
|
/* add more above */
|
||||||
|
LAST_SIGNAL
|
||||||
|
};
|
||||||
|
|
||||||
|
static guint _signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_qa_runner_dispose (GObject * object)
|
gst_qa_runner_dispose (GObject * object)
|
||||||
{
|
{
|
||||||
|
@ -63,6 +74,11 @@ gst_qa_runner_class_init (GstQaRunnerClass * klass)
|
||||||
|
|
||||||
/* init the report system (can be called multiple times) */
|
/* init the report system (can be called multiple times) */
|
||||||
gst_qa_report_init ();
|
gst_qa_report_init ();
|
||||||
|
|
||||||
|
_signals[REPORT_ADDED_SIGNAL] =
|
||||||
|
g_signal_new ("report-added", G_TYPE_FROM_CLASS (klass),
|
||||||
|
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 1,
|
||||||
|
GST_TYPE_QA_REPORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -109,6 +125,8 @@ void
|
||||||
gst_qa_runner_add_report (GstQaRunner * runner, GstQaReport * report)
|
gst_qa_runner_add_report (GstQaRunner * runner, GstQaReport * report)
|
||||||
{
|
{
|
||||||
runner->reports = g_slist_prepend (runner->reports, report);
|
runner->reports = g_slist_prepend (runner->reports, report);
|
||||||
|
|
||||||
|
g_signal_emit (runner, _signals[REPORT_ADDED_SIGNAL], 0, report);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue