Edward Hervey
d1319a1b6d
pad-monitor: Remove unused pad getrange override
2019-01-30 14:30:52 +01:00
Edward Hervey
de59b3ad00
validate: Use g_object_{get|set}_qdata where applicable
...
This provides a substantial speedup compared to using strings
2019-01-30 14:29:48 +01:00
Thibault Saunier
7e70bf8729
validate: scenario: Mark action as being executed right before calling ->execute
...
And make sure that we do not try to execute the following action
In the case the action type leads to the GMainContext to be ieterated
2019-01-29 13:09:36 -03:00
Thibault Saunier
92483ae210
validate: Plug newly introduced leak
2019-01-12 15:25:53 -03:00
Thibault Saunier
31c1a7ac63
validate: Use filename instead of full path in dotfiles names
2019-01-12 10:00:42 -03:00
Thibault Saunier
9d11ade78a
validate: Lower a ERROR message to INFO
...
This behaviour is totally valid when running unit tests
2019-01-07 00:07:34 +01:00
Thibault Saunier
26ddc02cef
validate:tests: Fix race in validate_padmonitor.buffer_before_segment
...
We were using a fakesrc which data flow was potentially breaking the
test. Stop using it and remove dead code.
Fixes #34
2019-01-03 15:27:33 +00:00
Matthew Waters
1559e1aec7
gst: allow building static libraries for e.g. Android/iOS
2018-12-10 16:47:50 +11:00
Thibault Saunier
72995d5bbe
validate: launcher: Add a way to retrieve trace without coredumpctl
...
Simply spnning on segfaults (like gst-launch) and catch that in
the launcher to transform the timeout into a segfault and grab a gdb
backtrace
2018-12-07 09:06:50 -03:00
Thibault Saunier
79f686efa6
validate: Enhance printing actions with fields
...
If you have maby field, printed actions where unreadable, clean that
up by adding new lines.
2018-11-17 10:25:28 -03:00
Thibault Saunier
f9790f0eed
validate:scenario: Add an action to 'include' another scenario
...
This is particularly useful for scenario that define constants
that are used to check video frame checksum for example, we can
now have one single 'scenario' file that defines consts for the
checksum of the frames, and those can be reused everywhere.
2018-11-17 09:13:22 -03:00
Thibault Saunier
d4d99267a4
validate:override: Notify override object when they get attached
2018-11-17 09:13:22 -03:00
Alicia Boya García
2c1d8433bd
validate: fix bug monitor subscriptions on pads by name
...
gst_validate_override_register_by_name() was not working when using a
pad name because by the time gst_validate_pad_monitor_do_setup()
was called to set the name of the monitor it was too late for overrides
to have any effect.
Patch written by Thibault.
2018-11-14 17:10:28 +01:00
Thibault Saunier
288258c366
validate: Allow connecting reporters by name for overrides
...
Using the element that owns the pad on which we are connecting
was not making sense.
2018-10-28 14:54:47 +00:00
Wonchul Lee
955fc5fcce
validate: Update for g_type_class_add_private() deprecation in recent GLib
...
https://gitlab.gnome.org/GNOME/glib/merge_requests/7
2018-09-20 15:16:16 -03:00
Nirbheek Chauhan
8c06862e80
validate: Export the plugin symbol correctly
...
Otherwise it doesn't get correctly exported when building with MSVC
2018-09-06 17:29:24 +05:30
Nirbheek Chauhan
d035501228
meson: Maintain macOS ABI through dylib versioning
...
Requires Meson 0.48, but the feature will be ignored on older versions
so it's safe to add it without bumping the requirement.
Documentation:
https://github.com/mesonbuild/meson/blob/master/docs/markdown/Reference-manual.md#shared_library
2018-08-31 14:52:04 +05:30
Nirbheek Chauhan
68a7ad72ac
meson: Build gstvalidate-default-overrides-1.0
...
Needed by Cerbero.
2018-07-31 23:30:36 +05:30
Thibault Saunier
0dbfa44839
validate:scenario: Add an action type to validate last sample checksum
2018-07-21 12:12:16 -04:00
Thibault Saunier
61a899acf2
validate:scenario: Add a way to define constants to be used in actions
...
Allowing writing simpler to read scenarios.
2018-07-21 11:43:37 -04:00
Thibault Saunier
64e84407bd
validate:scenario: Add a way to set rank on all features of a plugin
...
You often want to make sure that elements from a particular plugins
are always/never plugged, `set-rank,name=plugin-name,rank=XXX` allows
you to simply do that.
2018-07-14 08:27:05 -04:00
Edward Hervey
8d58befadd
pad-monitor: Reset stream-related variables when deactivating
...
Any local variable related to the stream should be resetted
when the pad is deactivated
Avoids weird issues when elements are re-used (and pads are deactivated
and reactivated).
2018-06-19 08:04:01 +02:00
Thibault Saunier
94ee508123
validate: Fix mixup in variable check
2018-06-15 15:01:32 -04:00
Thibault Saunier
b2e71e1404
validate: media-check: Add a way to skip pluggin parsers
...
This is useful when you want to check only the demuxer output.
- Keep the information in the media file so that we can launch media-check
with the proper arguments in the launcher. Update it accordingly.
- Refactor compare_streams to simplify it, which in the end leads to
reporting all the issues instead of exiting on the first one.
2018-06-15 12:05:14 -04:00
Thibault Saunier
ad6fc12b76
validate: media-descriptor: Add a way to specify when a field value is unknown
...
And this way is to set the attribute to... `unknown`
2018-06-15 12:05:13 -04:00
Thibault Saunier
3f668f3e80
validate: media-check: Also check that segments are correct
2018-06-15 12:05:13 -04:00
Edward Hervey
1a9455d2f6
validate/media-descriptor: Fix indentation
2018-06-05 16:38:10 +02:00
Edward Hervey
9af908195c
validate: Add a new issue to detect invalid event seqnum
...
Events should always have a valid seqnum. Add a new issue which
allows detecting such events. And use that check in the
pad monitor
2018-06-05 16:37:35 +02:00
Thibault Saunier
ba3b27fa83
validate: pipeline: Handle the case where a pad has no monitor
...
We do not monitor ghost pads, only real pads, so this is a totally
legitimate case.
https://bugzilla.gnome.org/show_bug.cgi?id=792536
2018-04-27 17:33:29 +02:00
Kai Kang
d9256865b4
validate: fix out of source tree build error
...
It fails to generate gst-validate-enum-types.h and gst-validate-enum-types.c
when build out of source tree. Add the path for template files.
https://bugzilla.gnome.org/show_bug.cgi?id=795531
Signed-off-by: Kai Kang <kai.kang@windriver.com>
2018-04-25 08:54:46 -03:00
Thibault Saunier
b9ea967275
validate: Handle having a list of structure based/file path configs
2018-04-12 23:03:04 -03:00
Tim-Philipp Müller
34d56abedd
validate: GST_EXPORT -> GST_VALIDATE_API
...
We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.
2018-03-13 14:00:01 +00:00
Tim-Philipp Müller
4906612269
validate: dist enum types templates
2018-02-15 18:28:13 +00:00
Edward Hervey
55274bc89f
validate-pad-monitor: Use GST_SEQNUM_INVALID
...
Instead of 0 (which is valid)
2018-02-10 14:20:44 +01:00
Edward Hervey
92285ef261
validate: Use a single TCPServer for subprocess communication
...
Instead of creating a separate TCPServer for each test, just create
one which handles all connections in a threaded fashion.
Shaves off ~500ms per test
https://bugzilla.gnome.org/show_bug.cgi?id=791159
2017-12-03 12:23:29 +01:00
Edward Hervey
9acfa7fe4b
validate: Don't leak strings
...
We only use them in the error/debug case anyway
2017-11-25 13:10:41 +01:00
Edward Hervey
c33b2e240c
validate-report: Plug leaks
...
The trace was never freed, nor were the output of g_str_split
2017-11-25 12:46:05 +01:00
Edward Hervey
b5bb7d7016
validate-scenario: Don't assume element have factories
...
Some elements might not originate from factories (like custom/internal
elements).
Avoids dereferencing a NULL pointer
2017-11-23 12:27:11 +01:00
Edward Hervey
ff6055b195
validate-scenario: Handle non-relative switch
...
Make sure we stay within the number of present streams (and avoid
out-of-bound read).
CID #1415470
2017-11-22 16:37:44 +01:00
Edward Hervey
81c3ab0b12
validate-scenario: Handle switching stream of type not present
...
Unlikely to happen, but at least don't end up doing unsafe calculation
with n == 0 afterwards
CID #1415453
2017-11-22 16:37:44 +01:00
Edward Hervey
9658e12086
validate: Call g-ir-scanner with the same toolchain as the rest
2017-11-08 17:22:47 +01:00
Tim-Philipp Müller
8b91fef492
validate: hide some private symbols
2017-08-12 12:04:42 +01:00
Thibault Saunier
8393a3d5ca
validate: Plug a potential leak when retrieving peer pad
2017-08-10 21:44:14 -04:00
Thibault Saunier
7be8ecd628
validate: Fix going over ghostpads/proxypads
2017-08-10 19:29:07 -04:00
Thibault Saunier
74a560163a
validate: Mark symbols explicitly for export with GST_EXPORT
...
With an exception:
* gst_validate_monitor_setup
which was never declared in headers and should always have been static.
2017-08-07 15:56:21 -04:00
Thibault Saunier
823c9ca834
validate: Fix building the tracer
...
It fails on some platforms, I guess this is the reason
2017-07-26 17:25:25 -04:00
Thibault Saunier
8ef1050d1e
validate: Also mkenums with autotools
...
And fix the build with stricter gcc arguments.
2017-07-26 16:18:02 -04:00
Thibault Saunier
b9d6f9df9e
validate: Add a way to print information about pipeline status
...
Similare to what is done with gst-launch.
And finally generate GTypes for our flags and enums.
2017-07-26 15:45:37 -04:00
Edward Hervey
40eb48d21f
validate-scenario: Fix NULL pointer usage
...
for good this time ...
CID #1415570
2017-07-26 15:22:49 +02:00
Edward Hervey
1b48ffdff5
validate-report: Fix a leak in error cases
...
CID #1415494
2017-07-26 15:18:57 +02:00
Edward Hervey
6ad8bd3e7c
validate-scenario: Protect against priv NULL usage
...
CID #1415570
2017-07-20 14:21:59 +02:00
Thibault Saunier
1a28e7b043
validate: Factor out a method to set properties on elements in utils
...
Make sure to use it where appropriate and add some logging when
setting an object property from an action.
And use the valgrind.conf to set all the properties instead of having
a mixture of a config scenario and the config file (making sure the
max-lateness is set on any sink)
2017-07-19 11:34:19 -04:00
Thibault Saunier
1d568ff11f
validate:scenario: Allow not config action to be executed from config files
...
When those are special cased to support that, such as the `set-property`
action.
This special handling was added in
4927c65710
validate: disable QOS features when running with valgrind
before we started to support executing arbitrary config action from
configuration files.
2017-07-19 11:34:12 -04:00
Thibault Saunier
b3134e89d9
validate: scenario: Fix running config action from the config file
2017-07-19 10:23:34 -04:00
Edward Hervey
8b9b6ead3f
validate: Cast GList data content before usage
...
Apart from code readability, it allows compilers to detect wrong usages,
such as the call to gst_validate_action_new() which was using the wrong
argument
2017-07-19 11:02:44 +02:00
Thibault Saunier
f7252cbd48
validate: Remove some dead code
...
CID 1415457
2017-07-18 10:47:00 -04:00
Thibault Saunier
e70557dc3e
validate: Plug a minor string leak
...
CID 1415459
2017-07-18 10:45:29 -04:00
Thibault Saunier
9ee7b4483c
validate: Don't create scenario on a monitor which has no target
...
Not very probable but avoids a potential NULL pointer dereferencing.
CID 1415460
2017-07-18 10:42:00 -04:00
Thibault Saunier
6572af916b
validate: Always only use the first description in scenarios
...
Also pluging a leak of the descrption copied structure
CID 1415463
2017-07-18 10:38:24 -04:00
Thibault Saunier
c7483a90f0
validate: Plug a string leak
...
CID 1415475
2017-07-18 10:23:31 -04:00
Thibault Saunier
28f8787c17
validate: Add missing break statement
...
CID 1415485
2017-07-18 10:16:07 -04:00
Thibault Saunier
7eb9746adc
Check g_file_set_contents() return value
...
CID 1415486
2017-07-18 10:14:59 -04:00
Thibault Saunier
44260d70bd
validate: Plug leak of copy of a va_list
...
CID 1415490
2017-07-18 10:12:07 -04:00
Thibault Saunier
11ef28f3dc
validate: Do not check NULL pointer uselessly
...
CID 141593
2017-07-18 10:10:06 -04:00
Thibault Saunier
fc49d18425
validate: Plug minor leak in issue creation error path
...
CID 1415494
2017-07-18 10:10:06 -04:00
Thibault Saunier
54e35bb082
validate: Remove some dead code
...
Next will never be NULL as `done` is always set to TRUE when next is
set.
CID 1415503
2017-07-18 10:00:03 -04:00
Thibault Saunier
5c537bd627
validate: monitor: Add missing break; statement
...
Fixes CID 1415500
2017-07-18 09:59:42 -04:00
Edward Hervey
4f1242968e
validate-scenario: Fix wrong return value
...
We were always returning ok ...
CID #1415484
2017-07-18 15:50:35 +02:00
Edward Hervey
3904f2523b
validate-scenario: Check g_file_set_contents() return value
...
CID #1415487
2017-07-18 15:48:01 +02:00
Edward Hervey
e6073a411c
validate-scenario: Fix copy/paste error
...
CID #1415502
2017-07-18 15:45:13 +02:00
Edward Hervey
e5903f1d05
validate-scenario: Fix string usage
...
Use the string representation of the index if it *IS* present (and
not the opposite).
CID #1415506
2017-07-18 15:43:26 +02:00
Edward Hervey
5b54127c5a
validate-utils: Add NULL check
...
Unlikely to be triggered. And fix typo at the same time
CID #1415464
2017-07-18 15:38:04 +02:00
Thibault Saunier
c1f613d8e7
validate:scenario: Allow setting properties by element factory name
2017-06-30 12:30:40 -04:00
Thibault Saunier
f2fc6a4550
validate:scenario: Enhance the set_property action to handle enum props
...
User needs to specify the enum value as a string, to be used
as with gst_util_set_object_arg.
Also enhance reporting and verify that the set value has actually
been taken into account.
2017-06-30 09:46:57 -04:00
Thibault Saunier
dbc598b378
validate: Use Gst printing utils in our reporting system
...
Allowing us to use GST_PTR_FORMAT and friends!
2017-06-30 09:45:02 -04:00
Thibault Saunier
6a8b0111cd
validate:scenario: Enhance playbin3 stream selection error message
2017-06-22 11:52:26 -04:00
Thibault Saunier
eac403f87c
validate: Add missing space in segment mismatch issue description
2017-06-20 15:51:27 -04:00
Thibault Saunier
a728a7df49
validate: Fix the way we check if _CONFIG is a list of structures
2017-06-16 17:36:34 -04:00
Thibault Saunier
6439494f40
validate: overrides: Add a hook about newly added elements in a bin
2017-06-16 17:36:34 -04:00
Thibault Saunier
e0484a7cdd
validate: Attach overrides before calling monitor.setup()
2017-06-16 17:36:34 -04:00
Thibault Saunier
237a976d07
validate: Add a way to use config actions in GST_VALIDATE_CONFIG files
...
The synthax is:
core, action=action-name, param1=1, param2=param2
2017-06-07 11:17:53 -04:00
Thibault Saunier
8d251f12d9
scenario: Fallback to using media_info to determine stream duration
...
In the case the query duration return CLOCK_TIME_NONE.
2017-06-07 11:17:53 -04:00
Thibault Saunier
b9774b14b5
validate: Do not print \r in actual files
2017-06-07 11:17:53 -04:00
Thibault Saunier
3c62c315a9
validate: Implement RTSP support
2017-06-07 11:17:53 -04:00
Reynaldo H. Verdejo Pinochet
a18cef9c3f
validate: reporter: add doc entry for gst_validate_report()'s varargs
...
Avoids GTK-Doc parser warnings
2017-06-07 00:04:34 -07:00
Reynaldo H. Verdejo Pinochet
4349e11cb0
validate: scenario: fix typo/grammar issues in function documentation
2017-06-07 00:04:34 -07:00
Reynaldo H. Verdejo Pinochet
018ca98fd9
validate: actions: drop needless newline before feature-rank and wait
...
Stale new-lines messed the help output of gst-validate -t
2017-06-07 00:02:54 -07:00
Reynaldo H. Verdejo Pinochet
7f396ec660
validate: actions: add info on mandatory fields for set-property
...
Additionally, drop a comment that becomes redundant after adding this
info to the action description
2017-06-06 23:04:52 -07:00
Reynaldo H. Verdejo Pinochet
89fff02bb3
validate: scenario: fix description for 'seek' and 'stop'
2017-06-06 23:04:28 -07:00
Reynaldo H. Verdejo Pinochet
4b57c0bbb4
validate: fix documentation for gst_validate_init()
2017-06-06 18:50:47 -07:00
Thibault Saunier
9d3b760cf3
validate: Make Reporter.runner a MT safe weak reference
...
It can be used in any thread!
2017-06-01 16:57:50 -04:00
Thibault Saunier
e27367f040
validate: Fix json serialized object leaks
2017-06-01 16:57:50 -04:00
Thibault Saunier
86e9135b56
validate: Use GWeakRefs on monitor target and pipeline
...
Making it thread safe and more future proof (though having them point
to NULL might not be handled all around).
https://bugzilla.gnome.org/show_bug.cgi?id=782784
2017-06-01 16:57:50 -04:00
Thibault Saunier
8cc1b39919
validate: monitor: Unref our weak reference to the pipeline
2017-05-31 14:53:05 -04:00
Thibault Saunier
8f123cbc6f
validate: Make accessing Scenario.pipeline thread safe
...
The fact that Scenario.pipeline was not accessible in a thread way lead
to the fact that all users had to take the unref the last pipeline ref
in the main thread, otherwise we were crying. This was an ugly
restriction which lead to issue when using scenario on gst-rtsp-server.
This break the API as this commit remove the GstValidateScenario.pipeline
field but it is worth it.
2017-05-31 14:53:05 -04:00
Víctor Manuel Jáquez Leal
29480d006c
validate: g_object_newv() is deprecated
...
Since glib version 2.54, g_object_newv() is deprecated.
This patch changes that function with a simpler g_object_new(),
since no properties are set.
https://bugzilla.gnome.org/show_bug.cgi?id=782860
2017-05-20 12:40:26 +02:00
Edward Hervey
a4b16d54a0
validate-report: Don't leak GError
2017-05-05 15:27:37 +02:00
Edward Hervey
506e537f82
validate-scenario: Don't end up with invalid action name
...
When replacing an action structure, also update the action name with
the (new) name from the new structure. Otherwise we end up with
a bogus name from the previous (deleted) structure.
2017-05-05 15:27:37 +02:00
Edward Hervey
790e78c4f8
validate-scenario: Avoid invalid memory access
...
The name of the action comes directly (i.e. not copied) from the
contained GstStructure field. Therefore make sure to take that
name from the proper structure field (copied just before) and
not from an outside one.
2017-05-05 14:43:25 +02:00
Reynaldo H. Verdejo Pinochet
9d33d0ec9c
validate: drop unneeded break+concat in some string literals
...
Perform other related improvements while at it.
2017-04-12 10:31:21 -07:00