examples: webrtc: Add handling of the LATENCY messages to the Rust examples
authorSebastian Dröge <sebastian@centricular.com>
Tue, 20 Dec 2022 11:10:27 +0000 (13:10 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 20 Dec 2022 11:10:27 +0000 (13:10 +0200)
Without this the configured latency on the pipeline will be wrong.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3609>

subprojects/gst-examples/webrtc/janus/rust/src/main.rs
subprojects/gst-examples/webrtc/multiparty-sendrecv/gst-rust/src/main.rs
subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs

index 62713cb..a65be37 100644 (file)
@@ -101,6 +101,9 @@ impl App {
             MessageView::Warning(warning) => {
                 println!("Warning: \"{}\"", warning.debug().unwrap());
             }
+            MessageView::Latency(_) => {
+                let _ = self.pipeline.recalculate_latency();
+            }
             _ => (),
         }
         Ok(())
index da9fab5..8e84f9a 100644 (file)
@@ -295,6 +295,9 @@ impl App {
             MessageView::Warning(warning) => {
                 println!("Warning: \"{}\"", warning.debug().unwrap());
             }
+            MessageView::Latency(_) => {
+                let _ = self.pipeline.recalculate_latency();
+            }
             _ => (),
         }
 
index 27c519e..585eb17 100644 (file)
@@ -255,6 +255,9 @@ impl App {
             MessageView::Warning(warning) => {
                 println!("Warning: \"{}\"", warning.debug().unwrap());
             }
+            MessageView::Latency(_) => {
+                let _ = self.pipeline.recalculate_latency();
+            }
             _ => (),
         }