X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-core%2Fsrc%2Fframe.rs;h=c93a9216fcc9ee7218da0910b65129ae5a890d94;hb=63fcd784c5e808399f40166f1fe5bc494f24368b;hp=fbdbdf5e391f533e5c75c2fb90b4cd5f11d07248;hpb=6f2630992fe340ad1a122ec10c649f756e478185;p=nihav.git diff --git a/nihav-core/src/frame.rs b/nihav-core/src/frame.rs index fbdbdf5..c93a921 100644 --- a/nihav-core/src/frame.rs +++ b/nihav-core/src/frame.rs @@ -1345,6 +1345,10 @@ impl NAStream { } /// Returns stream duration. pub fn get_duration(&self) -> u64 { self.duration } + /// Constructs a new timestamp. + pub fn make_ts(&self, pts: Option, dts: Option, duration: Option) -> NATimeInfo { + NATimeInfo::new(pts, dts, duration, self.tb_num, self.tb_den) + } /// Converts current instance into a reference-counted one. pub fn into_ref(self) -> NAStreamRef { Arc::new(self) } }