validate-pad-monitor: Reimplement reporter interface.
authorMathieu Duponchelle <mathieu.duponchelle@collabora.com>
Tue, 30 Sep 2014 14:08:46 +0000 (16:08 +0200)
committerMathieu Duponchelle <mathieu.duponchelle@opencreed.com>
Tue, 21 Oct 2014 18:13:51 +0000 (20:13 +0200)
+ Do nothing there for now, except chain up.

validate/gst/validate/gst-validate-pad-monitor.c

index 7cad96a..96c3194 100644 (file)
  * TODO
  */
 
+static void gst_validate_pad_monitor_intercept_report (GstValidateReporter *
+    reporter, GstValidateReport * report);
+
+#define _do_init \
+  G_IMPLEMENT_INTERFACE (GST_TYPE_VALIDATE_REPORTER, _reporter_iface_init)
+
+static void
+_reporter_iface_init (GstValidateReporterInterface * iface)
+{
+  iface->intercept_report = gst_validate_pad_monitor_intercept_report;
+}
+
 #define gst_validate_pad_monitor_parent_class parent_class
-G_DEFINE_TYPE (GstValidatePadMonitor, gst_validate_pad_monitor,
-    GST_TYPE_VALIDATE_MONITOR);
+G_DEFINE_TYPE_WITH_CODE (GstValidatePadMonitor, gst_validate_pad_monitor,
+    GST_TYPE_VALIDATE_MONITOR, _do_init);
 
 #define PENDING_FIELDS "pending-fields"
 #define AUDIO_TIMESTAMP_TOLERANCE (GST_MSECOND * 100)
@@ -108,6 +120,21 @@ typedef struct
   GstEvent *event;
 } SerializedEventData;
 
+
+static void
+gst_validate_pad_monitor_intercept_report (GstValidateReporter *
+    reporter, GstValidateReport * report)
+{
+  GstValidateReporterInterface *iface_class, *old_iface_class;
+
+  iface_class =
+      G_TYPE_INSTANCE_GET_INTERFACE (reporter, GST_TYPE_VALIDATE_REPORTER,
+      GstValidateReporterInterface);
+  old_iface_class = g_type_interface_peek_parent (iface_class);
+
+  old_iface_class->intercept_report (reporter, report);
+}
+
 static void
 debug_pending_event (GstPad * pad, GPtrArray * array)
 {