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.
Note: The notion of "live" here is in the *content* sense and not in the
GStreamer sense.
Ex:
* A rtsp stream is always "live" in the GStreamer sense but might not always
provide live content.
* HLS/DASH streams are not "live" in the GStreamer sense but might
provide "live" content.
Some scenarios might:
* require live content
* not be compatible with live content
This patch adds two new properties for scenarios:
* live_content_required (default False) for scenarios that can only work with
live content.
* live_content_compatible (default False) for scenarios that can work with
both live and non-live content.
This patch adds support for reading a "live" property from stream_info
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
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.
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.
GOptionEntry's arg_data is of type gpointer which differs in
constness from const gchar*, so remove constness from outfolder.
This fixes a build issue with msvc.
https://bugzilla.gnome.org/show_bug.cgi?id=782031
And let following actions to be executed (setting the action as
INTERLACED) which will make sure the track switch happened at some
point. It means the user has to set the pipeline to PLAYING so we can
make it works but we do not have choice here I think
https://bugzilla.gnome.org/show_bug.cgi?id=781213
Protect the expected seek values with the same lock as the one
that will be used to read/validate the resulting segments and flush
values.
Avoids races with duplicated seeks (i.e. a seek that was already
sent and handled via another pad, such as in demuxers).
https://bugzilla.gnome.org/show_bug.cgi?id=781112
Try to emulate a bit better a real video sink by making the video
fakesink handle/calculate/report QoS.
Also use the same lateness value as default videosink
We want to be able to do GstValidate.Monitor and not
GstValidate.ValidateMonitor.
And do not pass header to the list of sources to build libraries as
it is not needed.
- monitors were never released
- reports were leaked
- GstValidateMediaDescriptor was leaked
- caps were leaked: gst_check_setup_events_with_stream_id() and
gst_event_new_caps() don't consume the caps
- srcpad were never released
https://bugzilla.gnome.org/show_bug.cgi?id=778279
In the case of h264 the stream might very well be in `nal` format but the decoder
might not accept it thus the parser converts to `byte-stream`, leading
to a correct stream detection but a failure in the validate-media-check
tool.
Fixing build failure https://ci.appveyor.com/project/thiblahute/gst-build-ge9m5/build/1.0.1197
FAILED: cl @subprojects/gst-devtools/validate/gst-libs/gst/video/gstvalidatevideo@sta/gstvalidatessim.c.obj.rsp
c:\projects\gst-build-ge9m5\subprojects\gst-plugins-base\gst-libs\gst\pbutils\pbutils.h(30): fatal error C1083: Cannot open include file: 'gst/pbutils/pbutils-enumtypes.h': No such file or directory
FAILED: cl @subprojects/gst-devtools/validate/plugins/ssim/gstvalidatessim@sha/gstvalidatessim.c.obj.rsp
c:\projects\gst-build-ge9m5\subprojects\gst-plugins-base\gst-libs\gst\pbutils\pbutils.h(30): fatal error C1083: Cannot open include file: 'gst/pbutils/pbutils-enumtypes.h': No such file or directory
Generating those files is useful for users building the GStreamer stack
using meson and having to link it to another project which is still
using the autotools.
Fixed the -uninstalled pc file libdir path while I was on it.
https://bugzilla.gnome.org/show_bug.cgi?id=776810
This is a regression that was introduced by 6504b9152c
If we have non-standard main_dir or qa_assets, make sure we prepend the
checked-out testsuites directory to the list of expected ones
This reverts commit a4aa5c60bb.
Does not work outside of gst-build (i.e. validate won't work when used either
installed, in a prefix, or in gst-uninstalled).
gst-validate-runner.c:856:7: error: implicit conversion from enumeration type 'GstValidateReportLevel' to different enumeration type 'GstValidateReportingDetails' [-Werror,-Wenum-conversion]
GST_VALIDATE_REPORT_LEVEL_UNKNOWN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This issue was most likely introduced by the refactoring of the
position querying into a standalone function.
In execute_next_action() the rate variable was never replaced by
the current rate of the pipeline, this would result in all reverse
playback actions to trigger immediately instead of waiting for
the actual target time.
https://bugzilla.gnome.org/show_bug.cgi?id=776280
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.
With the addition of the .def file for validate we need to make
sure the check-export script from common gets executed so that the
.def stays up to date.
https://bugzilla.gnome.org/show_bug.cgi?id=774638
The underlying integer type for enums are implementation defined and may
not be the same size as gint/guint. So implicitly casting from pointers-
to-enum-types to pointers-to-int-types is unsafe. MSVC warns on these.
https://bugzilla.gnome.org/show_bug.cgi?id=774638
The unw_word_t type has different sizes for 32-bit and 64-bit, so using the
%lx format specifier on a 32-bit CPU leads to the following compile warning:
CC libgstvalidate_1.0_la-gst-validate-report.lo
gst-validate-report.c: In function 'generate_unwind_trace':
gst-validate-report.c:137:36: error: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'unw_word_t {aka unsigned int}' [-Werror=format=]
g_string_append_printf (trace, "%s (0x%lx)\n", name, offset);
Cast to long so the %lx fomart specifier can be always used.
In the future instead of blacklisting tests we should define
what error is expected, and this way when the bug is closed,
we will notice, also, it will allow us to check GstValidate
error reporting itself.
Instead of trying to parsing stdout, generate json messages and
send them over a socket so that gst-validate-launcher can properly
have informations about gst-validate subprocess execution.
Keeping negotation information around and trying to figure
out precisely why the elements could not negotied the caps
when we get a NOT_NEGOTIATED error on the bus giving the
user details about it.
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.
Fix this by not taking a reference on the reporter but instead caching
its name.
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D1029
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
Pads returned using the playbin get-{audio,video}-pad are reffed.
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D1027
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
A GHashTableIter is invalided if the hash table is modified while we are
iterating. Prevent this by taking the runner lock.
Fix assertion warnings with
validate.file.transcode.to_vorbis_and_vp8_in_webm.Sintel_2010_720p_mkv_srt
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D1026
Add to deploy setup_sink_props_max_lateness scenario.
When running gst-validate with valgrind option on the installed package, it fails to find that scenario.
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D379
Only expect fully identical stream-id from URI which are not local files
nor from our local http server.
Fixes issues with non-default http server port
When doing a track switch, the only reliable way to detect that it
happened is whether a new STREAM_START arrives.
Relying on a DISCONT buffer is not satisfactory, since there might
not have been an element setting that flag upstream.
Checking whether the first buffer after a STREAM_START has the
DISCONT flag properly set should be done in parallel
gst-validate-scenario.c:183:7: error: '_gst_validate_action_type' redeclared without dllimport attribute: previous dllimport ignore
This is also declared in gst-validate-internal.h
As this is what user will expect in this case.
For example with this scenario:
set-state, state=null; playback-time=5
set-property, target-element-name=dvbsrc0, property-name=delsys, property-value=11
play;
Instead of providing full absolute path while validating the file, should be
able to provide the relative path with respect to the present directory.
https://bugzilla.gnome.org/show_bug.cgi?id=753494
The monitor returned by gst_validate_monitor_factory_create() was never
unreffed.
Report instances now have to keep a ref, as suggested by the TODO, as
the reporter is no longer leaked.
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D1012
The gstvalidate_debug may not be initialized like with the
validate/reporting which was crashing when run with GST_DEBUG=5.
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D1004
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
- the pad returned by gst_element_get_static_pad() was leaked.
- unref the pad from snode when updating it, not the pad passed as
callback to pad_added_cb()
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D958
_add_override_from_struct() could, in theory, register more than once
the same override so we should not transfer the ref.
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D956
Makes fixing easier as then we can just re-use the generated trace.
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D953
* Some SEGMENT might be updates caused by calling gst_pad_set_offset(),
which will send the same segment but with an updated offset and/or
based field. For those segments, we don't require a DISCONT on the
following buffer.
* Ignore differences in flags, they aren't relevant for now to figure
out whether the segment is an update or not
* Ignore difference in 'position', it's only meant for internal usage
by elements.
* Changes in the end position (stop in forward playback and start in
reverse playback) are considering updates
Furthermore, also expect a DISCONT flag on the first buffer following
a STREAM_START.
When a first testsuite will set paths, it does not mean that we should
just register following testsuite test manager default tests.
So we need to make a difference between the media paths the user passed
with --media-path and the ones defined by the testsuite.
After a seek we need to wait for the right segment (meaning the segment
with seqnum == last seek/flush stop seqnum) to check whether the segment.time
has been properly set.
In the case and element is in READY or is going to READY state, it can
always return GST_FLOW_FLUSHING.
Avoid a race where a demuxer sinkpad has not been set to FLUSHING when we are
still processing a buffer but downstream is already FLUSHING and thus
the demuxer is already returning FLUSHING.
MAX(0, ((gint64) priv->segment_start - priv->seek_pos_tol) will be a high
positive number thanks to being interpreted as unsigned values if
segment_start < seek_pos_tol. Fix this by explicitly checking for this case
and only doing the subtraction otherwise.
This fixes the problem from fdccffbb2e
completely now.
https://bugzilla.gnome.org/show_bug.cgi?id=763602
When listing tests, checking whether uri is present or not and displaying error.
But uri does notneed to be present in case of pipeline generator. So the condition check is wrong.
This results in validateelements testsuite not working. Hence modifying the condition to
not error out on valid cases.
https://bugzilla.gnome.org/show_bug.cgi?id=762422
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
The seekable variable in media_info file is of type string. When checking if the file
is seekable using is_seekable, it just returns the string, resulting in it always being true.
It should actually be comparing the string and returning true or false based on comparison
https://bugzilla.gnome.org/show_bug.cgi?id=755854
In case of fast-forward scenario, the playback-time is not set properly
as per increase in the rate. This is resulting in short media files of duration
less that 15 seconds to fail.
https://bugzilla.gnome.org/show_bug.cgi?id=754151
This ensures our sink pad event wrapper is properly called if the
element implement a GstPadEventFullFunc instead of a regular one.
Removes all stray "buffer received before segment" issues with
queue/multiqueue
Use fake elements instead of real ones in our tests so that
we control exactly the number of issues generated.
Until now we were trying to hide extra issues with a probe dropping
events and buffers but since 2dfa548f36
"pad: Append hooks instead of prepending to call them in the order they were added"
in core, hidding will not work.
PTS and DTS can be deceiving as a change in segment can dramatically change
playback synchronization. Track the running-time as well to properly
get any change in synchronization
Having a default value of 0 meant that a g_idle_add loop was constantly
running, causing each test to use 100% cpu.
This is no longer required. Using a 10ms interval brings down cpu usage
to a sane value
When a file does not contain any stream info, then there is no need
to create the media info file as, it is not considered to be a valid file
and no validate checks are done for the same.
This skips unnecessary files like .txt, .dump files
https://bugzilla.gnome.org/show_bug.cgi?id=754006
When there are no media-info files present and --generate-media-info
option is not given, then it just fails without printing error.
Printing an error stating, use --generate-media-info if there are no
media info files.
When there are neither media files and media info files, print error
stating the same
https://bugzilla.gnome.org/show_bug.cgi?id=755087
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
The user might have scenarios specific to a particular pipeline, and the
application might have several pipelines running and scenarios that
apply on specific pipeline. We have to handle that valid use case.
Summary:
Move variable declarations in the for block so we won't try re-free
tldir in case of early short circuiting of the 'for' code.
Depends on D348
Reviewers: thiblahute
Reviewed By: thiblahute
Differential Revision: https://phabricator.freedesktop.org/D349
Summary:
We were checking if the path was a full one but was using the
scenario_name instead of this path when trying to load the scenario.
Depends on D346
Reviewers: thiblahute
Reviewed By: thiblahute
Differential Revision: https://phabricator.freedesktop.org/D348
errors-for-leak-kinds should be set to definite, because almost every test case
, will have possibly lost memory, which may or may not be a leak.
And throwing error for all these cases doesn't seem to be correct.
https://bugzilla.gnome.org/show_bug.cgi?id=752754
When creating the class names for media check, uri is being used,
instead of the path. Hence converting the uri using uri2path and creating
class name.
Add double quotes for valgrind logs, to support special characters like space
https://bugzilla.gnome.org/show_bug.cgi?id=752808
writer_new_discover() API should be able to accept NULL GError and in case of
error, if GError is passed on as parameter, it should be propagated, else it
should be free'd.
https://bugzilla.gnome.org/show_bug.cgi?id=753340
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
Even though relative paths are supported, right now it does not
work when we give the path as 'media/' present in the current directory.
Adding support for the same.
https://bugzilla.gnome.org/show_bug.cgi?id=754100
As soon as the track is changed, the pipeline state is set to NULL
by execution 'stop' action even if there is a 'playback-time' with 5sec.
If the AV sink is not synchronized,
audio fakesink and video fakesink has different position value.
When the validate request the position information of pipeline
to do 'stop' action, the audio fakesink response of the position query
with the bigger value than 5sec.
https://bugzilla.gnome.org/show_bug.cgi?id=755101
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.
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.
When message_async is not called during error cases, needs_parsing GList is
not being freed resulting in leak. Hence free'ing the same in finalize.
https://bugzilla.gnome.org/show_bug.cgi?id=753339
There is no check to see if stream info is available. This leads to
assertion error. Adding proper error messages for the same and reported
the same as a validate warning message.
https://bugzilla.gnome.org/show_bug.cgi?id=752758
When discovering the files, there will be different kind of errors. If we print
the exact message, then it will be more helpful for user. Especially in the case
of missing plugins, displaying which plugin is missing as error message
https://bugzilla.gnome.org/show_bug.cgi?id=752758
When media file name consists of some special characters of the format
[b-a].mp3, then it fails with 'bad character range' error and exits.
call re.escape to escape the characters before using it in findall
https://bugzilla.gnome.org/show_bug.cgi?id=752650
When --medias-paths option is being used, right now we have to
specify the full path, like /home/user/gst/master/media/
But when inside master directory, would like to specify only
media/ and expect it to work. Using os.path.abspath and create uri based on that.
This way we can either just pass media/ or pass the full path as parameters.
https://bugzilla.gnome.org/show_bug.cgi?id=752518
in validate.py, some mixer test generators are being added by default.
When passing --media-paths, i would not want to test these.
So instead of setting up the validate test suite, just call tester.register_defaults().
https://bugzilla.gnome.org/show_bug.cgi?id=752518
Right now reverse playback happens till the beginning of the media file.
But for files which are longer than 150 seconds,
Timeout 'Hard timeout reached: 150 secs' error happens. So we should set the
start time within 150 seconds.
https://bugzilla.gnome.org/show_bug.cgi?id=753216
file:// base stream-id will vary depending on the file path. As we
don't expect everyone to use the same absolute path to place the
validate testsuite, the resulting stream-id changes. Because of that,
we can't match the stream-id in the recorded file, hence cannot do
further check. We work around this by doing what filesink would do,
which is compute a SHA256 of the URI which we can use to first
validate the ID is prefixed like expected, and decide if we should
consider the stream IDs the same or not.
https://bugzilla.gnome.org/show_bug.cgi?id=753079
while comparing the media descriptor with --expected-results, the return
values are not being handled properly, which results in wrong comparision
https://bugzilla.gnome.org/show_bug.cgi?id=748390
As stated in the bug, this comparison failing is not a critical
error, warning is enough. Add a comment so nobody thinks it's a
coding error.
https://bugzilla.gnome.org/review?bug=748390
when comparing tags, two conditions in if an else if are same
the correct way is to first check if both are NULL and return.
changed the condition accordingly.
https://bugzilla.gnome.org/show_bug.cgi?id=748390
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=752945