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-23 03:24:55 +00:00
|
|
|
if gst_dep.type_name() == 'internal'
|
2020-06-18 09:40:14 +00:00
|
|
|
if meson.version().version_compare('>= 0.51')
|
2020-07-07 19:01:33 +00:00
|
|
|
gst_tester = gst_proj.get_variable('gst_tester', disabler())
|
|
|
|
if is_disabler(gst_tester)
|
2020-06-11 07:46:40 +00:00
|
|
|
if get_option('tests').enabled()
|
|
|
|
error('Tests are enabled for gst-plugins-base but were not enabled for the gstreamer subproject')
|
|
|
|
endif
|
|
|
|
subdir_done()
|
|
|
|
endif
|
2020-06-18 09:40:14 +00:00
|
|
|
else
|
|
|
|
# Workaround for meson < 0.51. Remove once we bump the requirement.
|
|
|
|
# If you hit this, disable tests in gst-plugins-base.
|
|
|
|
gst_tester = gst_proj.get_variable('gst_tester')
|
|
|
|
endif
|
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-23 03:24:55 +00:00
|
|
|
else
|
2020-06-11 07:46:40 +00:00
|
|
|
gst_tester = find_program('gst-tester-@0@'.format(api_version), required: get_option('tests'))
|
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-23 03:24:55 +00:00
|
|
|
if not gst_tester.found()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
tests = [
|
|
|
|
'audiotestsrc/reverse',
|
2020-05-25 16:31:32 +00:00
|
|
|
'videorate/10_to_1fps',
|
|
|
|
'videorate/reverse.10_to_1fps',
|
2020-05-25 20:59:53 +00:00
|
|
|
'videorate/reverse.10_to_30fps',
|
|
|
|
'videorate/reverse.1_to_10fps',
|
|
|
|
'videorate/reverse.30fps',
|
|
|
|
'videorate/reverse.variable_to_10fps',
|
2020-05-31 04:27:14 +00:00
|
|
|
'videorate/change_rate_while_playing',
|
|
|
|
'videorate/change_rate_reverse_playback',
|
2020-05-29 20:21:11 +00:00
|
|
|
'videorate/rate_0_5',
|
|
|
|
'videorate/rate_0_5_with_decoder',
|
|
|
|
'videorate/rate_2_0',
|
|
|
|
'videorate/rate_2_0_with_decoder',
|
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-23 03:24:55 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
env = environment()
|
|
|
|
env.set('GST_PLUGIN_PATH_1_0', meson.build_root(), pluginsdirs)
|
|
|
|
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
|
|
|
|
env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), 'validate'))
|
|
|
|
env.set('GST_PLUGIN_SCANNER_1_0', gst_plugin_scanner_path)
|
2020-05-28 17:42:22 +00:00
|
|
|
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer', 'gst-validate',
|
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-23 03:24:55 +00:00
|
|
|
'gst-plugins-base@' + meson.build_root())
|
|
|
|
|
|
|
|
foreach t: tests
|
|
|
|
test_dir_name = t.split('/')
|
|
|
|
test_name = 'validate'
|
|
|
|
foreach c: test_dir_name
|
|
|
|
test_name += '.' + c
|
|
|
|
endforeach
|
|
|
|
test_env = env
|
|
|
|
test_env.set('GST_VALIDATE_LOGSDIR', join_paths(meson.current_build_dir(), test_name))
|
|
|
|
test_file = join_paths(meson.current_source_dir(), t + '.validatetest')
|
|
|
|
test(test_name, gst_tester, args: [test_file, '--use-fakesinks'],
|
|
|
|
env: test_env, timeout : 3 * 60, protocol: 'tap')
|
2020-06-11 07:46:40 +00:00
|
|
|
endforeach
|