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:
Matthew Jackson
2026-06-30 15:26:49 -07:00
parent 923b9edbf4
commit 0f0c496a4d
6 changed files with 176 additions and 1 deletions
+6
View File
@@ -2124,6 +2124,12 @@ impl Disc {
bytes_bad_in_main_title: main_title_bad,
main_title_duration_secs: main_title.map(|t| t.duration_secs),
main_title_size_bytes: main_title.map(|t| t.size_bytes),
// The rendered drilldown — located ranges + at-risk movie time —
// computed here from the in-memory bad-range set + title so the
// client renders it verbatim and never reads the mapfile.
located: main_title
.map(|t| crate::disc::locate_ranges(&bad_ranges_now, t))
.unwrap_or_default(),
};
!reporter.report(&pp)
}