Expand description
Sub-frame timecode: extend a SMPTE timecode with an audio-sample offset.
SubframeTimestamp combines a Timecode with an audio-sample index and
sample rate to give nanosecond-accurate timestamps that go beyond the
one-frame resolution of SMPTE timecode alone.
§Example
ⓘ
use oximedia_timecode::{Timecode, FrameRate};
use oximedia_timecode::subframe::SubframeTimestamp;
let tc = Timecode::new(0, 0, 1, 0, FrameRate::Fps25).unwrap();
let sub = SubframeTimestamp::new(tc, 441, 44100);
// 1 second + 441/44100 s = 1.01 s = 1_010_000_000 ns
assert_eq!(sub.to_nanos(), 1_010_000_000);Structs§
- Subframe
Timestamp - A timecode extended with a sub-frame audio sample offset.