Update for ClockId creation API changes

This commit is contained in:
Sebastian Dröge 2020-10-20 12:49:51 +03:00
parent 9d394d39ed
commit bbc18d6349
4 changed files with 6 additions and 10 deletions

View file

@ -802,7 +802,7 @@ impl PushSrcImpl for SineSrc {
return Err(gst::FlowError::Flushing);
}
let id = clock.new_single_shot_id(wait_until).unwrap();
let id = clock.new_single_shot_id(wait_until);
clock_wait.clock_id = Some(id.clone());
drop(clock_wait);

View file

@ -705,7 +705,7 @@ For working in live mode, we have to add a few different parts in various places
return Ok(buffer);
}
let id = clock.new_single_shot_id(wait_until).unwrap();
let id = clock.new_single_shot_id(wait_until);
gst_log!(
CAT,
@ -863,7 +863,7 @@ Now as a last step, we need to actually make use of the new struct we added arou
return Err(gst::FlowReturn::Flushing);
}
let id = clock.new_single_shot_id(wait_until).unwrap();
let id = clock.new_single_shot_id(wait_until);
clock_wait.clock_id = Some(id.clone());
drop(clock_wait);

View file

@ -2022,9 +2022,7 @@ impl FallbackSrc {
assert!(wait_time.is_some());
assert!(state.source_pending_restart_timeout.is_none());
let timeout = clock
.new_single_shot_id(wait_time)
.expect("can't create clock id");
let timeout = clock.new_single_shot_id(wait_time);
let element_weak = element.downgrade();
timeout
.wait_async(move |_clock, _time, _id| {
@ -2140,9 +2138,7 @@ impl FallbackSrc {
wait_time,
);
let timeout = clock
.new_single_shot_id(wait_time)
.expect("can't create clock id");
let timeout = clock.new_single_shot_id(wait_time);
let element_weak = element.downgrade();
timeout
.wait_async(move |_clock, _time, _id| {

View file

@ -548,7 +548,7 @@ fn stop_pipeline(mut pipeline: Pipeline) {
.unwrap();
// Signal shutdown to the clock thread
let clock_id = clock.new_single_shot_id(0.into()).unwrap();
let clock_id = clock.new_single_shot_id(0.into());
let _ = clock_id.wait();
let switch = pipeline.get_by_name("switch").unwrap();