Import gst-integration-testsuites
[platform/upstream/gstreamer.git] / subprojects / gst-integration-testsuites / ges / scenarios / add_effect_and_split.validatetest
1 set-globals, media_file="$(test_dir)/../../medias/defaults/matroska/timed_frames_video_only_1fps.mkv"
2 meta,
3     tool = "ges-launch-$(gst_api_version)",
4     handles-states=true,
5     seek=true,
6     needs_preroll=true,
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 set-vars,\
14     frame0=68cc0c0b6d6863a135f40297a54aec9f1593f34c,\
15     frame1=9b42849e45e15981115cff9da00ecbf7afafd462, \
16     frame1_rotated=8a2966951d269e9aa4dccf38fe93fce8093d3847
17
18 pause
19
20 # Add a clip and check that the first frame is displayed
21 add-clip, name=clip, asset-id="file://$(media_file)", layer-priority=0, type=GESUriClip, name=(string)theclip
22 commit
23 check-last-sample, sinkpad-caps="video/x-raw", checksum="$(frame0)"
24
25 # Seek to 1sec and make sure the right frame is displayed
26 seek, start=(double)1.0, flags=(string)accurate+flush;
27 check-last-sample, sinkpad-caps="video/x-raw", checksum="$(frame1)"
28
29 # Apply the videoflip effect and flip the clip 180 degrees
30 container-add-child, container-name=(string)theclip, asset-id=(string)videoflip, child-type=(string)GESEffect;
31 set-child-property, element-name=(string)effect0, property=(string)method, value=2;
32 check-last-sample, sinkpad-caps="video/x-raw", checksum="$(frame1)"
33 commit
34 check-last-sample, sinkpad-caps="video/x-raw", checksum="$(frame1_rotated)"
35
36 # Split the clip and check that rotation is still applied
37 split-clip, clip-name=(string)theclip, position=(double)1.0;
38 commit
39 check-last-sample, sinkpad-caps="video/x-raw", checksum="$(frame1_rotated)"
40
41 # Make sure that the second clip is being used by stopping rotation of the first clip and checking outputed frame
42 set-child-property, element-name=(string)effect0, property=(string)method, value=0;
43 commit
44 check-last-sample, sinkpad-caps="video/x-raw", checksum="$(frame1_rotated)"
45
46 seek, start=(double)0.0, flags=(string)accurate+flush;
47 check-last-sample, sinkpad-caps="video/x-raw", checksum="$(frame0)"
48
49 play;
50 pause,playback_time=1.0
51 check-last-sample, sinkpad-caps="video/x-raw", checksum="$(frame1_rotated)"
52
53 stop;