Question: How to send EOS after certain duration.
hi,
I would like to send an Eos signal after a certain amount of time to the pipeline.
I can't find any good examples on how to add a certain timeout and sending a signal, hope someone could help me out
I use the following basic loop to start the pipeline which works amazing
` pipeline .set_state(gst::State::Playing) .expect("Unable to set the pipeline to the Playing state");
// Wait until error or EOS
let bus = pipeline.bus().unwrap();
// set timer to which
for msg in bus.iter_timed(gst::ClockTime::NONE) {
use gst::MessageView;
match msg.view() {
MessageView::Info(inf) => {
eprintln!("{:?}",inf)
},
MessageView::Error(err) => {
eprintln!(
"Error received from element {:?}: {}",
err.src().map(|s| s.path_string()),
err.error()
);
eprintln!("Debugging information: {:?}", err.debug());
break;
}
MessageView::Eos(..) => break,
_ => (),
}
}
pipeline
.set_state(gst::State::Null)
.expect("Unable to set the pipeline to the Null state");`
Thanks in advance!
Quinten