ges: validate: Fix race condition in deeply nested timeline test

Fix race condition where wrong caps were sometimes received before
the last gap internal clip by setting explicit framerate in video
caps and adjusting test timing accordingly.

The test now uses framerate=1/1 with single buffer expectations
instead of relying on default 30fps timing that created timing
races with the internal gap clip processing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9608>
This commit is contained in:
Thibault Saunier 2025-08-25 11:19:17 -04:00 committed by GStreamer Marge Bot
parent e8ab8eccae
commit 321601f069
2 changed files with 3 additions and 35 deletions

View File

@ -7,7 +7,7 @@ meta,
args = {
"--track-types=video",
--videosink, "$(videosink) sync=true name=videosink",
--video-caps, "video/x-raw,format=I420,chroma-site=mpeg2,colorimetry=bt709",
--video-caps, "video/x-raw,format=I420,chroma-site=mpeg2,colorimetry=bt709,framerate=1/1,height=720,width=1080",
},
configs = {
"$(validateflow), pad=videosink:sink, record-buffers=true,
@ -24,7 +24,6 @@ set-vars,
nested_timeline_depth2_uri="file://$(logsdir)/ges/scenarios/$(test_name)/nested_timeline_depth2.xges",
project_uri="file://$(logsdir)/ges/scenarios/$(test_name)/project.xges"
set-track-restriction-caps, track-type="video", caps="video/x-raw,width=1080,height=720,format=I420"
# Make sure the asset ID is the project_uri and serialize the empty timeline for each nested projects uris
serialize-project, uri="$(project_uri)"
serialize-project, uri="$(nested_timeline_uri)"
@ -48,7 +47,7 @@ commit
play
crank-clock
check-position, expected-position=3.0
crank-clock, repeat=30
crank-clock, repeat=1
check-position, expected-position=4.0
crank-clock
stop, on-message=eos

View File

@ -11,39 +11,8 @@ CHECKPOINT: Paused pipeline, now editing nested timeline and committing.
event flush-start: (no structure)
event flush-stop: GstEventFlushStop, reset-time=(boolean)true;
event caps: video/x-raw, framerate=(fraction)30/1, height=(int)720, width=(int)1080;
event segment: format=TIME, start=0:00:03.000000000, offset=0:00:00.000000000, stop=0:00:04.000000000, flags=0x01, time=0:00:03.000000000, base=0:00:00.000000000
buffer: pts=0:00:03.000000000, dur=0:00:00.033333333
buffer: pts=0:00:03.033333333, dur=0:00:00.033333333
buffer: pts=0:00:03.066666666, dur=0:00:00.033333334
buffer: pts=0:00:03.100000000, dur=0:00:00.033333333
buffer: pts=0:00:03.133333333, dur=0:00:00.033333333
buffer: pts=0:00:03.166666666, dur=0:00:00.033333334
buffer: pts=0:00:03.200000000, dur=0:00:00.033333333
buffer: pts=0:00:03.233333333, dur=0:00:00.033333333
buffer: pts=0:00:03.266666666, dur=0:00:00.033333334
buffer: pts=0:00:03.300000000, dur=0:00:00.033333333
buffer: pts=0:00:03.333333333, dur=0:00:00.033333333
buffer: pts=0:00:03.366666666, dur=0:00:00.033333334
buffer: pts=0:00:03.400000000, dur=0:00:00.033333333
buffer: pts=0:00:03.433333333, dur=0:00:00.033333333
buffer: pts=0:00:03.466666666, dur=0:00:00.033333334
buffer: pts=0:00:03.500000000, dur=0:00:00.033333333
buffer: pts=0:00:03.533333333, dur=0:00:00.033333333
buffer: pts=0:00:03.566666666, dur=0:00:00.033333334
buffer: pts=0:00:03.600000000, dur=0:00:00.033333333
buffer: pts=0:00:03.633333333, dur=0:00:00.033333333
buffer: pts=0:00:03.666666666, dur=0:00:00.033333334
buffer: pts=0:00:03.700000000, dur=0:00:00.033333333
buffer: pts=0:00:03.733333333, dur=0:00:00.033333333
buffer: pts=0:00:03.766666666, dur=0:00:00.033333334
buffer: pts=0:00:03.800000000, dur=0:00:00.033333333
buffer: pts=0:00:03.833333333, dur=0:00:00.033333333
buffer: pts=0:00:03.866666666, dur=0:00:00.033333334
buffer: pts=0:00:03.900000000, dur=0:00:00.033333333
buffer: pts=0:00:03.933333333, dur=0:00:00.033333333
buffer: pts=0:00:03.966666666, dur=0:00:00.033333334
event caps: video/x-raw, framerate=(fraction)30/1, height=(int)720, width=(int)1080;
buffer: pts=0:00:03.000000000, dur=0:00:01.000000000
event segment: format=TIME, start=0:00:04.000000000, offset=0:00:00.000000000, stop=0:00:04.000000001, flags=0x01, time=0:00:04.000000000, base=0:00:01.000000000
buffer: pts=0:00:04.000000000, dur=0:00:00.000000001
event eos: (no structure)