From c739fcbe41dde02fa7f36feb588cb6b782ca1494 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 20 Dec 2022 13:10:27 +0200 Subject: [PATCH] examples: webrtc: Add handling of the LATENCY messages to the Rust examples Without this the configured latency on the pipeline will be wrong. Part-of: --- subprojects/gst-examples/webrtc/janus/rust/src/main.rs | 3 +++ .../gst-examples/webrtc/multiparty-sendrecv/gst-rust/src/main.rs | 3 +++ subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs | 3 +++ 3 files changed, 9 insertions(+) diff --git a/subprojects/gst-examples/webrtc/janus/rust/src/main.rs b/subprojects/gst-examples/webrtc/janus/rust/src/main.rs index 62713cb..a65be37 100644 --- a/subprojects/gst-examples/webrtc/janus/rust/src/main.rs +++ b/subprojects/gst-examples/webrtc/janus/rust/src/main.rs @@ -101,6 +101,9 @@ impl App { MessageView::Warning(warning) => { println!("Warning: \"{}\"", warning.debug().unwrap()); } + MessageView::Latency(_) => { + let _ = self.pipeline.recalculate_latency(); + } _ => (), } Ok(()) diff --git a/subprojects/gst-examples/webrtc/multiparty-sendrecv/gst-rust/src/main.rs b/subprojects/gst-examples/webrtc/multiparty-sendrecv/gst-rust/src/main.rs index da9fab5..8e84f9a 100644 --- a/subprojects/gst-examples/webrtc/multiparty-sendrecv/gst-rust/src/main.rs +++ b/subprojects/gst-examples/webrtc/multiparty-sendrecv/gst-rust/src/main.rs @@ -295,6 +295,9 @@ impl App { MessageView::Warning(warning) => { println!("Warning: \"{}\"", warning.debug().unwrap()); } + MessageView::Latency(_) => { + let _ = self.pipeline.recalculate_latency(); + } _ => (), } diff --git a/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs b/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs index 27c519e..585eb17 100644 --- a/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs +++ b/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs @@ -255,6 +255,9 @@ impl App { MessageView::Warning(warning) => { println!("Warning: \"{}\"", warning.debug().unwrap()); } + MessageView::Latency(_) => { + let _ = self.pipeline.recalculate_latency(); + } _ => (), } -- 2.7.4