Commit c6c76935 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Add Buffer::get_dts_or_pts()

parent 411f54af
......@@ -332,6 +332,15 @@ impl BufferRef {
self.0.dts = dts.to_glib();
}
pub fn get_dts_or_pts(&self) -> ClockTime {
let val = self.get_dts();
if val.is_none() {
self.get_pts()
} else {
val
}
}
pub fn get_duration(&self) -> ClockTime {
from_glib(self.0.duration)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment