Import gst-integration-testsuites
[platform/upstream/gstreamer.git] / subprojects / gst-integration-testsuites / ges / scenarios / check_seek_on_nested_timelines.validatetest
1 set-globals, media_dir="$(test_dir)/../../medias/defaults"
2
3 meta,
4     seek=true,
5     handles-states=true,
6     tool = "ges-launch-$(gst_api_version)",
7     args = {
8         --track-types, video,
9         --video-caps, "video/x-raw, format=(string)I420, width=(int)1080, height=(int)720, framerate=(fraction)1/1",
10         --videosink, "$(videosink) name=videosink",
11     }
12
13 include, location="../../medias/defaults/matroska/timed_frames_video_only_1fps.mkv.frames_checksums.scenario"
14
15 set-vars,
16     nested_timeline_uri="file://$(LOGSDIR)/ges/scenarios/$(test_name)/nested_timeline.xges",
17     nested_timeline_depth2_uri="file://$(LOGSDIR)/ges/scenarios/$(test_name)/nested_timeline_depth2.xges"
18
19 serialize-project, uri="$(nested_timeline_uri)"
20 serialize-project, uri="$(nested_timeline_depth2_uri)"
21
22 add-clip, name=clip, project-uri="$(nested_timeline_uri)",
23     asset-id="file://$(media_dir)/matroska/timed_frames_video_only_1fps.mkv", layer-priority=0, type=GESUriClip
24 add-clip, name=nested-clip1, asset-id="$(nested_timeline_uri)", layer-priority=0, type=GESUriClip, project-uri="$(nested_timeline_depth2_uri)"
25
26 add-clip, name=nested-timeline1, asset-id="$(nested_timeline_depth2_uri)", layer-priority=0, type=GESUriClip, inpoint=0, duration=2.0
27 add-clip, name=nested-timeline2, asset-id="$(nested_timeline_depth2_uri)", layer-priority=0, type=GESUriClip, inpoint=0, duration=2.0, start=2.0
28
29 commit;
30 pause;
31
32 # seek to 2.2 sec and check frame
33 seek, flags=accurate+flush, start=2.2
34 check-last-sample, sinkpad-caps="video/x-raw", checksum="$(timed_frames_video_only_1fps_mkv_0_00_00_000000000)"
35
36 # brings the element to layer 1
37 edit-container, container-name=nested-timeline2, position=0, new-layer-priority=1;
38
39 #adds effect
40 container-add-child, container-name=nested-timeline2, asset-id=videoflip, child-type=GESEffect
41 set-child-property, element-name=effect0, property=method, value=2;
42
43 # trim nested-timeline2 to 1 sec
44 edit-container, container-name=nested-timeline2, edit-mode=edit_trim, position=1, new-layer-priority=(int)-1, edge=(string)edge_end;
45
46 # seek to 1.2 sec and check frame
47 seek, flags=accurate+flush, start=1.2
48 check-last-sample, sinkpad-caps="video/x-raw", checksum="$(timed_frames_video_only_1fps_mkv_0_00_01_000000000)"
49
50 # remove nested-timeline2 and remove layer 0
51 remove-clip, name=nested-timeline2;
52 stop;