qa: Properly set reporter's runner reference

That was never set, but it is needed for the reporter to properly add
reports to the runner.
We still keep a reference on the monitor to make things simpler
This commit is contained in:
Thibault Saunier 2013-07-23 10:13:06 -04:00 committed by Thiago Santos
parent d804ad475a
commit 382fcc9a01
4 changed files with 16 additions and 9 deletions

View file

@ -196,6 +196,7 @@ gst_qa_monitor_set_property (GObject * object, guint prop_id,
/* we assume the runner is valid as long as this monitor is,
* no ref taken */
monitor->runner = g_value_get_object (value);
gst_qa_reporter_set_runner (GST_QA_REPORTER (monitor), monitor->runner);
break;
case PROP_QA_PARENT:
monitor->parent = g_value_get_object (value);

View file

@ -155,3 +155,11 @@ gst_qa_reporter_get_runner (GstQaReporter * reporter)
return priv->runner;
}
void
gst_qa_reporter_set_runner (GstQaReporter * reporter, GstQaRunner * runner)
{
GstQaReporterPrivate *priv = gst_qa_reporter_get_priv (reporter);
priv->runner = runner;
}

View file

@ -103,8 +103,8 @@ void gst_qa_report_valist (GstQaReporter * reporter, gboolean rep
GstQaReportLevel level, GstQaReportArea area,
gint subarea, const gchar * format, va_list var_args);
void gst_qa_reporter_set_runner (GstQaReporter * reporter,
GstQaRunner *runner);
G_END_DECLS
#endif /* _GST_QA_REPORTER_ */

View file

@ -374,13 +374,12 @@ static void
gst_qa_scenario_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstQaScenarioPrivate *priv = GST_QA_SCENARIO (object)->priv;
switch (prop_id) {
case PROP_RUNNER:
/* we assume the runner is valid as long as this scenario is,
* no ref taken */
priv->runner = g_value_get_object (value);
gst_qa_reporter_set_runner (GST_QA_REPORTER (object),
g_value_get_object (value));
break;
default:
break;
@ -391,13 +390,12 @@ static void
gst_qa_scenario_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
{
GstQaScenarioPrivate *priv = GST_QA_SCENARIO (object)->priv;
switch (prop_id) {
case PROP_RUNNER:
/* we assume the runner is valid as long as this scenario is,
* no ref taken */
g_value_set_object (value, priv->runner);
g_value_set_object (value,
gst_qa_reporter_get_runner (GST_QA_REPORTER (object)));
break;
default:
break;