mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-06-14 12:19:28 +00:00
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:
parent
774281a0c9
commit
923daa04b9
|
@ -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()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue