Commit 3c370929 authored by Thibault Saunier's avatar Thibault Saunier 🌵
Browse files

validate: Add simple tests for clock synchronization

Those tests play a videostream in forward playback, crank the clock
manually checking the time spent waiting on each crank and ensuring
that the dataflow is correct using the validateflow plugin.

There still is a bug with duplicated caps event flowing in the
fakevideosink::sinkpad which needs fixing.

Part-of: <gstreamer/gst-integration-testsuites!70>
parent 974d1436
......@@ -855,6 +855,8 @@ validate.test.appsrc.custom_caps_single_push
validate.test.appsrc.single_push
validate.test.aspectcropratio.set_aspect_ratio_in_paused
validate.test.baseparse.single_seek
validate.test.clock_sync.video_1fps
validate.test.clock_sync.video_30fps
validate.test.decryptor.cenc_audio_esds_property_overrides
validate.test.flow.simple_test
validate.test.flvdemux.audio_only.play_15s
......
meta,
handles-states=true,
ignore-eos=true,
args = {
"videotestsrc pattern=blue ! video/x-raw,format=I420,framerate=1/1 ! timeoverlay ! $(videosink) name=videosink allocation-meta-flags=0",
},
configs = {
"$(validateflow), pad=videosink:sink, record-buffers=true, ignored-fields={\"buffers=meta\", }",
}
play
seek, start=0.0, stop=5.0, flags=accurate+flush, rate=1.0
# First buffer is display as fast as possible
crank-clock, expected-elapsed-time=0.0
crank-clock, repeat=4, expected-elapsed-time=1.0
# Waiting 1 second on EOS
crank-clock, expected-elapsed-time=1.0
stop, on-message=eos
event stream-start: GstEventStreamStart, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)1;
event caps: video/x-raw, format=(string)I420, width=(int)320, height=(int)240, framerate=(fraction)1/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive;
event caps: video/x-raw, format=(string)I420, width=(int)320, height=(int)240, framerate=(fraction)1/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive;
event segment: format=TIME, start=0:00:00.000000000, offset=0:00:00.000000000, stop=none, time=0:00:00.000000000, base=0:00:00.000000000, position=0:00:00.000000000
buffer: pts=0:00:00.000000000, dur=0:00:01.000000000, flags=discont, meta=GstVideoMeta
event flush-start: (no structure)
event flush-stop: GstEventFlushStop, reset-time=(boolean)true;
event segment: format=TIME, start=0:00:00.000000000, offset=0:00:00.000000000, stop=0:00:05.000000000, flags=0x01, time=0:00:00.000000000, base=0:00:00.000000000, position=0:00:00.000000000
buffer: pts=0:00:00.000000000, dur=0:00:01.000000000, flags=discont, meta=GstVideoMeta
buffer: pts=0:00:01.000000000, dur=0:00:01.000000000, meta=GstVideoMeta
buffer: pts=0:00:02.000000000, dur=0:00:01.000000000, meta=GstVideoMeta
buffer: pts=0:00:03.000000000, dur=0:00:01.000000000, meta=GstVideoMeta
buffer: pts=0:00:04.000000000, dur=0:00:01.000000000, meta=GstVideoMeta
event eos: (no structure)
meta,
handles-states=true,
ignore-eos=true,
args = {
"videotestsrc pattern=blue ! video/x-raw,format=I420,framerate=1/1 ! timeoverlay ! $(videosink) name=videosink allocation-meta-flags=0",
},
configs = {
"$(validateflow), pad=videosink:sink, record-buffers=true, ignored-fields={\"buffers=meta\", }",
}
play
set-property, target-element-factory-name=capsfilter, property-name=caps, property-value="video/x-raw,framerate=30/1,format=I420"
seek, start=1.0, stop=2.0, flags=accurate+flush, rate=1.0
# First buffer is display as fast as possible
crank-clock, expected-elapsed-time=0.0, expected-time=0.0
crank-clock, repeat=29
# Waiting 1 second on EOS
crank-clock, expected-time=1.0
stop, on-message=eos
event stream-start: GstEventStreamStart, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)1;
event caps: video/x-raw, format=(string)I420, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive;
event caps: video/x-raw, format=(string)I420, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive;
event segment: format=TIME, start=0:00:00.000000000, offset=0:00:00.000000000, stop=none, time=0:00:00.000000000, base=0:00:00.000000000, position=0:00:00.000000000
buffer: pts=0:00:00.000000000, dur=0:00:00.033333333, flags=discont, meta=GstVideoMeta
event flush-start: (no structure)
event flush-stop: GstEventFlushStop, reset-time=(boolean)true;
event segment: format=TIME, start=0:00:01.000000000, offset=0:00:00.000000000, stop=0:00:02.000000000, flags=0x01, time=0:00:01.000000000, base=0:00:00.000000000, position=0:00:01.000000000
buffer: pts=0:00:01.000000000, dur=0:00:00.033333333, flags=discont, meta=GstVideoMeta
buffer: pts=0:00:01.033333333, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.066666666, dur=0:00:00.033333334, meta=GstVideoMeta
buffer: pts=0:00:01.100000000, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.133333333, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.166666666, dur=0:00:00.033333334, meta=GstVideoMeta
buffer: pts=0:00:01.200000000, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.233333333, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.266666666, dur=0:00:00.033333334, meta=GstVideoMeta
buffer: pts=0:00:01.300000000, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.333333333, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.366666666, dur=0:00:00.033333334, meta=GstVideoMeta
buffer: pts=0:00:01.400000000, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.433333333, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.466666666, dur=0:00:00.033333334, meta=GstVideoMeta
buffer: pts=0:00:01.500000000, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.533333333, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.566666666, dur=0:00:00.033333334, meta=GstVideoMeta
buffer: pts=0:00:01.600000000, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.633333333, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.666666666, dur=0:00:00.033333334, meta=GstVideoMeta
buffer: pts=0:00:01.700000000, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.733333333, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.766666666, dur=0:00:00.033333334, meta=GstVideoMeta
buffer: pts=0:00:01.800000000, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.833333333, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.866666666, dur=0:00:00.033333334, meta=GstVideoMeta
buffer: pts=0:00:01.900000000, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.933333333, dur=0:00:00.033333333, meta=GstVideoMeta
buffer: pts=0:00:01.966666666, dur=0:00:00.033333334, meta=GstVideoMeta
event eos: (no structure)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment