videorate: Handle closing segment on EOS right after caps event
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-base / tests / validate / videorate / fill_segment_after_caps_changed_before_eos.validatetest
1 meta,
2     args = {
3             "appsrc name=src format=time handle-segment-change=true ! \
4                 videorate max-closing-segment-duplication-duration=999999999999999 name=videorate ! video/x-raw,framerate=1/1 ! fakesink sync=true",
5     },
6     configs = {
7        "$(validateflow), pad=videorate:sink, buffers-checksum=as-id, ignored-event-types={ tag }",
8        "$(validateflow), pad=videorate:src, buffers-checksum=as-id, ignored-event-types={ tag }",
9     },
10     handles-states=true,
11     ignore-eos=true
12
13 # Generate the raw video frame that we will used in the appsrc.
14 run-command, argv={
15     "gst-validate-1.0", "videotestsrc num-buffers=1 ! video/x-raw,format=I420,framerate=1/1,width=320,height=240 ! filesink location=$(TMPDIR)/tmp.i420",
16 }
17
18
19 appsrc-push, target-element-name=src, file-name="$(TMPDIR)/tmp.i420", pts=0, duration=1.0,
20     caps=(GstCaps)[video/x-raw,format=I420,framerate=1/1,width=320,height=240],
21     segment=[segment, stop=3.0, format=(GstFormat)time]
22
23 appsrc-push, target-element-name=src, file-name="$(TMPDIR)/tmp.i420", pts=1., duration=1.0,
24     caps=(GstCaps)[video/x-raw,format=I420,framerate=1/1,width=320,height=240],
25     segment=[segment, stop=3.0, format=(GstFormat)time]
26 play
27
28 crank-clock, repeat=1
29
30 checkpoint, text="Setting caps but the videorate element will roll the caps back to push buffers to close the configured segment on EOS"
31 set-properties, src::caps="video/x-raw,width=322,height=244,framerate=1/1"
32
33 appsrc-eos, target-element-name=src
34 crank-clock, repeat=3
35
36
37 wait, message-type=eos
38
39 # check-position, expected-position=2.0
40 stop
41
42
43