Import gst-integration-testsuites
[platform/upstream/gstreamer.git] / subprojects / gst-integration-testsuites / ges / scenarios / check_seek_on_very_deeply_nested_timeline.validatetest
1 set-globals, media_dir="$(test_dir)/../../medias/defaults"
2 meta, seek=true, handles-states=true,
3     tool = "ges-launch-$(gst_api_version)",
4     args = {
5         --track-types, video,
6         --video-caps, "video/x-raw, format=(string)I420, width=(int)1080, height=(int)720, framerate=(fraction)1/1",
7         --videosink, "$(videosink) name=videosink",
8     }
9
10 include, location="../../medias/defaults/matroska/timed_frames_video_only_1fps.mkv.frames_checksums.scenario"
11
12 set-vars,
13     nested_timeline_uri="file://$(logsdir)/ges/scenarios/$(test_name)/nested_timeline.xges",
14     nested_timeline_depth2_uri="file://$(logsdir)/ges/scenarios/$(test_name)/nested_timeline_depth2.xges",
15     nested_timeline_depth3_uri="file://$(logsdir)/ges/scenarios/$(test_name)/nested_timeline_depth3.xges",
16     nested_timeline_depth4_uri="file://$(logsdir)/ges/scenarios/$(test_name)/nested_timeline_depth4.xges",
17     nested_timeline_depth5_uri="file://$(logsdir)/ges/scenarios/$(test_name)/nested_timeline_depth5.xges",
18     nested_timeline_depth6_uri="file://$(logsdir)/ges/scenarios/$(test_name)/nested_timeline_depth6.xges",
19     nested_timeline_depth7_uri="file://$(logsdir)/ges/scenarios/$(test_name)/nested_timeline_depth7.xges"
20
21
22 serialize-project, uri="$(nested_timeline_uri)"
23 serialize-project, uri="$(nested_timeline_depth2_uri)"
24 serialize-project, uri="$(nested_timeline_depth3_uri)"
25 serialize-project, uri="$(nested_timeline_depth4_uri)"
26 serialize-project, uri="$(nested_timeline_depth5_uri)"
27 serialize-project, uri="$(nested_timeline_depth6_uri)"
28 serialize-project, uri="$(nested_timeline_depth7_uri)"
29
30 add-clip, name=clip, asset-id="file://$(media_dir)/matroska/timed_frames_video_only_1fps.mkv", layer-priority=0, type=GESUriClip, duration=8.0, project-uri="$(nested_timeline_uri)", inpoint=2.0
31 add-clip, name=nested-clip1, asset-id="$(nested_timeline_uri)", layer-priority=0, type=GESUriClip, project-uri="$(nested_timeline_depth2_uri)"
32 add-clip, name=nested-clip2, asset-id="$(nested_timeline_depth2_uri)", layer-priority=0, type=GESUriClip, project-uri="$(nested_timeline_depth3_uri)"
33 add-clip, name=nested-clip3, asset-id="$(nested_timeline_depth3_uri)", layer-priority=0, type=GESUriClip, project-uri="$(nested_timeline_depth4_uri)", inpoint=2.0
34 add-clip, name=nested-clip4, asset-id="$(nested_timeline_depth4_uri)", layer-priority=0, type=GESUriClip, project-uri="$(nested_timeline_depth5_uri)"
35 add-clip, name=nested-clip5, asset-id="$(nested_timeline_depth5_uri)", layer-priority=0, type=GESUriClip, project-uri="$(nested_timeline_depth6_uri)"
36 add-clip, name=nested-clip6, asset-id="$(nested_timeline_depth6_uri)", layer-priority=0, type=GESUriClip, project-uri="$(nested_timeline_depth7_uri)"
37 add-clip, name=nested-clip7, asset-id="$(nested_timeline_depth6_uri)", layer-priority=0, type=GESUriClip, project-uri="$(nested_timeline_depth7_uri)", start=6.0, inpoint=4.0, duration=1.0
38
39 # Final inpoint is clip.inpoint + nested-clip3.inpoint = 4.0
40 load-project, uri="$(nested_timeline_depth7_uri)"
41
42 commit;
43 pause;
44
45 # seek to 1.0 sec and check that is 1.0 + 4.0(inpoint) = 5.0
46 seek, flags=accurate+flush, start=1.0
47 check-last-sample, sinkpad-caps="video/x-raw", checksum="$(timed_frames_video_only_1fps_mkv_0_00_05_000000000)"
48
49 # seek to 2.0 sec and check that is 2.0 + 4.0(inpoint) = 6.0
50 seek, flags=accurate+flush, start=2.0
51 check-last-sample, sinkpad-caps="video/x-raw", checksum="$(timed_frames_video_only_1fps_mkv_0_00_06_000000000)"
52
53 # seek to 6.0 sec, meaning first frame of second clip, which is clip.inpoint(2) + nested-clip3.inpoint(2) + nested-clip7.inpoint(4) = 8.0
54 seek, flags=accurate+flush, start=6.0
55 check-last-sample, sinkpad-caps="video/x-raw", checksum="$(timed_frames_video_only_1fps_mkv_0_00_08_000000000)"
56
57 stop;