validate:override: Notify override object when they get attached
authorThibault Saunier <tsaunier@igalia.com>
Sun, 28 Oct 2018 15:21:38 +0000 (15:21 +0000)
committerThibault Saunier <tsaunier@igalia.com>
Sat, 17 Nov 2018 12:13:22 +0000 (09:13 -0300)
validate/gst/validate/gst-validate-override-registry.c
validate/gst/validate/gst-validate-override.c
validate/gst/validate/gst-validate-override.h

index 238fa2d..981e4b1 100644 (file)
@@ -185,6 +185,7 @@ static void
       GST_INFO_OBJECT (registry, "Adding override %s to %s", entry->name, name);
 
       gst_validate_monitor_attach_override (monitor, entry->override);
+      gst_validate_override_attached (entry->override);
     }
   }
 }
index afe3ae4..fc2ceec 100644 (file)
@@ -321,3 +321,12 @@ gst_validate_override_can_attach (GstValidateOverride * override,
 
   return TRUE;
 }
+
+void
+gst_validate_override_attached (GstValidateOverride * override)
+{
+  GstValidateOverrideClass *klass = GST_VALIDATE_OVERRIDE_GET_CLASS (override);
+
+  if (klass->attached)
+    klass->attached (override);
+}
index d4f3828..a5edabc 100644 (file)
@@ -56,6 +56,7 @@ struct _GstValidateOverrideClass
   gboolean (*can_attach)(GstValidateOverride * override,
       GstValidateMonitor * monitor);
 
+  void (*attached)(GstValidateOverride * override);
 };
 
 struct _GstValidateOverride
@@ -127,6 +128,9 @@ void               gst_validate_override_set_element_added_handler (GstValidateO
 GST_VALIDATE_API
 gboolean           gst_validate_override_can_attach (GstValidateOverride * override, GstValidateMonitor *monitor);
 
+GST_VALIDATE_API
+void           gst_validate_override_attached (GstValidateOverride * override);
+
 G_END_DECLS
 
 #endif /* #ifndef __GST_VALIDATE_OVERRIDE_H__*/