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.
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.
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.
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
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.
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.
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
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.
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
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
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
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;
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 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
* 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.
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