forked from mirrors/gstreamer-rs
Fix compilation of iterator example
This commit is contained in:
parent
a6d9fe4b0a
commit
06bd23f833
1 changed files with 7 additions and 3 deletions
|
@ -9,9 +9,13 @@ fn example_main() {
|
||||||
|
|
||||||
let identity = gst::ElementFactory::make("identity", None).unwrap();
|
let identity = gst::ElementFactory::make("identity", None).unwrap();
|
||||||
let mut iter = identity.iterate_pads();
|
let mut iter = identity.iterate_pads();
|
||||||
while let Some(res) = iter.next() {
|
loop {
|
||||||
match res {
|
match iter.next() {
|
||||||
Ok(pad) => println!("Pad: {}", pad.get_name()),
|
Ok(Some(pad)) => println!("Pad: {}", pad.get_name()),
|
||||||
|
Ok(None) => {
|
||||||
|
println!("Done");
|
||||||
|
break;
|
||||||
|
}
|
||||||
Err(gst::IteratorError::Resync) => {
|
Err(gst::IteratorError::Resync) => {
|
||||||
println!("Iterator resync");
|
println!("Iterator resync");
|
||||||
iter.resync();
|
iter.resync();
|
||||||
|
|
Loading…
Reference in a new issue