Make it an requirement to implement Source::do_seek()

This commit is contained in:
Sebastian Dröge 2016-05-22 16:23:43 +03:00
parent 872e9a8ab1
commit ca4fa82ffe
2 changed files with 5 additions and 3 deletions

View file

@ -159,5 +159,9 @@ impl Source for FileSrc {
},
}
}
fn do_seek(&mut self, _: u64, _: u64) -> bool {
true
}
}

View file

@ -30,9 +30,7 @@ pub trait Source: Sync + Send {
fn start(&mut self) -> bool;
fn stop(&mut self) -> bool;
fn fill(&mut self, offset: u64, data: &mut [u8]) -> Result<usize, GstFlowReturn>;
fn do_seek(&mut self, _: u64, _: u64) -> bool {
return true;
}
fn do_seek(&mut self, start: u64, stop: u64) -> bool;
}
#[no_mangle]