MCPcopy Create free account
hub / github.com/Recordscript/recordscript / check_pts

Method check_pts

libs/scrap/src/common/record.rs:217–226  ·  view source on GitHub ↗
(&mut self, pts: i64)

Source from the content-addressed store, hash-verified

215 }
216
217 fn check_pts(&mut self, pts: i64) -> ResultType<()> {
218 // https://stackoverflow.com/questions/76379101/how-to-create-one-playable-webm-file-from-two-different-video-tracks-with-same-c
219 let old_pts = self.pts;
220 self.pts = Some(pts);
221 if old_pts.clone().unwrap_or_default() > pts {
222 log::info!("pts {:?} -> {}, change record filename", old_pts, pts);
223 self.change(self.ctx.clone())?;
224 }
225 Ok(())
226 }
227
228 fn send_state(&self, state: RecordState) {
229 self.ctx.tx.as_ref().map(|tx| tx.send(state));

Callers 1

write_frameMethod · 0.80

Calls 2

changeMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected