From 664618479185de88b20776da350d18d2cb3c524d Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 4 Apr 2023 18:34:26 -0400 Subject: [PATCH] validate: flow: Handle ignored fields for caps Part-of: --- .../gst-devtools/validate/gst/validate/flow/formatting.c | 8 +++++--- .../gst-devtools/validate/gst/validate/flow/formatting.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/subprojects/gst-devtools/validate/gst/validate/flow/formatting.c b/subprojects/gst-devtools/validate/gst/validate/flow/formatting.c index c9f8c782d9..9f8e1e877d 100644 --- a/subprojects/gst-devtools/validate/gst/validate/flow/formatting.c +++ b/subprojects/gst-devtools/validate/gst/validate/flow/formatting.c @@ -192,7 +192,8 @@ validate_flow_structure_cleanup (const GstStructure * structure, } gchar * -validate_flow_format_caps (const GstCaps * caps, gchar ** wanted_fields) +validate_flow_format_caps (const GstCaps * caps, gchar ** wanted_fields, + gchar ** ignored_fields) { guint i; GstCaps *new_caps = gst_caps_new_empty (); @@ -203,7 +204,7 @@ validate_flow_format_caps (const GstCaps * caps, gchar ** wanted_fields) for (i = 0; i < gst_caps_get_size (caps); i++) { GstStructure *structure = validate_flow_structure_cleanup (gst_caps_get_structure (caps, i), - wanted_fields, NULL); + wanted_fields, ignored_fields); gst_caps_append_structure_full (new_caps, structure, gst_caps_features_copy (gst_caps_get_features (caps, i))); @@ -419,7 +420,8 @@ validate_flow_format_event (GstEvent * event, structure_string = validate_flow_format_caps (caps, - logged_fields ? logged_fields : (gchar **) caps_properties); + logged_fields ? logged_fields : (gchar **) caps_properties, + ignored_fields); /* FIXME: Remove spurious `;` and regenerate all the expectation files */ event_string = g_strdup_printf ("%s: %s;", event_type, structure_string); goto done; diff --git a/subprojects/gst-devtools/validate/gst/validate/flow/formatting.h b/subprojects/gst-devtools/validate/gst/validate/flow/formatting.h index 3c0dee250b..8fb1183b03 100644 --- a/subprojects/gst-devtools/validate/gst/validate/flow/formatting.h +++ b/subprojects/gst-devtools/validate/gst/validate/flow/formatting.h @@ -33,7 +33,7 @@ void format_time(gchar* dest_str, guint64 time); gchar* validate_flow_format_segment(const GstSegment* segment, gchar** logged_fields, gchar** ignored_fields); -gchar* validate_flow_format_caps (const GstCaps* caps, gchar **wanted_fields); +gchar* validate_flow_format_caps (const GstCaps* caps, gchar **wanted_fields, gchar **ignored_fields); gchar* validate_flow_format_buffer(GstBuffer* buffer, gboolean add_checksum, GstStructure* logged_fields_struct, GstStructure* ignored_fields_struct);