From 1d78ac9323de6bfb267ff22ca86ca0f467e6b0a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20Brzezi=C5=84ski?= Date: Thu, 25 Nov 2021 14:54:07 +0100 Subject: [PATCH] examples: Update playback-tutorial-6 with new getters --- tutorials/src/bin/playback-tutorial-6.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tutorials/src/bin/playback-tutorial-6.rs b/tutorials/src/bin/playback-tutorial-6.rs index 733820feb..13e8cfe2a 100644 --- a/tutorials/src/bin/playback-tutorial-6.rs +++ b/tutorials/src/bin/playback-tutorial-6.rs @@ -9,7 +9,7 @@ mod tutorials_common; fn filter_vis_features(feature: &gst::PluginFeature) -> bool { match feature.downcast_ref::() { Some(factory) => { - let klass = factory.metadata(&gst::ELEMENT_METADATA_KLASS).unwrap(); + let klass = factory.klass(); klass.contains("Visualization") } None => false, @@ -29,7 +29,7 @@ fn tutorial_main() -> Result<(), Error> { println!("Available visualization plugins:"); for feature in list { let factory = feature.downcast::().unwrap(); - let name = factory.metadata(&gst::ELEMENT_METADATA_LONGNAME).unwrap(); + let name = factory.longname(); println!(" {}", name); if selected_factory.is_none() && name.starts_with("GOOM") { @@ -41,9 +41,7 @@ fn tutorial_main() -> Result<(), Error> { let vis_factory = selected_factory.expect("No visualization plugins found."); // We have now selected a factory for the visualization element - let name = vis_factory - .metadata(&gst::ELEMENT_METADATA_LONGNAME) - .unwrap(); + let name = vis_factory.longname(); println!("Selected {}", name); let vis_plugin = vis_factory.create(None).unwrap();