validate: Cleanup ABI and make it ready to be stabilized this cycle
authorThibault Saunier <tsaunier@igalia.com>
Mon, 7 Mar 2022 20:21:48 +0000 (17:21 -0300)
committerPhilippe Normand <philn@igalia.com>
Thu, 17 Mar 2022 14:48:34 +0000 (14:48 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1810>

22 files changed:
subprojects/gst-devtools/validate/gst-libs/gst/video/gssim.h
subprojects/gst-devtools/validate/gst-libs/gst/video/gstvalidatessim.h
subprojects/gst-devtools/validate/gst/validate/gst-validate-bin-monitor.h
subprojects/gst-devtools/validate/gst/validate/gst-validate-element-monitor.h
subprojects/gst-devtools/validate/gst/validate/gst-validate-internal.h
subprojects/gst-devtools/validate/gst/validate/gst-validate-media-info.h
subprojects/gst-devtools/validate/gst/validate/gst-validate-mockdecryptor.h
subprojects/gst-devtools/validate/gst/validate/gst-validate-monitor.h
subprojects/gst-devtools/validate/gst/validate/gst-validate-override-registry.h
subprojects/gst-devtools/validate/gst/validate/gst-validate-override.h
subprojects/gst-devtools/validate/gst/validate/gst-validate-pad-monitor.h
subprojects/gst-devtools/validate/gst/validate/gst-validate-pipeline-monitor.h
subprojects/gst-devtools/validate/gst/validate/gst-validate-report.h
subprojects/gst-devtools/validate/gst/validate/gst-validate-reporter.h
subprojects/gst-devtools/validate/gst/validate/gst-validate-runner.h
subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.h
subprojects/gst-devtools/validate/gst/validate/media-descriptor-parser.c
subprojects/gst-devtools/validate/gst/validate/media-descriptor-parser.h
subprojects/gst-devtools/validate/gst/validate/media-descriptor-writer.c
subprojects/gst-devtools/validate/gst/validate/media-descriptor-writer.h
subprojects/gst-devtools/validate/gst/validate/media-descriptor.c
subprojects/gst-devtools/validate/gst/validate/media-descriptor.h

index 39962ec..8ce8559 100644 (file)
@@ -36,10 +36,16 @@ typedef struct {
   GstObject parent;
 
   GssimPrivate *priv;
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 } Gssim;
 
 typedef struct {
   GstObjectClass parent;
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 } GssimClass;
 
 #define GSSIM_TYPE (gssim_get_type ())
index 52c7e55..67752c4 100644 (file)
@@ -41,10 +41,16 @@ typedef struct {
   GstObject parent;
 
   GstValidateSsimPrivate *priv;
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 } GstValidateSsim;
 
 typedef struct {
   GstObjectClass parent;
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 } GstValidateSsimClass;
 
 #define GST_VALIDATE_SSIM_TIME_FORMAT "u-%02u-%02u.%09u"
index 300161d..7f096b4 100644 (file)
@@ -61,6 +61,9 @@ struct _GstValidateBinMonitor {
   /*< private >*/
   gulong element_added_id;
   gulong element_removed_id;
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 /**
@@ -71,6 +74,9 @@ struct _GstValidateBinMonitor {
  */
 struct _GstValidateBinMonitorClass {
   GstValidateElementMonitorClass parent_class;
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 /* normal GObject stuff */
index 025153d..90025bd 100644 (file)
@@ -68,6 +68,8 @@ struct _GstValidateElementMonitor {
   gboolean       is_demuxer;
   gboolean       is_converter;
   gboolean       is_sink;
+
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 /**
@@ -78,6 +80,9 @@ struct _GstValidateElementMonitor {
  */
 struct _GstValidateElementMonitorClass {
   GstValidateMonitorClass      parent_class;
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 /* normal GObject stuff */
index 74b14e2..f5c2cec 100644 (file)
@@ -71,4 +71,103 @@ G_GNUC_INTERNAL GList * gst_validate_get_test_file_expected_issues (void);
 G_GNUC_INTERNAL gboolean gst_validate_extra_checks_init (void);
 G_GNUC_INTERNAL gboolean gst_validate_flow_init (void);
 G_GNUC_INTERNAL gboolean is_tty (void);
+
+/* MediaDescriptor structures */
+
+typedef struct
+{
+  /* Children */
+  /* GstValidateMediaTagNode */
+  GList *tags;
+
+  gchar *str_open;
+  gchar *str_close;
+} GstValidateMediaTagsNode;
+
+/* Parsing structures */
+struct _GstValidateMediaFileNode
+{
+  /* Children */
+  /* GstValidateMediaStreamNode */
+  GList *streams;
+  /* GstValidateMediaTagsNode */
+  GstValidateMediaTagsNode *tags;
+
+  /* attributes */
+  guint64 id;
+  gchar *uri;
+  GstClockTime duration;
+  gboolean frame_detection;
+  gboolean skip_parsers;
+  gboolean seekable;
+
+  GstCaps *caps;
+
+  gchar *str_open;
+  gchar *str_close;
+};
+
+struct _GstValidateMediaTagNode
+{
+  /* Children */
+  GstTagList *taglist;
+
+  /* Testing infos */
+  gboolean found;
+
+  gchar *str_open;
+  gchar *str_close;
+};
+
+typedef struct
+{
+  /* Children */
+  /* GstValidateMediaFrameNode */
+  GList *frames;
+
+  /* GstValidateMediaTagsNode */
+  GstValidateMediaTagsNode *tags;
+
+  /* Attributes */
+  GstCaps *caps;
+  GList * segments;
+  gchar *id;
+  gchar *padname;
+
+  /* Testing infos */
+  GstPad *pad;
+  GList *cframe;
+
+  gchar *str_open;
+  gchar *str_close;
+} GstValidateMediaStreamNode;
+
+typedef struct
+{
+  /* Attributes */
+  guint64 id;
+  guint64 offset;
+  guint64 offset_end;
+  GstClockTime duration;
+  GstClockTime pts, dts;
+  GstClockTime running_time;
+  gboolean is_keyframe;
+
+  GstBuffer *buf;
+
+  gchar *checksum;
+  gchar *str_open;
+  gchar *str_close;
+} GstValidateMediaFrameNode;
+
+typedef struct
+{
+  gint next_frame_id;
+
+  GstSegment segment;
+
+  gchar *str_open;
+  gchar *str_close;
+} GstValidateSegmentNode;
+
 #endif
index 9df9bf1..8a96786 100644 (file)
@@ -60,6 +60,9 @@ struct _GstValidateMediaInfo {
   gboolean discover_only;
 
   GstValidateStreamInfo *stream_info;
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 GST_VALIDATE_API
index a2afbec..26e48c5 100644 (file)
@@ -47,11 +47,17 @@ G_BEGIN_DECLS
 struct _GstMockDecryptor
 {
   GstBaseTransform element;
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 struct _GstMockDecryptorClass
 {
   GstBaseTransformClass parent_class;
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 G_GNUC_INTERNAL GType gst_mockdecryptor_get_type (void);
index 2964705..bae970d 100644 (file)
@@ -100,6 +100,9 @@ struct _GstValidateMonitor {
   GHashTable *reports;
 
   GstValidateVerbosityFlags verbosity;
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 /**
@@ -115,6 +118,9 @@ struct _GstValidateMonitorClass {
   GstElement *(* get_element) (GstValidateMonitor * monitor);
   void (*set_media_descriptor) (GstValidateMonitor * monitor,
           GstValidateMediaDescriptor * media_descriptor);
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 /* normal GObject stuff */
index 7dfcdb3..43fa8c1 100644 (file)
@@ -37,6 +37,9 @@ typedef struct {
   GQueue name_overrides;
   GQueue gtype_overrides;
   GQueue klass_overrides;
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 } GstValidateOverrideRegistry;
 
 GST_VALIDATE_API
index 93eef63..31e9375 100644 (file)
@@ -57,6 +57,8 @@ struct _GstValidateOverrideClass
       GstValidateMonitor * monitor);
 
   void (*attached)(GstValidateOverride * override);
+
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 struct _GstValidateOverride
@@ -73,6 +75,8 @@ struct _GstValidateOverride
 
   /*<private>*/
   GstValidateOverridePrivate *priv;
+
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 GST_VALIDATE_API
index 597d6ad..a571e37 100644 (file)
@@ -131,6 +131,9 @@ struct _GstValidatePadMonitor {
   GstClockTime min_buf_freq_interval_ts;
   GstClockTime min_buf_freq_first_buffer_ts;
   GstClockTime min_buf_freq_start;
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 /**
@@ -141,6 +144,9 @@ struct _GstValidatePadMonitor {
  */
 struct _GstValidatePadMonitorClass {
   GstValidateMonitorClass      parent_class;
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 /* normal GObject stuff */
index 37c88bc..9428410 100644 (file)
@@ -72,6 +72,8 @@ struct _GstValidatePipelineMonitor {
   GList *streams_selected;
 
   gulong deep_notify_id;
+
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 /**
@@ -82,6 +84,9 @@ struct _GstValidatePipelineMonitor {
  */
 struct _GstValidatePipelineMonitorClass {
   GstValidateBinMonitorClass parent_class;
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 /* normal GObject stuff */
index 180064f..8a24a87 100644 (file)
@@ -235,7 +235,7 @@ struct _GstValidateReport {
   gchar *trace;
   gchar *dotfile_name;
 
-  gpointer _gst_reserved[GST_PADDING - 2];
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 GST_VALIDATE_API
index c4e6180..0bad235 100644 (file)
@@ -99,16 +99,21 @@ typedef enum
 } GstValidateInterceptionReturn;
 
 /**
- * GstValidateReporter:
+ * GstValidateReporterInterface:
+ * @parent: parent interface type.
+ *
  */
 struct _GstValidateReporterInterface
 {
   GTypeInterface parent;
 
-    GstValidateInterceptionReturn (*intercept_report)    (GstValidateReporter * reporter,
-                                                          GstValidateReport   * report);
-    GstValidateReportingDetails   (*get_reporting_level) (GstValidateReporter * reporter);
-    GstPipeline *                 (*get_pipeline)        (GstValidateReporter *reporter);
+  GstValidateInterceptionReturn (*intercept_report)    (GstValidateReporter * reporter,
+                                                        GstValidateReport   * report);
+  GstValidateReportingDetails   (*get_reporting_level) (GstValidateReporter * reporter);
+  GstPipeline *                 (*get_pipeline)        (GstValidateReporter *reporter);
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 GST_VALIDATE_API
index e513803..04da3d5 100644 (file)
@@ -60,6 +60,8 @@ struct _GstValidateRunner {
 
   /* <private> */
   GstValidateRunnerPrivate *priv;
+
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 /**
@@ -70,6 +72,9 @@ struct _GstValidateRunner {
  */
 struct _GstValidateRunnerClass {
   GstTracerClass       parent_class;
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 /* normal GObject stuff */
index c63e2a7..e284e8d 100644 (file)
@@ -112,11 +112,11 @@ typedef GstValidateExecuteActionReturn (*GstValidatePrepareAction) (GstValidateA
 
 typedef struct _GstValidateActionPrivate          GstValidateActionPrivate;
 
-#define GST_VALIDATE_ACTION_LINENO(action) (((GstValidateAction*) action)->ABI.abi.lineno)
-#define GST_VALIDATE_ACTION_FILENAME(action) (((GstValidateAction*) action)->ABI.abi.filename)
-#define GST_VALIDATE_ACTION_DEBUG(action) (((GstValidateAction*) action)->ABI.abi.debug)
-#define GST_VALIDATE_ACTION_N_REPEATS(action) (((GstValidateAction*) action)->ABI.abi.n_repeats)
-#define GST_VALIDATE_ACTION_RANGE_NAME(action) (((GstValidateAction*) action)->ABI.abi.rangename)
+#define GST_VALIDATE_ACTION_LINENO(action) (((GstValidateAction*) action)->lineno)
+#define GST_VALIDATE_ACTION_FILENAME(action) (((GstValidateAction*) action)->filename)
+#define GST_VALIDATE_ACTION_DEBUG(action) (((GstValidateAction*) action)->debug)
+#define GST_VALIDATE_ACTION_N_REPEATS(action) (((GstValidateAction*) action)->n_repeats)
+#define GST_VALIDATE_ACTION_RANGE_NAME(action) (((GstValidateAction*) action)->rangename)
 
 /**
  * GstValidateAction:
@@ -148,18 +148,15 @@ struct _GstValidateAction
   gint repeat;
   GstClockTime playback_time;
 
+  gint lineno;
+  gchar *filename;
+  gchar *debug;
+  gint n_repeats;
+  const gchar *rangename;
+
   GstValidateActionPrivate *priv;
 
-  union {
-    gpointer _gst_reserved[GST_PADDING_LARGE - 1]; /* ->priv */
-    struct {
-      gint lineno;
-      gchar *filename;
-      gchar *debug;
-      gint n_repeats;
-      const gchar *rangename;
-    } abi;
-  } ABI;
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 GST_VALIDATE_API
@@ -336,12 +333,9 @@ struct _GstValidateScenario
   /*< private >*/
   GstValidateScenarioPrivate *priv;
 
-  union {
-    gpointer _gst_reserved[GST_PADDING];
-    struct {
-      GMutex eos_handling_lock;
-    } abi;
-  } ABI;
+  GMutex eos_handling_lock;
+
+  gpointer _gst_reserved[GST_PADDING];
 };
 
 /* Some actions may trigger EOS during their execution. Unlocked this
@@ -352,8 +346,8 @@ struct _GstValidateScenario
  * lock. Actions expecting to cause an EOS can hold the lock for their
  * duration so that they are guaranteed to finish before the EOS
  * terminates the test. */
-#define GST_VALIDATE_SCENARIO_EOS_HANDLING_LOCK(scenario) (g_mutex_lock(&(scenario)->ABI.abi.eos_handling_lock))
-#define GST_VALIDATE_SCENARIO_EOS_HANDLING_UNLOCK(scenario) (g_mutex_unlock(&(scenario)->ABI.abi.eos_handling_lock))
+#define GST_VALIDATE_SCENARIO_EOS_HANDLING_LOCK(scenario) (g_mutex_lock(&(scenario)->eos_handling_lock))
+#define GST_VALIDATE_SCENARIO_EOS_HANDLING_UNLOCK(scenario) (g_mutex_unlock(&(scenario)->eos_handling_lock))
 
 GST_VALIDATE_API
 GType gst_validate_scenario_get_type (void);
index 6733d4e..153fe92 100644 (file)
@@ -22,6 +22,8 @@
 #include "media-descriptor-parser.h"
 #include <string.h>
 
+#include "gst-validate-internal.h"
+
 struct _GstValidateMediaDescriptorParserPrivate
 {
   gchar *xmlpath;
index b10dc05..b6a7f48 100644 (file)
@@ -49,12 +49,18 @@ typedef struct {
 
   GstValidateMediaDescriptorParserPrivate *priv;
 
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
+
 } GstValidateMediaDescriptorParser;
 
 typedef struct {
 
   GstValidateMediaDescriptorClass parent;
 
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
+
 } GstValidateMediaDescriptorParserClass;
 
 GST_VALIDATE_API
index 1bd9d44..08d7398 100644 (file)
@@ -23,6 +23,8 @@
 #include "media-descriptor-writer.h"
 #include <string.h>
 
+#include "gst-validate-internal.h"
+
 struct _GstValidateMediaDescriptorWriterPrivate
 {
   GstElement *pipeline;
index 334568b..5ada0c6 100644 (file)
@@ -50,12 +50,18 @@ typedef struct {
 
   GstValidateMediaDescriptorWriterPrivate *priv;
 
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
+
 } GstValidateMediaDescriptorWriter;
 
 typedef struct {
 
   GstValidateMediaDescriptorClass parent;
 
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
+
 } GstValidateMediaDescriptorWriterClass;
 
 /**
index 100fdc3..f8f41be 100644 (file)
@@ -23,6 +23,8 @@
 #include <string.h>
 #include "media-descriptor.h"
 
+#include "gst-validate-internal.h"
+
 struct _GstValidateMediaDescriptorPrivate
 {
   gpointer dummy;
index fffbae2..34b571e 100644 (file)
@@ -33,101 +33,8 @@ G_BEGIN_DECLS
 
 #define GST_VALIDATE_UNKNOWN_BOOL - 1
 
-typedef struct
-{
-  /* Children */
-  /* GstValidateMediaTagNode */
-  GList *tags;
-
-  gchar *str_open;
-  gchar *str_close;
-} GstValidateMediaTagsNode;
-
-/* Parsing structures */
-typedef struct
-{
-  /* Children */
-  /* GstValidateMediaStreamNode */
-  GList *streams;
-  /* GstValidateMediaTagsNode */
-  GstValidateMediaTagsNode *tags;
-
-  /* attributes */
-  guint64 id;
-  gchar *uri;
-  GstClockTime duration;
-  gboolean frame_detection;
-  gboolean skip_parsers;
-  gboolean seekable;
-
-  GstCaps *caps;
-
-  gchar *str_open;
-  gchar *str_close;
-} GstValidateMediaFileNode;
-
-typedef struct
-{
-  /* Children */
-  GstTagList *taglist;
-
-  /* Testing infos */
-  gboolean found;
-
-  gchar *str_open;
-  gchar *str_close;
-} GstValidateMediaTagNode;
-
-typedef struct
-{
-  /* Children */
-  /* GstValidateMediaFrameNode */
-  GList *frames;
-
-  /* GstValidateMediaTagsNode */
-  GstValidateMediaTagsNode *tags;
-
-  /* Attributes */
-  GstCaps *caps;
-  GList * segments;
-  gchar *id;
-  gchar *padname;
-
-  /* Testing infos */
-  GstPad *pad;
-  GList *cframe;
-
-  gchar *str_open;
-  gchar *str_close;
-} GstValidateMediaStreamNode;
-
-typedef struct
-{
-  /* Attributes */
-  guint64 id;
-  guint64 offset;
-  guint64 offset_end;
-  GstClockTime duration;
-  GstClockTime pts, dts;
-  GstClockTime running_time;
-  gboolean is_keyframe;
-
-  GstBuffer *buf;
-
-  gchar *checksum;
-  gchar *str_open;
-  gchar *str_close;
-} GstValidateMediaFrameNode;
-
-typedef struct
-{
-  gint next_frame_id;
-
-  GstSegment segment;
-
-  gchar *str_open;
-  gchar *str_close;
-} GstValidateSegmentNode;
+typedef struct _GstValidateMediaFileNode GstValidateMediaFileNode;
+typedef struct _GstValidateMediaTagNode GstValidateMediaTagNode;
 
 GST_VALIDATE_API
 void gst_validate_filenode_free (GstValidateMediaFileNode *
@@ -163,13 +70,19 @@ typedef struct
 
   GMutex lock;
 
+  /*< private >*/
   GstValidateMediaDescriptorPrivate *priv;
+  gpointer _gst_reserved[GST_PADDING];
+
 } GstValidateMediaDescriptor;
 
 typedef struct
 {
   GstObjectClass parent;
 
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
+
 } GstValidateMediaDescriptorClass;
 
 GST_VALIDATE_API