Commit graph

1057 commits

Author SHA1 Message Date
Vivienne Watermeier
d78b00163d validate: fix relative paths for test files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/256>
2021-09-14 15:09:20 +02:00
Thibault Saunier
e3636642b7 validate: Fix double freeing of GstStructure
gst_validate_get_config is transfer-container only

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/255>
2021-09-10 20:12:28 +00:00
Edward Hervey
1e1e9f2197 validate-utils: Only modify structure fields that really need updates
This avoids memory corruption in users of that structure which
were (rightfullly) assuming static fields (such as name) wouldn't
change. Without this, they would be using strings which will have been freed in
the meantime.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/252>
2021-08-20 09:22:28 +02:00
Edward Hervey
cdfa0778c7 validate-media-descriptor: Don't check segment position field
The position field of GstSegment is meant for private usage within
elements. Don't compare the values of it when doing media-check.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/251>
2021-07-15 14:42:51 +02:00
Thibault Saunier
ea3bd58289 validate: use extract_objects to avoid rebuilding all files for the tracer
And add the tracer to the plugins list so it can be used in our
uninstalled environment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/250>
2021-06-08 12:28:49 -04:00
Thibault Saunier
32591fece8 validate: Error out on invalid 'foreach' iterator types
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/248>
2021-05-27 12:23:05 -04:00
Thibault Saunier
87f656d1f6 validate: Handle unknown type in foreach types
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/248>
2021-05-27 12:23:05 -04:00
Thibault Saunier
6196aab94b validate: Make array delemiter a line continuation char
Making its usage more friendly

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/248>
2021-05-27 12:23:05 -04:00
Thibault Saunier
3883be76e7 validate:scenario: Allow iterating over arrays in foreach
We used to only support ranges, but we want to allow iterating over
values in an array too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/248>
2021-05-27 12:23:05 -04:00
Thibault Saunier
8b8a6c8a18 validate: Add a flag to allow defining how to resolve variables in structs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/248>
2021-05-27 12:23:05 -04:00
Thibault Saunier
b3065bb9ec validate:flow: Log caps features
No reason not to use directy the GstCaps serialization function here
This commits avoids needing regenerated all expectations to remove
the `;` which is not generated anymore as it is simple and makes
merging simpler.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/248>
2021-05-27 12:22:13 -04:00
Thibault Saunier
34a88d95c6 validate:flow: Sort fields in serialized structures
Otherwise change in element implementations could lead to meaningless
breakages
2021-05-20 11:19:32 -04:00
Thibault Saunier
a56823d8f4 validate:scenario: Allow forcing running action on idle from scenario file
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/235>
2021-05-15 18:55:19 -04:00
Thibault Saunier
f00048781f validate:scenario: Add a run-command action type
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/235>
2021-05-15 18:55:19 -04:00
Thibault Saunier
2247cdadca validate:monitor: Only get_name on GstObject
GObject don't have such method!

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/235>
2021-05-14 01:59:09 +00:00
Thibault Saunier
139c2cae66 pad-monitor: Plug a leak 2021-01-08 08:38:12 -03:00
Thibault Saunier
73a674ac2d validate: Do not check strv length on NULL pointers
This is not legal

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/234>
2021-01-05 11:33:51 -03:00
Thibault Saunier
f47e5b163f validate: Allow using the new nested structure syntax
And port the deeply nested tests we have

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/233>
2020-12-16 22:00:37 -03:00
Thibault Saunier
b4c9025db2 validate: Only consider the first pipeline when using test files
And port the deeply nested tests we have

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/233>
2020-12-16 22:00:37 -03:00
Thibault Saunier
6419f1f881 validate: Add missing GstValidateAction annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/233>
2020-12-16 22:00:37 -03:00
Thibault Saunier
f1de7c3a7f validate: Add an expected-values parameter to wait, message-type=XX
Allowing more precise filtering of the message we are waiting for.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/233>
2020-12-16 22:00:37 -03:00
Thibault Saunier
9dfb2016a2 validate: scenario: Add a GstValidateScenario::action-done signal
Allowing application to know when a specific action is done.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/233>
2020-12-16 22:00:37 -03:00
Thibault Saunier
b32debe06c validate: Enhance printing action execution information
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/233>
2020-12-15 18:00:58 -03:00
Thibault Saunier
920c12390f validate: Add an API to get the bin monitor scenario
This is useful for applications that use Validate directly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/233>
2020-12-15 17:58:51 -03:00
Thibault Saunier
373071a743 scenario: Ensure that messages are handled from the right thread
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/233>
2020-12-10 18:31:43 -03:00
Thibault Saunier
9eb7df7fef validate:scenario: Fix the refcount management for actions in structures
Handling the refcounting the same whether the action is blocking or not
as we were leaking a ref for non-blocking waits.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/231>
2020-12-08 16:47:15 +00:00
Thibault Saunier
aca781f981 validate:scenario: Minor cleanup
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/231>
2020-12-08 16:47:15 +00:00
Thibault Saunier
0a7cc6a56e validate: Use gst_validate_action_*ref everywhere.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/231>
2020-12-08 16:47:15 +00:00
Thibault Saunier
d974b0b5d5 validate: Add support to check properties of object properties
And recursively

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/231>
2020-12-08 16:47:15 +00:00
Thibault Saunier
f5c3a0c9a0 scenario: Add a 'non-blocking' flag to the wait signal
This way we can execute actions that will lead to the signal
emission later in the execution.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/228>
2020-11-25 00:25:16 +00:00
Thibault Saunier
3da3e8825b validate:scenario: Rename 'interlaced' action to 'non-blocking'
It is a better and more understandable naming.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/228>
2020-11-25 00:25:16 +00:00
Stéphane Cerveau
dbf7dbe830 meson: update glib minimum version to 2.56
In order to support the symbol g_enum_to_string in various
project using GStreamer ( gst-validate etc.), the glib minimum
version should be 2.56.0.

Remove compat code as glib requirement
is now > 2.56

Version used by Ubuntu 18.04 LTS

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/224>
2020-10-30 19:01:24 +00:00
Thibault Saunier
33a6cf5234 validate: Use pad.last_flowret instead of trying to compute it ourselves
Which makes it more accurate

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/172>
2020-10-23 12:18:40 -03:00
Thibault Saunier
779817cb91 report: Add a way to force backtraces on reports
And stop report simple debug message

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/172>
2020-10-23 12:18:40 -03:00
Xavier Claessens
31efd7a11c Meson: Use pkg-config generator 2020-09-13 17:32:12 -04:00
Thibault Saunier
c45e2612a9 validate: flow: Plug some leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/219>
2020-08-14 11:29:06 -04:00
Thibault Saunier
4177f0995e validate:scenario: Plug some leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/219>
2020-08-13 21:52:59 -04:00
Tim-Philipp Müller
426f3e96ac validate: silence g-ir-scanner warnings about GST_IS_VALIDATE_*
Which it complains about because we say our prefix is 'gst_validate'
so it should really be GST_VALIDATE_IS_* instead.

Hide the boilerplate defines from g-ir-scanner, it doesn't need
to process them.

Fixes #46

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/214>
2020-07-27 09:53:16 -04:00
Thibault Saunier
a848fdc464 Revert "validate: fix up gir namespace and symbol prefix"
This reverts commit b73e816140.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/214>
2020-07-27 09:06:39 -04:00
Tim-Philipp Müller
b73e816140 validate: fix up gir namespace and symbol prefix
Change gir namespace and symbol prefix from
GstValidate / gst_validate to Gst / gst, same
as we do for other libs like GstVideo etc.

Helps with warnings about GST_IS_VALIDATE_*

Fixes #46, Closes !214

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/215>
2020-07-25 23:17:50 +00:00
Thibault Saunier
bab10bd05f validate: Fix media descriptor mp3 like formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/216>
2020-07-25 22:51:07 +00:00
Tim-Philipp Müller
56b745f4f8 validate-scenario: reflow #ifdef to work around bogus g-ir-scanner warning
Looks like a scanner bug.

The endif comments are the wrong way round too, but that's not it.

gst-validate-scenario.c:126: mismatched #endif  /* G_HAVE_GNUC_VARARGS */

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/213>
2020-07-25 20:29:39 +01:00
Thibault Saunier
4c83b468d6 validate: Always check if scenario is done from the right thread
Action will be set_done from the right thread and we will check if the action is done from there

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/212>
2020-06-27 03:54:54 -04:00
Thibault Saunier
ae3a45d1b6 validate: Print errors on action failures
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/207>
2020-06-22 17:20:32 +00:00
Thibault Saunier
7003d692ca validate: Plug some leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/207>
2020-06-22 17:20:32 +00:00
Thibault Saunier
8650c47cd3 validate: Move action finalization to _set_done where it belongs
gst_validate_action_set_done is the place where we should finalize the
action, not in `execute_next`, this way we better handle printing
interlaced action finalization too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/207>
2020-06-22 17:20:32 +00:00
Thibault Saunier
9c08bfcaca validate:scenario: Replace the sub-action with a foreach action type
Sub-actions were really hard to use and conceptually weird. The
implementation was ugly and made the code complex for nothing.

Instead this commit introduces a `foreach` action type which allows
repeating actions passed in an `actions` array the number of time
specified by any `GstIntRange` value defined in the structure or its
`repeat` field.

This commit also makes sure that all action got through
gst_validate_action_set_done upon finalization.

+ Cleanup surrounding code
+ Add tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/207>
2020-06-22 17:20:32 +00:00
Thibault Saunier
e7355ea039 validate: scenario: Implement 'repeat' by copying actions
Instead of trying to reuse the same action structure and deal with
that in a complex way, copy the action the required number of times.

And add a simple test

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/207>
2020-06-22 17:20:32 +00:00
Thibault Saunier
521245fabd validate:scenario: Round results of expressions in a sensible way
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/207>
2020-06-22 17:20:32 +00:00
Thibault Saunier
758790ffc9 validate: Add private action type to check number of action type calls
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/207>
2020-06-22 17:20:32 +00:00