X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-core%2Fsrc%2Fframe.rs;h=c93a9216fcc9ee7218da0910b65129ae5a890d94;hb=3867d436b51515207e0035e2c6cb127de3935c57;hp=fbdbdf5e391f533e5c75c2fb90b4cd5f11d07248;hpb=aa5efa8a68f625b21180a53c17c2cfaa79eb3500;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) } }