1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! Generate machine-readable A/V sync test videos and measure audio/video drift.
//!
//! Every video frame of a generated file carries its frame number three ways:
//! a 48-bit barcode strip (with a CRC), a QR code, and a seven-segment
//! timecode for people. Every frame's worth of audio carries the same number
//! (mod 65536) as four simultaneous tones. Analysis decodes both sides of a
//! captured or re-encoded copy and reports, frame by frame, how far the audio
//! has drifted from the video. Precision is a small fraction of a millisecond.
//!
//! ```no_run
//! use av_drift_detector::{AnalyzeOptions, GenerateOptions, analyze, generate};
//!
//! let fps = "29.97".parse()?;
//! generate(&GenerateOptions::new("sync.mp4", fps, 10.0), |_| {})?;
//! // ... play `sync.mp4` through the system under test and record it ...
//! let report = analyze("captured.mp4".as_ref(), &AnalyzeOptions::default())?;
//! println!("{}", report.summary_text());
//! # Ok::<(), av_drift_detector::Error>(())
//! ```
//!
//! The pattern rendering ([`pattern`]), audio code ([`audio`]) and the analysis
//! itself ([`analyze::analyze_scan`]) are plain Rust. Only file input and output
//! need FFmpeg: linked, with the `ffmpeg` feature (on by default), or run as the
//! `ffmpeg` and `ffprobe` programs, with the `ffmpeg-cli` feature. Without
//! either, the crate builds for targets such as Android and WebAssembly.
pub use AnalyzeOptions;
pub use analyze;
pub use ;
pub use generate;
pub use ;
pub use ;
pub use ;
// Compile the examples in the README and the library guide as doctests.
;
;