progress: PassProgress carries the located drilldown (emit side)
Add LocatedRange + LocatedProgress to the progress contract and a 'located' field on PassProgress, populated by the sweep + patch emitters from the in-memory bad-range set + title. Move the range->chapter/time annotation (locate_ranges, range_chapter, byte_offset_in_title) into the library so a client renders the disc map + at-risk movie time straight from PassProgress and never reads the mapfile itself — if the mapfile becomes a mapdb, this type and its producer change, clients don't. PassProgress is no longer Copy (located carries a Vec); it's built once per throttled emission and passed by reference. Non-locating phases (verify, extract) emit LocatedProgress::default(). Adds consts::MILLIS_PER_SEC. Consumer-side wiring (autorip drops Mapfile::load) follows.
This commit is contained in:
@@ -20,6 +20,10 @@ pub const SECTOR_BYTES: usize = 2048;
|
||||
/// the workspace reads as `sectors * SECTOR_BYTES_U64` with no per-site cast.
|
||||
pub const SECTOR_BYTES_U64: u64 = SECTOR_BYTES as u64;
|
||||
|
||||
/// Milliseconds per second. For turning a byte count ÷ bytes-per-second into a
|
||||
/// movie-time figure (`bytes / bps * MILLIS_PER_SEC`) without a bare `1000.0`.
|
||||
pub const MILLIS_PER_SEC: f64 = 1_000.0;
|
||||
|
||||
/// Bytes per MPEG-2 transport-stream packet. Common to all MPEG-TS, not just
|
||||
/// Blu-ray — prefixed by the format, not a disc type.
|
||||
pub const TS_PACKET_BYTES: usize = 188;
|
||||
|
||||
Reference in New Issue
Block a user