mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
bad6b7e60a
This allows user to be in control of when scaling happens in the pipeline. It can be plugged as an effect and scaling will be forced to happen in the effect instead of in the compositor. Without this, it would not be possible for users to, for example, crop a video source before scaling to the target source size. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5735>
37 lines
2 KiB
Text
37 lines
2 KiB
Text
set-globals, media_file="$(test_dir)/../../medias/defaults/matroska/timed_frames_video_only_1fps.mkv"
|
|
meta,
|
|
tool = "ges-launch-$(gst_api_version)",
|
|
handles-states=true,
|
|
seek=true,
|
|
needs_preroll=true,
|
|
args = {
|
|
--track-types, video,
|
|
--video-caps, "video/x-raw, format=(string)I420, width=(int)1080, height=(int)720, framerate=(fraction)1/1",
|
|
--videosink, "$(videosink) name=videosink",
|
|
}
|
|
|
|
# Add a clip and check that the first frame is displayed
|
|
add-clip, name=clip, asset-id="file://$(media_file)", layer-priority=0, type=GESUriClip, name=(string)theclip
|
|
set-child-properties, width=100, height=100, posx=10, posy=10, element-name=theclip
|
|
container-add-child, container-name=theclip, asset-id="videocrop name=videocrop", child-type=(string)GESEffect, child-name=crop;
|
|
set-child-properties, bottom=200, element-name=crop
|
|
container-add-child, container-name=theclip, asset-id="gesvideoscale name=videoscale", child-type=(string)GESEffect;
|
|
|
|
pause
|
|
|
|
# Checking that the 'framepositioner' is forcing caps to the clip "natual size"
|
|
check-properties, gesvideourisource0-capsfilter::caps=(GstCaps)"video/x-raw(ANY),framerate=(fraction)1/1,width=(int)1080,height=(int)720"
|
|
check-properties, videoscale::parent::parent::priority=3
|
|
check-properties, videocrop::parent::parent::priority=4
|
|
check-current-pad-caps, target-element-name=videocrop, pad=sink, expected-caps=[video/x-raw,width=1080,height=720]
|
|
check-current-pad-caps, target-element-name=videocrop, pad=src, expected-caps=[video/x-raw,width=1080,height=520]
|
|
check-current-pad-caps, target-element-name=videoscale, pad=sink, expected-caps=[video/x-raw,width=1080,height=520]
|
|
check-current-pad-caps, target-element-name=videoscale, pad=src, expected-caps=[video/x-raw,width=100,height=100]
|
|
|
|
check-properties,
|
|
gessmartmixer0-compositor.sink_0::xpos=10,
|
|
gessmartmixer0-compositor.sink_0::ypos=10,
|
|
gessmartmixer0-compositor.sink_0::width=-1,
|
|
gessmartmixer0-compositor.sink_0::height=-1
|
|
|
|
stop
|