Recorder bin offsetting is not entirely correct
Currently you do
// We need to set an offset, otherwise the length of the recorded song would be wrong.
// Get current clock time and calculate offset
let clock = self.pipeline.get_clock().expect("Could not get gstreamer pipeline clock");
debug!("( Clock time: {} )", clock.get_time());
let offset = -(clock.get_time().nseconds().unwrap() as i64);
self.file_srcpad.set_offset(offset);
Correct would be to also get the base time (pipeline.get_base_time()
) and then offset by -(clock_time - base_time)
.