Commit graph

917 commits

Author SHA1 Message Date
Matthew Waters
e3f4d51771 validate: fix build with newer gcc
In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:55,
                 from ../validate/gst/validate/gst-validate-scenario.c:45:
../validate/gst/validate/gst-validate-scenario.c: In function ‘gst_validate_scenario_load’:
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:645:5: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  645 |     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  646 |         (GObject *) (object), __VA_ARGS__);    \
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:1067:26: note: in expansion of macro ‘GST_CAT_LEVEL_LOG’
 1067 | #define GST_ERROR(...)   GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR,   NULL, __VA_ARGS__)
      |                          ^~~~~~~~~~~~~~~~~
../validate/gst/validate/gst-validate-scenario.c:3615:5: note: in expansion of macro ‘GST_ERROR’
 3615 |     GST_ERROR ("Invalid name for scenario '%s'", scenario_name);
      |     ^~~~~~~~~
../validate/gst/validate/gst-validate-scenario.c:3615:44: note: format string is defined here
 3615 |     GST_ERROR ("Invalid name for scenario '%s'", scenario_name);
      |                                            ^~
2019-09-24 11:45:34 +10:00
Matthew Waters
cca6ae3fdb validate: fix -Werror=format-nonliteral build with clang
[3470/4053] Compiling C object 'subprojects/gst-devtools/validate/gst/validate/28db7b6@@gstvalidatetracer@sha/gst-validate-reporter.c.o'.
../subprojects/gst-devtools/validate/gst/validate/gst-validate-reporter.c:186:31: warning: format string is not a string literal [-Wformat-nonliteral]
  message = g_strdup_vprintf (format, vacopy);
                              ^~~~~~
[3487/4053] Compiling C object 'subprojects/gst-devtools/validate/gst/validate/28db7b6@@gstvalidatetracer@sha/gst-validate-report.c.o'.
../subprojects/gst-devtools/validate/gst/validate/gst-validate-report.c:1007:34: warning: format string is not a string literal [-Wformat-nonliteral]
  tmp = gst_info_strdup_vprintf (format, args);
                                 ^~~~~~
[76/151] Compiling C object 'subprojects/gst-devtools/validate/plugins/flow/697521d@@gstvalidateflow@sha/gstvalidateflow.c.o'.
../subprojects/gst-devtools/validate/plugins/flow/gstvalidateflow.c:125:65: warning: format string is not a string literal [-Wformat-nonliteral]
  if (!flow->error_writing_file && vfprintf (flow->output_file, format, ap) < 0) {
                                                                ^~~~~~
2019-08-26 12:14:47 +00:00
Aaron Boxer
e1129d2516 validate: add missing G_BEGIN/END_DECLS in validate.h 2019-08-03 20:09:32 -04:00
Tim-Philipp Müller
d8d35241fe validate: fix build with older GLib versions
g_enum_to_string() is only available in newer ones.

Add compatibility workaround for the time being to decouple
this from the decision whether to bump the GLib requirement
and what to bump it to.

https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/199

Fixes #45
2019-07-29 10:08:51 +01:00
Mathieu Duponchelle
7c255a9015 scenario: fix PAUSED position check
The way this was implemented was simply wrong, first of all checking
the position against the segment after a seek in PAUSED by a query
of the pipeline position is of limited interest, and can only work
in forward playback.

Furthermore the check was a huge blob of code that didn't even look
like it was pretending to do a good job at checking the position in
reverse playback.
2019-07-26 02:34:55 +02:00
Thibault Saunier
aea1082116 scenario: Do not dereference NULL pointer 2019-07-08 23:36:52 -04:00
Thibault Saunier
8498861a28 validate:pipeline-monitor: Connect deep properties notification only when required
This is quite expensive and can lead to an overwhelm mainloop.
2019-07-03 15:42:32 -04:00
Thibault Saunier
258453a169 validate:scenario: Keep a reference to 'description' structure
For it to be reusable outside the scenario
2019-06-28 17:34:23 -04:00
Thibault Saunier
91728c6170 scenario: Use internal sinks when a sink bin can be used to check last-sample 2019-06-26 12:09:03 -04:00
Thibault Saunier
1e1797ee3a validate: Also monitor ghost pads
Allowing overrides to work on ghost pads too
2019-06-26 12:09:03 -04:00
Thibault Saunier
ade8ba3fcb validate: Add SCENARIO_NAME and CONFIG_NAME vars in configs/scenarios 2019-06-26 12:09:03 -04:00
Thibault Saunier
7d471ee25e validate: Set 'LOGSDIR' variable in scenarios and config files
Implementing support for variables in config files.
2019-06-23 03:10:34 -04:00
Thibault Saunier
b11c5ba185 scenario: Set SCENARIO_PATH/DIR variables in scenarios
And add some documentation about it
2019-06-23 01:54:26 -04:00
Thibault Saunier
0e0928b0b7 scenario: Add a TMPDIR global variables in scenarios
This also adds the notion of global variables which will be useable
in config files too.

And add some documentation about default variables in scenarios
2019-06-23 01:34:41 -04:00
Thibault Saunier
db487b2732 docs: Update validate action types
Include minor fixes in the action types and markdown generator
2019-06-18 18:15:30 -04:00
Thibault Saunier
5b52c38b85 validate: Misc leaks plugging 2019-06-18 18:13:03 -04:00
Thibault Saunier
314fd2b6de validate:reporter: Show report by branches when doing smart reporting
Meaning that instead of getting 1 "Detected on" line per monitor,
there will be one per "branch" like:

    Detected on <audioconvert1:sink, audioconvert1:src, audioresample1:sink, audioresample1:src, smart-adder-adder:sink_0, smart-adder-adder:src, smart-adder-capsfilter:sink, smart-adder-capsfilter:src, capsfilter2:sink, capsfilter2:src, tee1:sink, tee1:src_0>

Making it simpler to read and a bit less verbose.
2019-06-11 22:35:15 +00:00
Thibault Saunier
0a6c7c64a9 validate:scenario: Move force-key-unit action from the transcoding tool
The action is generally useful but was implemented in a way that
was restricting its usage for no good reason. Refactor the
implementation adding more argument so it can be used in a wider
context, such as uvch264src.

Something like:

``` bash
echo "video-request-key-unit, direction=upstream, all-header=true, count=1, target-element-factory-name=h264parse, srcpad=src, playback-time=1.0" > tmp.scenario && \
echo "stop,playback-time=2.0" >> tmp.scenario && \
gst-validate-1.0 --set-scenario=tmp.scenario uvch264src \
       device=/dev/video0 name=src iframe-period=33 auto-start=true src.vfsrc ! queue ! fakesink \
       src.vidsrc ! queue ! video/x-h264,width=1280,height=720,framerate=30/1 ! h264parse ! fakesink
```

works now.
2019-06-11 21:03:56 +00:00
Thibault Saunier
05f1c6e1b1 validate:scenario: Minor documentation cleanup 2019-06-11 21:03:56 +00:00
Thibault Saunier
f27e98caee validate:pipeline-monitor: Avoid wrong position issue
If the reported position or duration is NONE, do not check its
validity
2019-06-11 21:03:56 +00:00
Thibault Saunier
3ca0b7123e validate: Implement seeking with DEFAULT format 2019-05-27 14:36:28 +00:00
Thibault Saunier
1e2bf1c841 ssim: Fix the way we handle when an override is attached 2019-05-23 11:35:28 -04:00
Thibault Saunier
85282e53ca docs: Fix docstrings 2019-05-13 17:00:00 -04:00
Thibault Saunier
67d4a39602 validate: inspect: Output valid markdown
So it can be used directly in the documentation Also add a special "all"
argument to `gst-validate-1.0 --inspect-action-type` so we can generate
the documentation for all action types easily.
2019-05-13 11:37:38 -04:00
Thibault Saunier
0a7b23f566 doc: Port to hotdoc
Ideally we want a GstValidate hotdoc plugin... not for now.
2019-05-13 11:37:38 -04:00
Thibault Saunier
040b71a3d9 doc: Minor fixes 2019-05-13 11:37:38 -04:00
Tim-Philipp Müller
751a6d756c validate: fix build on macOS
_Q_VALIDATE_MONITOR was defined twice because it wasn't declared
as extern in the header, so it would be defined as variable in all
included files. This doesn't seem to cause problems on Linux, but
seems to cause build failures on macOS.

Fixes #42
2019-05-04 19:54:16 +01:00
Tim-Philipp Müller
ad139b1b4f validate: autotools: dist mock decryptor header file 2019-04-11 01:25:52 +01:00
Thibault Saunier
3650e66aec validate: Print error message details in our reports 2019-04-03 13:38:42 +00:00
Thibault Saunier
dcfa084fae validate:pad-monitor: Accept any return value when we aggregated FLUSHING while tearing down
Basically nothing guarantees that the set of pads we aggregated the flow
for is the same as the one that was aggregated during the actual data
flow as some pads could have been removed meanwhile.
2019-04-03 13:38:42 +00:00
Thibault Saunier
d8aaf5fdaa validate:scenario: Allow last-sample to not be set when checking it
And instead of failling, wait for it to be set again.

Depends on https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/119
2019-04-03 13:38:42 +00:00
Thibault Saunier
c2c5c68573 validate: Return the GstValidateAction on .ref() 2019-04-03 13:38:42 +00:00
Thibault Saunier
abaa382847 validate: Generate dot files and link to them on CI 2019-04-03 13:38:42 +00:00
Thibault Saunier
cd19b10d45 validate:scenario: Implement a way to execute an action on message
And use it for seek forward and fast forward scenarios
2019-04-03 13:38:42 +00:00
Thibault Saunier
48fa4b6c4b validate:scenario: Clear up last seek on EOS generating a 'stop' action
Otherwise there is a race leading to a segfault where ASYNC_DONE is
received *after* generating EOS ourselves:

```
Executing stop (
    - generated-after-eos=true
)
<Caught SIGNAL: SIGSEGV>

**Stack trace**:

...
Thread 1 (Thread 0x7f3c3e50df00 (LWP 10183)):
    #8  0x00007f3c3f01bea5 in g_cclosure_marshal_generic (closure=<optimized out>, return_gvalue=<optimized out>, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=<optimized out>) at gclosure.c:1496
    #9  0x00007f3c3f01b3dd in g_closure_invoke (closure=0x1855980, return_value=0x0, n_param_values=2, param_values=0x7ffda2e0a7e0, invocation_hint=0x7ffda2e0a760) at gclosure.c:810
    #10 0x00007f3c3f02e983 in signal_emit_unlocked_R (node=node@entry=0x15af670, detail=detail@entry=298, instance=instance@entry=0x171fc80, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7ffda2e0a7e0) at gsignal.c:3635
    #11 0x00007f3c3f037aaa in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7ffda2e0a9c0) at gsignal.c:3391
[Inferior 1 (process 10183) detached]

```
2019-04-03 13:38:42 +00:00
Thibault Saunier
7dbdb84ca8 validate:launcher: Output markdown as much as possible 2019-04-03 13:38:42 +00:00
Thibault Saunier
fca2411e77 validate:scenario: Add a way to ignore EOS
And ignore then in seek_forward/backward to avoid cases where the pipeline EOS
before we have the chance to launch the following seek, see:

https://ci.gstreamer.net/job/GStreamer-master-meson-validate/3483/testReport/junit/(root)/gst-validate-launcher/validate_rtsp_playback_seek_backward_raw_h264_1_mp4/
2019-04-03 13:38:42 +00:00
Philipp Zabel
99eaad17e2 validate: fix pause duration handling
Commit 394242c224 ("validate:scenario: Enhance variable
implementation") caused the duration parameter to be stored
as a double instead of GstClockTime, which the _execute_pause
implementation expects. Fix the parameter type and use
gst_validate_action_get_clocktime to handle duration correctly.

https://gitlab.freedesktop.org/gstreamer/gst-devtools/merge_requests/73
2019-04-02 20:55:41 +00:00
Nicolas Dufresne
40755c2d90 meson: validate: Fix linking error missing GstBaseTransform
There is a mockdecryptor that has been added into validate-sources and
this element is base on GstBaseTransform. This added a deps against
gstbase which was leading to linking errors when building with meson.
2019-04-01 14:51:31 -04:00
Jimmy Ohn
6754d4e9f2 validate: Print some log when environment variable is not set
print some log when environment variable is not set
2019-04-01 21:40:58 +09:00
Tim-Philipp Müller
9521fdbf88 meson: validate: actually pass extra arguments to gnome.generate_gir()
Especially the init section and the --quiet.

Remove the whole manual build/source dir include addition
to the g-ir-scanner args seeing that things worked fine
without the args being passed to the scanner at all.
2019-03-23 19:51:08 +00:00
Tim-Philipp Müller
d99994a849 validate: fix g-i warnings
gst-validate-utils.c:914: gst_validate_element_matches_target: unknown parameter 'structure' in documentation comment, should be 's'
gst-validate-override-registry.h:49: gst_validate_override_registry_get_override_list: return value: Missing (element-type) annotation
2019-03-23 19:47:24 +00:00
Xavier Claessens
ad24cb1b77 Avoid C99 declaration in 'for' loop 2019-03-22 15:37:37 -04:00
Matthew Waters
f6ae425a1a validate: allow building a static overrides library 2019-03-18 01:07:05 +00:00
Charlie Turner
ab0be78469 validate: Add a mock decryptor element. 2019-03-15 22:18:29 +00:00
Alicia Boya García
e536b05e5a validateflow: Fail when a pad is not attached
Previously validateflow tests did not fail when the pad was not
attached.

This was a limitation caused by how the Validate API worked. Before, the
`notify::validate-runner` signal was not emitted until a monitor was
attached to the override. This made impossible to listen for the
runner's `stopping` signal.

This patch fixes the problem by setting `validate-runner` for all
existing overrides when the runner is initialized and adding checks in
validateflow to error in the case no pad was attached.
2019-03-15 17:38:15 +00:00
Thibault Saunier
c9eaf1fc02 validate: Check that position <= duration from the pipeline monitor
We should not require a scenario for that check to happen
2019-03-11 18:14:23 -03:00
Thibault Saunier
c32c3e82d6 validate:scenario: Cleanup spurious error message 2019-03-11 18:14:23 -03:00
Edward Hervey
9772e0c1d2 validate: More usage of g_strcmp0 instead of strcmp 2019-03-06 10:15:21 +01:00
Thibault Saunier
c7270b2d8a validate: Notice that issue summaries should be 'stable'
As they are used in the testsuite to define known issues
2019-02-24 00:44:57 +00:00