forked from mirrors/gstreamer-rs
gstreamer-audio: Follow-up commit for updating audio clipping meta tests
This commit is contained in:
parent
d9a06b31de
commit
26beed7277
1 changed files with 21 additions and 8 deletions
|
@ -79,18 +79,31 @@ mod tests {
|
||||||
let mut buffer = gst::Buffer::with_size(1024).unwrap();
|
let mut buffer = gst::Buffer::with_size(1024).unwrap();
|
||||||
|
|
||||||
{
|
{
|
||||||
let cmeta =
|
let cmeta = AudioClippingMeta::add(
|
||||||
AudioClippingMeta::add(buffer.get_mut().unwrap(), gst::Format::Default, 1, 2);
|
buffer.get_mut().unwrap(),
|
||||||
assert_eq!(cmeta.get_format(), gst::Format::Default);
|
gst::format::Default(Some(1)),
|
||||||
assert_eq!(cmeta.get_start(), 1);
|
gst::format::Default(Some(2)),
|
||||||
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)))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
let cmeta = buffer.get_meta::<AudioClippingMeta>().unwrap();
|
let cmeta = buffer.get_meta::<AudioClippingMeta>().unwrap();
|
||||||
assert_eq!(cmeta.get_format(), gst::Format::Default);
|
assert_eq!(
|
||||||
assert_eq!(cmeta.get_start(), 1);
|
cmeta.get_start(),
|
||||||
assert_eq!(cmeta.get_end(), 2);
|
gst::GenericFormattedValue::Default(gst::format::Default(Some(1)))
|
||||||
|
);
|
||||||
|
assert_eq!(
|
||||||
|
cmeta.get_end(),
|
||||||
|
gst::GenericFormattedValue::Default(gst::format::Default(Some(2)))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue