From 26beed7277f1bd93dc4a11af148901b6925237c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 10 Apr 2020 23:40:39 +0300 Subject: [PATCH] gstreamer-audio: Follow-up commit for updating audio clipping meta tests --- gstreamer-audio/src/audio_meta.rs | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/gstreamer-audio/src/audio_meta.rs b/gstreamer-audio/src/audio_meta.rs index b1f924b9c..a56e7829e 100644 --- a/gstreamer-audio/src/audio_meta.rs +++ b/gstreamer-audio/src/audio_meta.rs @@ -79,18 +79,31 @@ mod tests { let mut buffer = gst::Buffer::with_size(1024).unwrap(); { - let cmeta = - AudioClippingMeta::add(buffer.get_mut().unwrap(), gst::Format::Default, 1, 2); - assert_eq!(cmeta.get_format(), gst::Format::Default); - assert_eq!(cmeta.get_start(), 1); - assert_eq!(cmeta.get_end(), 2); + let cmeta = AudioClippingMeta::add( + buffer.get_mut().unwrap(), + gst::format::Default(Some(1)), + gst::format::Default(Some(2)), + ); + assert_eq!( + cmeta.get_start(), + gst::GenericFormattedValue::Default(gst::format::Default(Some(1))) + ); + assert_eq!( + cmeta.get_end(), + gst::GenericFormattedValue::Default(gst::format::Default(Some(2))) + ); } { let cmeta = buffer.get_meta::().unwrap(); - assert_eq!(cmeta.get_format(), gst::Format::Default); - assert_eq!(cmeta.get_start(), 1); - assert_eq!(cmeta.get_end(), 2); + assert_eq!( + cmeta.get_start(), + gst::GenericFormattedValue::Default(gst::format::Default(Some(1))) + ); + assert_eq!( + cmeta.get_end(), + gst::GenericFormattedValue::Default(gst::format::Default(Some(2))) + ); } } }