tutorials/tutorial-6: Improve caps output

Fixed printing of pad capabilites in tutorial6.
Output now displays the capability lists eg:
  layout:{ (string)interleaved, (string)non-interleaved }

The origional broken output was being displayed as:
  layout:SendValue(Value(GString(Foreign(0x557140c99d00, 40))))
This commit is contained in:
alleynb 2020-04-20 15:17:30 +01:00
parent 932d4720c0
commit 86e6d3afa4

View file

@ -19,7 +19,12 @@ fn print_caps(caps: &gst::Caps, prefix: &str) {
for structure in caps.iter() { for structure in caps.iter() {
println!("{}{}", prefix, structure.get_name()); println!("{}{}", prefix, structure.get_name());
for (field, value) in structure.iter() { for (field, value) in structure.iter() {
println!("{} {}:{:?}", prefix, field, value); println!(
"{} {}:{}",
prefix,
field,
value.serialize().unwrap().as_str()
);
} }
} }
} }