tests: dash: Add a test to check that retries work
This tries that both `souphttpsrc` and `adaptivedemux2` behave as expected when HTTP failures happen but "solve themselves". Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8128>
This commit is contained in:
parent
8c16be5901
commit
bbf5b71622
@ -919,6 +919,7 @@ validate.test.aspectcropratio.set_aspect_ratio_in_paused
|
||||
validate.test.baseparse.single_seek
|
||||
validate.test.clock_sync.video_1fps
|
||||
validate.test.clock_sync.video_30fps
|
||||
validate.test.dash.retry_on_failure
|
||||
validate.test.dash.seek_with_stop_between_fragments
|
||||
validate.test.decryptor.cenc_audio_esds_property_overrides
|
||||
validate.test.encodebin.encode_no_muxer
|
||||
|
@ -0,0 +1,52 @@
|
||||
meta,
|
||||
handles-states=true,
|
||||
ignore-eos=true,
|
||||
allow-errors=true,
|
||||
args = {
|
||||
"playbin3 name=pb video-sink=fakesink audio-sink=fakesink",
|
||||
},
|
||||
expected-issues = {
|
||||
# First attempt to play while the mpd is not available
|
||||
"expected-issue, issue-id=\"runtime::error-on-bus\", details=\".*Service Unavailable.*\"",
|
||||
"expected-issue, issue-id=\"runtime::error-on-bus\", details=\".*Got error: Internal data stream error.*\"",
|
||||
"expected-issue, issue-id=\"scenario::execution-error\", details=\".*Error message happened while executing action.*\"",
|
||||
# Spurious error that happens racily when tearing down the pipeline
|
||||
"expected-issue, issue-id=\"runtime::error-on-bus\", details=\".*Stream doesn't contain enough.*\", sometimes=true",
|
||||
|
||||
# Second attempt to play while the first chunk is not available
|
||||
"expected-issue, issue-id=\"runtime::error-on-bus\", details=\".*Fragment downloading has failed consecutive times.*\"",
|
||||
"expected-issue, issue-id=\"scenario::execution-error\", details=\".*Error message happened while executing action.*\"",
|
||||
}
|
||||
|
||||
start-http-server, working-directory="$(test_dir)/../../../medias/defaults/dash/webm/"
|
||||
set-vars, http_control="$(test_dir)/http_control.py"
|
||||
set-properties, pb::uri="http://127.0.0.1:$(http_server_port)/output.mpd"
|
||||
|
||||
# Force the HTTP server to return 503 (Service Unavailable) for the first 3 attempts
|
||||
# to download the DASH manifest (output.mpd). souphttpsrc will retry 3 times by
|
||||
# default, and then fail. After these 3 failures, we get the
|
||||
# "First attempt to play while the mpd is not available" expected issues
|
||||
http-request, uri="http://127.0.0.1:$(http_server_port)/admin/status-rules", method=PUT, headers="application/json",
|
||||
body="{\"path\": \"/output.mpd\", \"repeat\": 3, \"status_code\": 503}"
|
||||
play, description="Playing will fail as souphttpsrc::retries=3 by default"
|
||||
|
||||
# 1. Force HTTP 503 errors for the first media segment (chunk-stream0-00001.webm)
|
||||
# 2. The manifest download will succeed (previous errors cleared)
|
||||
# 3. dashdemux will start downloading media segments
|
||||
# 4. The first segment download will fail 3 times (adaptivedemux retry limit)
|
||||
# 5. Pipeline should fail with "Fragment downloading has failed consecutive times"
|
||||
http-request, uri="http://127.0.0.1:$(http_server_port)/admin/status-rules", method=PUT, headers="application/json",
|
||||
body="{\"path\": \"/chunk-stream0-00001.webm\", \"repeat\": 3, \"status_code\": 503}"
|
||||
|
||||
play, description="Playing will fail as adaptivedemux retries max 3 times"
|
||||
|
||||
# Make sure that if download errors happen only twice, either for the manifest or chunks, the pipeline plays
|
||||
http-request, uri="http://127.0.0.1:$(http_server_port)/admin/status-rules", method=PUT, headers="application/json",
|
||||
body="{\"path\": \"/output.mpd\", \"repeat\": 2, \"status_code\": 503}"
|
||||
play, description="Playing now that all errors have been cleared and content is available"
|
||||
set-state, state=null, playback-time=1.0
|
||||
|
||||
http-request, uri="http://127.0.0.1:$(http_server_port)/admin/status-rules", method=PUT, headers="application/json",
|
||||
body="{\"path\": \"/chunk-stream0-00001.webm\", \"repeat\": 2, \"status_code\": 503}"
|
||||
play, description="Playing now that all errors have been cleared and content is available"
|
||||
stop, playback-time=1.0
|
Loading…
x
Reference in New Issue
Block a user