Commit graph

65 commits

Author SHA1 Message Date
Thibault Saunier
2701634c29 Move files from gst-devtools into the "subprojects/gst-devtools/" subdir 2021-09-24 16:15:38 -03:00
Thibault Saunier
5b7ac97502 validate:transcoding: Port to GstTranscoder
Remove flag to force EOS on sigintr, making it the only choice
Also add support for variable framerate

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/172>
2020-10-23 12:18:40 -03:00
Thibault Saunier
fdfe797d4e validate:transcoding: Exit after printing the help
Fixes CID 1455575

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/192>
2020-06-06 06:00:11 +00:00
Thibault Saunier
b1e9e409fd validate: Enhance issue reporting from structures
And properly bail out when required
This is preparatory work for gst-test in core which will use the TAP
protocol

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/187>
2020-05-06 22:54:59 +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
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
Reynaldo H. Verdejo Pinochet
9ea012de22 validate: fix whitespace separators in multi-line string constants
Drop dupplicated & add missing ones

Additionally: typo fixes
2017-03-20 15:02:43 -07:00
Reynaldo H. Verdejo Pinochet
58b3a232b2 validate: fix mention to nonexistent option 2017-02-24 15:59:33 -08:00
Reynaldo H. Verdejo Pinochet
3d13f21be6 validate: improve set-config option description 2017-02-24 15:59:33 -08:00
Thibault Saunier
3932b3f944 validate-transcoding: Use standard GstEncodingProfile deserialization function 2016-12-23 15:00:53 -03:00
Thibault Saunier
ca85c45482 validate: transcode: No buffering handling when the sink is not synced on the clock
It makes no sense to pause the pipeline and wait for buffering to be
done when the pipeline is just processing the data as it comes
in without synchronizing on the clock.
2016-12-12 15:04:07 -03:00
Scott D Phillips
6299e1228c Fix MSVC const warnings
https://bugzilla.gnome.org/show_bug.cgi?id=774638
2016-11-17 17:36:03 -03:00
Reynaldo H. Verdejo Pinochet
80cc6f29ef validate: transcoding: fix several error messages
No encoders found, no static src/sink pads found and keyunit and force-stop
error conditions.
2016-09-25 18:52:35 -07:00
Guillaume Desmottes
04282bb192 validate: call gst_deinit() after gst_validate_deinit()
This allows validate to clean up before the 'leak' tracer list leaked
objects.

Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D1231
2016-08-01 10:45:36 -04:00
Guillaume Desmottes
dc7382017d validate: reporter: break cyclic references with reports
My patch fixing monitor leak (15e7f1bbfd)
introduced a ref cycle between GstValidateReporter and
GstValidateReport.

The reports uses its reporter so it needs a ref on it
to ensure it's stay alive. But reports are owned by GstValidateReporter and/or
GstValidateRunner.
The best way I found to break this cycle is to introduce this purge
method. It's not great but the design is a bit tricky.

Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D1029
2016-08-01 10:45:30 -04:00
Reynaldo H. Verdejo Pinochet
73ac07d6e3 validate: fix validate-transcoding option descriptions 2016-06-09 14:31:48 -07:00
Guillaume Desmottes
01c2ba564a validate: transcoding: fix encoding_profile leak
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D980
2016-05-24 10:28:55 -04:00
Guillaume Desmottes
2c4dcae918 validate: transcoding: fix caps leaks
The 'all_raw_caps' list is never used and was just leaking caps.

Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D979
2016-05-24 10:28:53 -04:00
Thibault Saunier
621bda9b62 validate: Use GstValidate logging system to print buffering avancement
So it can be used in the launcher.
And make sure to properly parse the info in the launcher.
2016-03-21 14:34:27 +01:00
Thibault Saunier
8c760b0a0e validate: Turn GstValidateRunner into a GstTracer
This way we do not need the LD_PRELOAD hack anymore

Add a new libgstvalidateplugin GStreamer plugin, making sure it shares
the exact same code as the library (exposing only the wanted symbols).

Fix the way we set where to install GstValidate plugins

Try to keep backward compatibility even if tracers should never be instantiated
after an GstElement has been instantiated.

Differential Revision: https://phabricator.freedesktop.org/D459
2016-02-23 11:46:32 +01:00
Vineeth T M
d57fca241a validate: Fix memory leaks when context parse fails
When g_option_context_parse fails, context and error variables are not getting free'd
which results in memory leaks. Free'ing the same.

And replacing g_error_free with g_clear_error, which checks if the error being passed
is not NULL and sets the variable to NULL on free'ing.

https://bugzilla.gnome.org/show_bug.cgi?id=753862
2015-11-11 10:12:49 +01:00
Vineeth T M
cfe7dc1d6d validate-transcoding: trivial patch to change error from 0.10 to 1.0
While printing error in transcoding, gst-validate-transcoding-0.10 is being used.
Changing the same to 1.0

https://bugzilla.gnome.org/show_bug.cgi?id=756215
2015-10-19 15:43:35 -03:00
Vineeth TM
5c0c42ed6d validate:tools: set locale to all and change argument to FILENAME
When file name consists of characters from other languages, say korean,
then it throws an error
Error initializing: Invalid byte sequence in conversion input

Hence setting locale to all to fix this.
And changing the media-info argument to type G_OPTION_ARG_FILENAME

https://bugzilla.gnome.org/show_bug.cgi?id=753486
2015-10-02 17:32:19 +02:00
Sebastian Dröge
d14564fd84 validate/transcoding: Don't override the target state of the scenario when receiving BUFFERING=100%
If the scenario handles the states and wants to stay in PAUSED, it's not a
good idea to change the state to PLAYING when receiving BUFFERING=100%. This
caused a race condition in varios seeking tests, most often in the dash scrub
seeking test.
2015-08-17 17:20:07 +02:00
Vineeth TM
c2a5909cd4 validate: tools: transcoding error due to wrong condition check
when checking the restriction caps, not adding proper check, which
results in assertion error when calling gst_caps_from_string

https://bugzilla.gnome.org/show_bug.cgi?id=752749
2015-08-05 17:19:24 -04:00
Thibault Saunier
dfe29c56e5 validate🏃 Add a method to force exiting the runner
This method is similar to runner_printf() but can be used
only once. The user needs to make sure all the pipeline
are in NULL state when this is called.

The method emits a "STOPPING" signal and at that point
overrides or monitors should do extra processing/checks if
needed.

+ Make use of it everywhere where it makes sense.

API:
  gst_validate_runner_exit
  GstValidateRunner::stopping signal
2015-06-06 08:50:47 +02:00
Guillaume Desmottes
92fa2b5681 validate: add gst_validate_deinit()
Reviewers: thiblahute

Differential Revision: http://phabricator.freedesktop.org/D159
2015-05-11 21:55:24 +02:00
Thibault Saunier
101ed96b5a validate:tools: EOS handling is the responsibility of the scenario
Summary: If any scenario set

Reviewers: Mathieu_Du

Differential Revision:
http://phabricator.freedesktop.org/D90
2015-04-13 11:27:08 +02:00
Guillaume Desmottes
15918f1e40 validate: transcoding: don't create a second mainloop 2015-03-31 09:45:06 +02:00
Guillaume Desmottes
8b84f76df4 validate: transcoding: don't leak the requested sinkpad from decodebin 2015-03-31 09:45:06 +02:00
Guillaume Desmottes
093390981c also call gst_deinit() in media-check and transcoding
More valgrind friendly.
2015-03-26 09:18:44 +01:00
Guillaume Desmottes
a35614d108 validate: call gst_bus_remove_signal_watch()
We are supposed to call gst_bus_remove_signal_watch() for each gst_bus_add_signal_watch() call to prevent leaks.
2015-03-23 13:41:03 +01:00
Thibault Saunier
02ab99fcbb validate: Rename gst_validate_add_action_type to gst_validate_register_action_type
The _register naming corresponds much better to what the method does
and makes it more similar to how we refer to this kind of action in
GStreamer.

It is a last minute API change, but that API should not change anymore
after 1.4 is released.
2014-10-12 20:10:19 +02:00
Thibault Saunier
8289f64904 validate: Rename --list-action-types to --inspect-action-type
Making clearer the meaning of the parameter and closer to the
usual naming in the GStreamer land.
2014-10-12 19:46:39 +02:00
Thibault Saunier
3755581fd3 validate: Take a const gchar ** in gst_validate_print_action_types
This is what we actually need and thus is cleaner.
2014-09-05 23:15:29 +02:00
Thibault Saunier
69165a9f04 validate: Implement the notion of implementer namespace to the action types
This allows users to know who implements an action type.

+ Enhance the printing of all action making it readable.
2014-09-05 23:03:58 +02:00
Thibault Saunier
34fd5af840 validate: docs: Add some GstValidate usage documentation
+ Fix minor issues in the gst-validate and gst-validate-transcoding
tools documentation
2014-09-05 19:00:23 +02:00
Thibault Saunier
4fd1939b21 validate: Rework the action parameter API
Making it possible to properly define parameters, and describe them.

+ Document all action types!
2014-09-05 19:00:23 +02:00
Thibault Saunier
d29a8e4a77 validate: Add an option to print all avalaible actions with details
+ Cleanup actions descriptions
+ Make GstValidateActionType internal only and only expose the structure
2014-09-05 19:00:23 +02:00
Thibault Saunier
3607fd8deb validate: Print the return value at the end
Making it easier to know whether the test passed or not.
2014-07-07 11:27:34 +02:00
Edward Hervey
ca44a11429 validate: Run gst-indent on all code
so whitespace. much indent. spacing !
2014-06-03 10:05:25 +02:00
Thibault Saunier
1ffb6b4e1c validate: Allow specifying scenarios to parse when lisiting them
It used to only handle the scenario present in proper paths, we
also need to handle special scenarios provided by users on the fly
2014-05-02 18:30:22 +02:00
Thibault Saunier
f165fb41d0 validate: Handle ERROR on the bus when monitoring the pipeline
This way the user get a  clear information in the report about the issue

+ sensibly cleanup code
2014-05-02 18:30:22 +02:00
Thibault Saunier
2d7d03d2f7 validate: Add a 'stop' action to stop a pipeline
It uses the GST_MESSAGE_REQUEST state with the scenario as a source
so that application can stop running when they receive it on the bus.
2014-04-25 14:33:06 +02:00
Thibault Saunier
38eda37341 validate: Handle position printing at the monitor level
Instead of replicating that code all around
2014-04-23 11:27:44 +02:00
Thibault Saunier
810e432da2 validate: Add printing utilities
Allowing the user to print everyting in a file through the
GST_VALIDATE_FILE env variable
2014-04-23 11:16:32 +02:00
Thibault Saunier
ad25b4d160 validate: Handle g_log errors at the gst-validate level 2014-04-17 12:23:04 +02:00
Thibault Saunier
4467b27b9f validate: Add a way to save details about avalaible scenarios in a file 2014-02-18 21:07:31 +01:00
Thibault Saunier
efc6938d01 validate: tools: Init gst-validate before listing scenarios
And return 0 when only listing scenarios
2014-02-18 21:07:31 +01:00
Thibault Saunier
8b8562ea85 validate:tools: Implement Buffering support in the various tools 2014-02-12 11:23:23 +01:00