Commit 974d1436 authored by Thibault Saunier's avatar Thibault Saunier 🌵
Browse files

validate: Port pipelines.py to the new validatetest files infrastructure

Part-of: <gstreamer/gst-integration-testsuites!69>
parent 28225329
PIPELINES_DESC = {
"aspectcropratio":
{
"pipeline": "videotestsrc ! aspectratiocrop name=cropper ! %(videosink)s",
"scenarios": [
{
"name": "set_aspect_ratio_in_paused",
"actions": [
"description, seek=true, handles-states=true",
"pause",
"set-property, playback-time=0.0, target-element-name=cropper, property-name=aspect-ratio, property-value=\"16/9\"",
"play",
"stop, playback-time=1.0"
]
}
]
},
"flvdemux.audio_only":
{
"pipeline": "uridecodebin uri='file://%(medias)s/defaults/flv/819290236.flv' caps=audio/x-raw expose-all-streams=FALSE ! queue ! audioconvert ! audioresample ! %(audiosink)s",
"scenarios": ["play_15s"]
},
"rtpsession_send_simple":
{
"pipeline": "rtpsession name=rtpsess videotestsrc num-buffers=10 ! video/x-raw,format=RGB,width=\"320\",height=\"240\" ! rtpvrawpay ! rtpsess.send_rtp_sink rtpsess.send_rtp_src ! rtpvrawdepay ! fakesink",
"config": [
"%(validateflow)s, pad=fakesink0:sink, record-buffers=true, caps-properties={ media, clock-rate, encoding-name, sampling, depth, width, height, colorimetry, payload, a-framerate };"
]
},
"rtpsession_recv_simple":
{
"pipeline": "rtpsession name=rtpsess videotestsrc num-buffers=10 ! video/x-raw,format=RGB,width=\"320\",height=\"240\" ! rtpvrawpay ! rtpsess.recv_rtp_sink rtpsess.recv_rtp_src ! rtpvrawdepay ! fakesink",
"config": [
"%(validateflow)s, pad=fakesink0:sink, record-buffers=true, caps-properties={ media, clock-rate, encoding-name, sampling, depth, width, height, colorimetry, payload, a-framerate };"
]
},
"flow_simple_test":
{
"pipeline": "videotestsrc num-buffers=3 ! fakesink",
"config": [
"%(validateflow)s, pad=fakesink0:sink, record-buffers=true, caps-properties={ width, height };"
]
},
"appsrc_simple_test":
{
"pipeline": "appsrc ! qtdemux name=demux ! video/x-h264 ! fakesink async=false demux. ! audio/x-raw ! fakesink async=false",
"config": [
"%(validateflow)s, pad=fakesink0:sink, record-buffers=true"
],
"scenarios": [
{
"name": "single_push",
"actions": [
"description, seek=false, handles-states=false",
"appsrc-push, target-element-name=appsrc0, file-name=\"%(medias)s/defaults/mp4/raw_h264.0.mp4\""
]
}
]
},
"appsrc_custom_caps":
{
"pipeline": "appsrc ! fakesink async=false",
"config": [
"%(validateflow)s, pad=fakesink0:sink, record-buffers=true"
],
"scenarios": [
{
"name": "single_push",
"actions": [
"description, seek=false, handles-states=false",
"appsrc-push, target-element-name=appsrc0, file-name=\"%(medias)s/defaults/mp4/raw_h264.0.mp4\", caps=(GstCaps)\"video/foo\\,\\ variant\\=\\\"test-custom\\\"\"",
"appsrc-eos, target-element-name=appsrc0"
]
}
]
},
"qtdemux_change_edit_list":
{
"pipeline": "appsrc ! qtdemux ! fakesink async=false",
"config": [
"%(validateflow)s, pad=fakesink0:sink, record-buffers=false"
],
"scenarios": [
{
"name": "default",
"actions": [
"description, seek=false, handles-states=false",
"appsrc-push, target-element-name=appsrc0, file-name=\"%(medias)s/fragments/car-20120827-85.mp4/init.mp4\"",
"appsrc-push, target-element-name=appsrc0, file-name=\"%(medias)s/fragments/car-20120827-85.mp4/media1.mp4\"",
"checkpoint, text=\"A moov with a different edit list is now pushed\"",
"appsrc-push, target-element-name=appsrc0, file-name=\"%(medias)s/fragments/car-20120827-86.mp4/init.mp4\"",
"appsrc-push, target-element-name=appsrc0, file-name=\"%(medias)s/fragments/car-20120827-86.mp4/media2.mp4\"",
"stop"
]
}
]
},
"matroskademux_flush_within_cluster":
{
"pipeline": "appsrc ! matroskademux ! fakesink async=false",
"config": [
"%(validateflow)s, pad=fakesink0:sink, record-buffers=true"
],
"scenarios": [
{
"name": "default",
"actions": [
"description, seek=false, handles-states=false",
"appsrc-push, target-element-name=appsrc0, file-name=\"%(medias)s/fragments/feelings_vp9-20130806-242.webm/init.webm\"",
"appsrc-push, target-element-name=appsrc0, file-name=\"%(medias)s/fragments/feelings_vp9-20130806-242.webm/media1.webm\", size=5000",
"flush, target-element-name=appsrc0",
"checkpoint, text=\"A different cluster is pushed\"",
"appsrc-push, target-element-name=appsrc0, file-name=\"%(medias)s/fragments/feelings_vp9-20130806-242.webm/media2.webm\", size=10000",
"stop"
]
}
]
},
"cenc_audio_esds_property_overrides":
{
"pipeline": "filesrc location=%(medias)s/encrypted/cenc-encrypted-youtube-aac.mp4 ! qtdemux ! mockdecryptor ! fakesink async=false",
"config": [
"%(validateflow)s, pad=fakesink0:sink, record-buffers=true"
]
},
"scaletempo_playbin_audio_filter":
{
"pipeline": "playbin audio-filter=scaletempo video-sink=\"%(videosink)s\" audio-sink=\"%(audiosink)s\" uri=file://%(medias)s/defaults/mp4/mp3_h264.0.mp4",
"scenarios": ["fast_forward"]
},
"qtdemux_reverse_playback_full_gop":
{
"pipeline": "filesrc location=%(medias)s/defaults/mp4/mp3_h264.0.mp4 ! qtdemux ! h264parse name=parse ! fakesink",
"config": [
"%(validateflow)s, pad=parse:src, record-buffers=true"
],
"scenarios": [
{
"name": "reverse_playback_full_gop",
"actions": [
"description, reverse-playback=true, seek=true, handles-states=true",
"include,location=includes/default-seek-flags.scenario",
"pause",
"seek, name=Reverse-seek, playback-time=0.0, rate=-1.0, start=5.0, stop=10.0, flags=\"$(default_flags)\"",
"play"
]
}
]
},
"h264parse_trickmode_predicted":
{
"pipeline": "filesrc location=%(medias)s/defaults/mp4/mp3_h264.0.mp4 ! qtdemux ! h264parse name=parse ! fakesink",
"config": [
"%(validateflow)s, pad=parse:src, record-buffers=true"
],
"scenarios": [
{
"name": "seek_trickmode_predicted",
"actions": [
"description, seek=true, handles-states=true",
"pause",
"seek, name=trickmode-predicted-seek, rate=1.0, start=0.0, stop=\"$(duration)\", flags=\"flush+accurate+trickmode-forward-predicted\"",
"play"
]
}
]
},
"h265parse_trickmode_predicted":
{
"pipeline": "filesrc location=%(medias)s/defaults/mp4/mp3_h265.0.mp4 ! qtdemux ! h265parse name=parse disable-passthrough=true ! fakesink",
"config": [
"%(validateflow)s, pad=parse:src, record-buffers=true"
],
"scenarios": [
{
"name": "seek_trickmode_predicted",
"actions": [
"description, seek=true, handles-states=true",
"pause",
"seek, name=trickmode-predicted-seek, rate=1.0, start=0.0, stop=\"$(duration)\", flags=\"flush+accurate+trickmode-forward-predicted\"",
"play"
]
}
]
},
"mp4_redirect":
{
"pipeline": "playbin uri=pushfile://%(medias)s/defaults/mp4/redirect.mp4 name=playbin video-sink=\"%(videosink)s name=videosink\" audio-sink=\"%(audiosink)s\"",
"scenarios": [ "play_15s" ],
"config": [
"%(validateflow)s, pad=qtdemux0:sink",
"%(validateflow)s, pad=qtdemux1:sink"
]
},
"x264enc_youtube_bitrate":
{
"pipeline": "videotestsrc ! video/x-raw,width=1920,height=1080 ! x264enc name=enc @preset=\"Profile YouTube\" ! fakesink",
"scenarios": [
{
"name": "fullhd_lowframerate",
"actions": [
"pause",
"check-property, target-element-name=enc, property-name=bitrate, property-value=8000",
"stop"
]
}
]
},
"baseparse":
{
"pipeline": "file://%(medias)s/defaults/matroska/numerated_frames_blue.mkv ! matroskademux ! h264parse name=parser ! fakesink",
"scenarios": [
{
"name": "single_seek",
"actions": [
"description, seek=true, handles-states=true",
"pause",
"seek, rate=1.0, start=0.03333333333, flags=\"flush+accurate\"",
"stop",
],
},
],
"config": [
"%(validateflow)s, pad=parser:src, record-buffers=true, logged-event-types={ segment }",
]
},
"standalone_nleurisource":
{
"pipeline": "nleurisource uri=file://%(medias)s/defaults/matroska/numerated_frames_blue.mkv inpoint=1000000000 duration=1000000000 ! videoconvert name=videoconvert ! %(videosink)s",
"scenarios": [
{
"name": "play",
"actions": [
"description, seek=false, handles-states=false",
]
},
],
"config": [
"%(validateflow)s, pad=videoconvert:sink, record-buffers=true, buffers-checksum=true, ignored-event-types={ tag }"
]
},
"interlace_deinterlace":
{
"pipeline": "videotestsrc num-buffers=10 ! interlace ! video/x-raw,interlace-mode=mixed ! deinterlace ! video/x-raw,interlace-mode=progressive ! fakevideosink name=fakevideosink",
"config": [
"%(validateflow)s, pad=fakevideosink:sink, record-buffers=true, buffers-checksum=true"
]
},
"interlace_deinterlace_alternate":
{
"pipeline": "videotestsrc num-buffers=10 ! interlace ! video/x-raw\(format:Interlaced\) ! deinterlace ! video/x-raw ! fakevideosink name=fakevideosink",
"config": [
"%(validateflow)s, pad=fakevideosink:sink, record-buffers=true, buffers-checksum=true"
]
},
"h265parse_alternate":
{
"pipeline": "filesrc location=%(medias)s/defaults/h265/alternate.h265 ! h265parse ! fakesink name=fakesink",
"config": [
"%(validateflow)s, pad=fakesink:sink, record-buffers=true"
]
},
}
......@@ -27,8 +27,8 @@ import re
from testsuiteutils import update_assets
from launcher.baseclasses import MediaFormatCombination
from launcher.apps.gstvalidate import GstValidateSimpleTestsGenerator
from validate_known_issues import KNOWN_ISSUES
from pipelines import PIPELINES_DESC
TEST_MANAGER = "validate"
......@@ -104,15 +104,15 @@ def setup_tests(test_manager, options):
extra_data = {
"config_path": os.path.dirname(testsuite_dir),
"medias": media_dir,
"validate-flow-expectations-dir": os.path.join(testsuite_dir, os.path.pardir, "flow-expectations"),
"validate-flow-expectations-dir": os.path.join(testsuite_dir, "validate", "flow-expectations"),
"validate-flow-actual-results-dir": test_manager.options.logsdir,
"ssim-results-dir": os.path.join(test_manager.options.logsdir, "ssim-results"),
}
add_accurate_seek_tests(test_manager, media_dir, extra_data)
test_manager.add_generators(
test_manager.GstValidatePipelineTestsGenerator.from_dict(test_manager, "pipelines",
PIPELINES_DESC, extra_data)
GstValidateSimpleTestsGenerator("simple", test_manager,
os.path.join(testsuite_dir, "validate"))
)
test_manager.add_expected_issues(KNOWN_ISSUES)
......
......@@ -544,27 +544,6 @@ validate.imagesequence.transcode.to_vorbis_and_h264_in_mkv.00000_jpeg
validate.imagesequence.transcode.to_vorbis_and_theora_in_ogg.00000_jpeg
validate.imagesequence.transcode.to_vorbis_and_vp8_in_webm.00000_jpeg
validate.imagesequence.transcode.to_vorbis_and_vp9_in_webm.00000_jpeg
validate.launch_pipeline.appsrc_custom_caps.single_push
validate.launch_pipeline.appsrc_simple_test.single_push
validate.launch_pipeline.aspectcropratio.set_aspect_ratio_in_paused
validate.launch_pipeline.baseparse.single_seek
validate.launch_pipeline.flvdemux.audio_only.play_15s
validate.launch_pipeline.h264parse_trickmode_predicted.seek_trickmode_predicted
validate.launch_pipeline.h265parse_trickmode_predicted.seek_trickmode_predicted
validate.launch_pipeline.matroskademux_flush_within_cluster.default
validate.launch_pipeline.mp4_redirect.play_15s
validate.launch_pipeline.pipelines.cenc_audio_esds_property_overrides
validate.launch_pipeline.pipelines.flow_simple_test
validate.launch_pipeline.pipelines.h265parse_alternate
validate.launch_pipeline.pipelines.interlace_deinterlace
validate.launch_pipeline.pipelines.interlace_deinterlace_alternate
validate.launch_pipeline.pipelines.rtpsession_recv_simple
validate.launch_pipeline.pipelines.rtpsession_send_simple
validate.launch_pipeline.qtdemux_change_edit_list.default
validate.launch_pipeline.qtdemux_reverse_playback_full_gop.reverse_playback_full_gop
validate.launch_pipeline.scaletempo_playbin_audio_filter.fast_forward
validate.launch_pipeline.standalone_nleurisource.play
validate.launch_pipeline.x264enc_youtube_bitrate.fullhd_lowframerate
validate.pushfile.media_check.qtdemux-test-frag-basic_zero_dur_no_mehd_mp4
~validate.rtsp.playback.change_state_intensive.GH1_00094_1920x1280_MTS
~validate.rtsp.playback.change_state_intensive.bowlerhatdancer_sleepytom_SGP_mjpeg_avi
......@@ -872,3 +851,24 @@ validate.pushfile.media_check.qtdemux-test-frag-basic_zero_dur_no_mehd_mp4
~validate.rtsp2.playback.switch_audio_track.tron_en_ge_aac_h264_ts
~validate.rtsp2.playback.switch_subtitle_track.test5_mkv
~validate.rtsp2.playback.switch_subtitles.test5_mkv
validate.test.appsrc.custom_caps_single_push
validate.test.appsrc.single_push
validate.test.aspectcropratio.set_aspect_ratio_in_paused
validate.test.baseparse.single_seek
validate.test.decryptor.cenc_audio_esds_property_overrides
validate.test.flow.simple_test
validate.test.flvdemux.audio_only.play_15s
validate.test.h264.parse.trickmode_predicted.seek_trickmode_predicted
validate.test.h264.x264enc_youtube_bitrate.fullhd_lowframerate
validate.test.h265parse.alternate
validate.test.h265parse.trickmode_predicted.seek_trickmode_predicted
validate.test.interlace.interlace_deinterlace
validate.test.interlace.interlace_deinterlace_alternate
validate.test.matroska.demux_flush_within_cluster.default
validate.test.mp4.qtdemux_change_edit_list.default
validate.test.mp4.qtdemux_reverse_playback_full_gop.reverse_playback_full_gop
validate.test.mp4.redirect.play_15s
validate.test.nle.urisource.play
validate.test.rtp.rtpsession_recv_simple
validate.test.rtp.rtpsession_send_simple
validate.test.scaletempo.playbin_audio_filter.fast_forward
set-globals, media_dir="$(test_dir)/../../../medias/"
meta,
seek=false,
handles-states=false,
args = {
"appsrc ! fakesink async=false",
},
configs = {
"$(validateflow), pad=fakesink0:sink, record-buffers=true",
}
appsrc-push, target-element-name=appsrc0, file-name="$(media_dir)/defaults/mp4/raw_h264.0.mp4", caps=(GstCaps)"video/foo\,\ variant\=\"test-custom\""
appsrc-eos, target-element-name=appsrc0
set-globals, media_dir="$(test_dir)/../../../medias/"
meta,
seek=false,
handles-states=false,
args = {
"appsrc ! qtdemux name=demux ! video/x-h264 ! fakesink async=false demux. ! audio/x-raw ! fakesink async=false",
},
configs = {
"$(validateflow), pad=fakesink0:sink, record-buffers=true",
}
appsrc-push, target-element-name=appsrc0, file-name="$(media_dir)/defaults/mp4/raw_h264.0.mp4"
meta,
seek=true,
handles-states=true,
args = {
"videotestsrc ! aspectratiocrop name=cropper ! $(videosink)",
}
pause
set-property, playback-time=0.0, target-element-name=cropper, property-name=aspect-ratio, property-value="16/9"
play
stop, playback-time=1.0
set-globals, media_dir="$(test_dir)/../../../medias/"
meta,
seek=true,
handles-states=true,
args = {
"file://$(media_dir)/defaults/matroska/numerated_frames_blue.mkv ! matroskademux ! h264parse name=parser ! fakesink",
},
configs = {
"$(validateflow), pad=parser:src, record-buffers=true, logged-event-types={ segment }",
}
pause
seek, rate=1.0, start=0.03333333333, flags="flush+accurate"
stop
set-globals, media_dir="$(test_dir)/../../../medias/"
meta,
args = {
"filesrc location=$(media_dir)/encrypted/cenc-encrypted-youtube-aac.mp4 ! qtdemux ! mockdecryptor ! fakesink async=false",
},
configs = {
"$(validateflow), pad=fakesink0:sink, record-buffers=true",
}
meta,
args = {
"videotestsrc num-buffers=3 ! fakesink",
},
configs = {
"$(validateflow), pad=fakesink0:sink, record-buffers=true, caps-properties={ width, height };",
}
set-globals, media_dir="$(test_dir)/../../../medias/"
meta,
args = {
"uridecodebin uri=file://$(media_dir)/defaults/flv/819290236.flv caps=audio/x-raw expose-all-streams=FALSE ! queue ! audioconvert ! audioresample ! $(audiosink)",
},
scenario=play_15s
set-globals, media_dir="$(test_dir)/../../../medias/"
meta,
seek=true,
handles-states=true,
args = {
"filesrc location=$(media_dir)/defaults/mp4/mp3_h264.0.mp4 ! qtdemux ! h264parse name=parse ! fakesink",
},
configs = {
"$(validateflow), pad=parse:src, record-buffers=true",
}
pause
seek, name=trickmode-predicted-seek, rate=1.0, start=0.0, stop="$(duration)", flags="flush+accurate+trickmode-forward-predicted"
play
meta,
args = {
"videotestsrc ! video/x-raw,width=1920,height=1080 ! x264enc name=enc @preset=Profile\\ YouTube ! fakesink",
}
pause
check-property, target-element-name=enc, property-name=bitrate, property-value=8000
stop
set-globals, media_dir="$(test_dir)/../../../medias/"
meta,
args = {
"filesrc location=$(media_dir)/defaults/h265/alternate.h265 ! h265parse ! fakesink name=fakesink",
},
configs = {
"$(validateflow), pad=fakesink:sink, record-buffers=true",
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment