Commit graph

12 commits

Author SHA1 Message Date
Thibault Saunier d268c193ad videoaggregator: Guarantee that the output format is supported
In the case `videoaggregator` is set as allowing format conversions,
and as we convert only on the sinkpads, we should ensure that the
chosen format is usable by the subclass. This in turns implies
that the format is usable on the srcpad.

When doing conversion *any* format can be used on the sinkpads, and this
is the only way that we can avoid race conditions during renegotiations
so we can not change that fact, we just need to ensure that the chosen
intermediary format is usable, which was not actually ensured before
that patch.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/834

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/909>
2020-11-03 00:10:31 +00:00
Xavier Claessens 0d246fb8b0 Meson: find_program() will return gst-tester from subproject
gstreamer now use override_find_program() so it won't return the system
version.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/776>
2020-08-04 07:11:54 -04:00
Tim-Philipp Müller c38b6cc305 tests: validate: fix meson warning
meson.build:4: WARNING: Trying to compare values of different types (ExecutableHolder, bool) using ==.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/739>
2020-07-07 19:03:56 +00:00
Tim-Philipp Müller aecd0f660f tests: validate: Add workaround for older meson versions
subproject.get_variable() only has fallback since 0.51

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/710>
2020-06-18 10:41:17 +01:00
Nirbheek Chauhan 30509252ca meson: Use the tests option for validate
This is what gstreamer core does too, and avoids a configure error
when tests are disabled globally. Also print a useful error when
gst_tester is not found from the gstreamer subproject.

This broke in https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/667

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/697>
2020-06-11 14:01:01 +05:30
Guillaume Desmottes 1b4ab9f033 tests: enforce I420 format
Tests are assuming video is I420 but are not actually enforcing it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/689>
2020-06-09 08:09:58 +00:00
Thibault Saunier 0c75ea0858 videorate: Update QoS events taking into account our rate
Otherwise there is a mismatch between the QoS values and what upstream
would expect, leading to too much buffer dropping in video decoders in
case rate < 1.0 or not enough buffer dropping in case rate > 1.0

Adding validate tests with and without decoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/679>
2020-06-01 07:07:31 +00:00
Thibault Saunier 6499e2afa5 videorate: Fix changing rate property during playback
We need to take into account the base_ts to compute next_ts and it needs
to be updated on rate change.

This introduces `pending_rate` so that change rate is properly handled
in the streaming thread in a safe way.

Added tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/679>
2020-06-01 07:07:31 +00:00
Thibault Saunier d846a1ac1c tests:validate: Run all test using a simple fakesink
`fakevideosink` is in -bad and thus not available here.

Update the expectation files as video metas are not negotiated anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/677>
2020-05-29 19:21:43 +00:00
Thibault Saunier 97fe599c0f videorate: Fix buffer selection logic in reverse playback
Stop comparing all timestamps from buffers that are before the segment
with the segment.stop and compare with the actual end times.

Comparing to segment.stop for all the buffers that where before
the segment.stop was incorrect and leading to consuming wrong buffers
and not respecting segment.stop, this is now properly tested.

Expectations for `reverse.10_to_1fps.validatetest` have been fixed to
take that into account and comparing the checksums of the sinkpad and
srcpad expectations makes pretty clear how wrong that was.

(we can see in the expectations that videotestsrc outputs an extra
buffer with pts == segment.stop and this one is now properly dropped
by videorate as bec7f4ad5e aimed at
doing)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/668>
2020-05-26 15:35:00 -04:00
Thibault Saunier dc47232d0d videorate: Do not push an extra buffer on EOS when we are done pushing already
There is no reason that when we have already pushed all the buffers in
a segment we push a new one on EOS

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/668>
2020-05-26 15:35:00 -04:00
Thibault Saunier b46718b1a0 audiotestsrc: Fix the way we compute EOS in reverse playback
In reverse playback we were not taking into account the current buffer
samples to check if we had reached EOS which was leading to a buffer
with PTS = CLOCK_TIME_NONE containing too many frames followed by a
useless buffer with pts=0 duration=0, and a g_critical issue in
gst_object_sync_values.

Also add a validate based test case.
Without that patch this is how the expectation fails:

``` diff
--- log-asink-sink-expected       2020-05-22 23:22:42.654384579 -0400
+++ log-asink-sink-actual  2020-05-22 23:29:35.671586380 -0400
@@ -27,5 +27,6 @@
 buffer: pts=0:00:00.058820861, due=0:00:00.023219955, flags=discont
 buffer: pts=0:00:00.035600907, due=0:00:00.023219954, flags=discont
 buffer: pts=0:00:00.012380952, due=0:00:00.023219955, flags=discont
-buffer: pts=0:00:00.000000000, due=0:00:00.012380952, flags=discont
+buffer: due=0:00:00.012380953, flags=discont
+buffer: pts=0:00:00.000000000, flags=discont
 event eos: (no structure)
 ```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/667>
2020-05-25 08:19:02 +00:00