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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3609>
This commit is contained in:
Sebastian Dröge 2022-12-20 13:10:27 +02:00
parent 284d22437e
commit c739fcbe41
3 changed files with 9 additions and 0 deletions

View File

@ -101,6 +101,9 @@ impl App {
MessageView::Warning(warning) => { MessageView::Warning(warning) => {
println!("Warning: \"{}\"", warning.debug().unwrap()); println!("Warning: \"{}\"", warning.debug().unwrap());
} }
MessageView::Latency(_) => {
let _ = self.pipeline.recalculate_latency();
}
_ => (), _ => (),
} }
Ok(()) Ok(())

View File

@ -295,6 +295,9 @@ impl App {
MessageView::Warning(warning) => { MessageView::Warning(warning) => {
println!("Warning: \"{}\"", warning.debug().unwrap()); println!("Warning: \"{}\"", warning.debug().unwrap());
} }
MessageView::Latency(_) => {
let _ = self.pipeline.recalculate_latency();
}
_ => (), _ => (),
} }

View File

@ -255,6 +255,9 @@ impl App {
MessageView::Warning(warning) => { MessageView::Warning(warning) => {
println!("Warning: \"{}\"", warning.debug().unwrap()); println!("Warning: \"{}\"", warning.debug().unwrap());
} }
MessageView::Latency(_) => {
let _ = self.pipeline.recalculate_latency();
}
_ => (), _ => (),
} }