mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-01 17:31:10 +00:00
validate:monitor: Do not requiere a GstObject as target
We can work with any GObject and that allows applications to write monitors for other aspects too
This commit is contained in:
parent
8b261599e4
commit
433c8676dc
1 changed files with 11 additions and 6 deletions
|
@ -68,6 +68,7 @@ _get_reporting_level (GstValidateReporter *monitor)
|
|||
{
|
||||
return GST_VALIDATE_MONITOR (monitor)->level;
|
||||
}
|
||||
|
||||
static void
|
||||
_reporter_iface_init (GstValidateReporterInterface * iface)
|
||||
{
|
||||
|
@ -130,7 +131,7 @@ gst_validate_monitor_class_init (GstValidateMonitorClass * klass)
|
|||
|
||||
g_object_class_install_property (gobject_class, PROP_OBJECT,
|
||||
g_param_spec_object ("object", "Object", "The object to be monitored",
|
||||
GST_TYPE_OBJECT, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
|
||||
G_TYPE_OBJECT, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (gobject_class, PROP_RUNNER,
|
||||
g_param_spec_object ("validate-runner", "VALIDATE Runner",
|
||||
|
@ -233,6 +234,9 @@ _determine_reporting_level (GstValidateMonitor *monitor)
|
|||
runner = gst_validate_reporter_get_runner (GST_VALIDATE_REPORTER (monitor));
|
||||
|
||||
do {
|
||||
if (!GST_IS_OBJECT (object))
|
||||
break;
|
||||
|
||||
/* Let's allow for singling out pads */
|
||||
if (GST_IS_PAD (object)) {
|
||||
level = _get_report_level_for_pad (runner, object);
|
||||
|
@ -241,7 +245,8 @@ _determine_reporting_level (GstValidateMonitor *monitor)
|
|||
}
|
||||
|
||||
object_name = gst_object_get_name (object);
|
||||
level = gst_validate_runner_get_reporting_level_for_name (runner, object_name);
|
||||
level =
|
||||
gst_validate_runner_get_reporting_level_for_name (runner, object_name);
|
||||
parent = gst_object_get_parent (object);
|
||||
gst_object_unref (object);
|
||||
object = parent;
|
||||
|
|
Loading…
Reference in a new issue