Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2023-04-12 19:30:54 +0300
committerSebastian Dröge <sebastian@centricular.com>2023-07-19 09:37:38 +0300
commit081a90fefc385026ce20bf945aca63389a7dac2b (patch)
tree1a421a960cce814586cbb87f2987dce0798760fd /utils/fallbackswitch/tests/fallbackswitch.rs
parent4b0330f6805063a4c19ced86b8c40b59670fdb79 (diff)
fallbackswitch: Fix pad health calculation and notifies
Change the pad health calculation to consider a pad 'healthy' if it has received data within the last 'timeout' window. Previously, inactive pads were constantly flip-flopping between healthy and not healthy depending on whether they were slightly ahead of or behind the active pad running_time. When the health status of a pad changes, make sure to always notify the property, so that applications that are manually controlling the active pad can make their switching decisions. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1285>
Diffstat (limited to 'utils/fallbackswitch/tests/fallbackswitch.rs')
-rw-r--r--utils/fallbackswitch/tests/fallbackswitch.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/fallbackswitch/tests/fallbackswitch.rs b/utils/fallbackswitch/tests/fallbackswitch.rs
index 8257c73d6..564f7af6e 100644
--- a/utils/fallbackswitch/tests/fallbackswitch.rs
+++ b/utils/fallbackswitch/tests/fallbackswitch.rs
@@ -279,12 +279,13 @@ fn test_long_drop_and_recover(live: bool) {
let buffer = pull_buffer(&pipeline);
assert_fallback_buffer!(buffer, Some(4.seconds()));
- // Produce a sixth frame from the normal source
+ // Produce a sixth frame from the normal source, which
+ // will make it healthy again
push_buffer(&pipeline, 5.seconds());
set_time(&pipeline, 5.seconds() + 10.mseconds());
let buffer = pull_buffer(&pipeline);
assert_buffer!(buffer, Some(5.seconds()));
- assert!(!mainsink.property::<bool>("is-healthy"));
+ assert!(mainsink.property::<bool>("is-healthy"));
drop(mainsink);
drop(switch);