oximedia_proxy/timecode/
verify.rs1use crate::Result;
4
5pub struct TimecodeVerifier;
7
8impl TimecodeVerifier {
9 #[must_use]
11 pub const fn new() -> Self {
12 Self
13 }
14
15 pub fn verify_accuracy(
17 &self,
18 _original: &std::path::Path,
19 _proxy: &std::path::Path,
20 ) -> Result<TimecodeVerifyResult> {
21 Ok(TimecodeVerifyResult {
23 frame_accurate: true,
24 max_drift_frames: 0,
25 total_frames_checked: 0,
26 })
27 }
28
29 pub fn verify_edl_timecode(&self, _edl_path: &std::path::Path) -> Result<bool> {
31 Ok(true)
33 }
34}
35
36impl Default for TimecodeVerifier {
37 fn default() -> Self {
38 Self::new()
39 }
40}
41
42#[derive(Debug, Clone)]
44pub struct TimecodeVerifyResult {
45 pub frame_accurate: bool,
47
48 pub max_drift_frames: i64,
50
51 pub total_frames_checked: u64,
53}
54
55#[cfg(test)]
56mod tests {
57 use super::*;
58
59 #[test]
60 fn test_timecode_verifier() {
61 let verifier = TimecodeVerifier::new();
62 let result = verifier.verify_accuracy(
63 std::path::Path::new("original.mov"),
64 std::path::Path::new("proxy.mp4"),
65 );
66 assert!(result.is_ok());
67 assert!(result.expect("should succeed in test").frame_accurate);
68 }
69}