v0.7.1: SectorReader trait, IsoStream, StdioStream, resolve_encryption

- SectorReader trait decouples disc scanning from SCSI
- Disc::scan_image() for ISO and any sector source
- resolve_encryption() handles AACS 1.0/2.0/none in one path
- IsoStream: full UDF/MPLS/CLPI/labels pipeline from ISO files
- StdioStream: stdin/stdout pipe
- Strict scheme:// URL format with validation
- Labels module refactored to SectorReader
- 7 stream types total
This commit is contained in:
MattJackson
2026-04-11 15:49:29 +00:00
parent 168005ef34
commit dc4ebd7d9b
14 changed files with 346 additions and 264 deletions
+7 -3
View File
@@ -141,7 +141,11 @@ pub fn open_input(url: &str, opts: &InputOptions) -> io::Result<Box<dyn IOStream
}
"iso" => {
validate_file_path(&parsed.path, "iso")?;
Ok(Box::new(IsoStream::open(&parsed.path, opts.title_index)?))
let scan_opts = match &opts.keydb_path {
Some(p) => crate::disc::ScanOptions::with_keydb(p),
None => crate::disc::ScanOptions::default(),
};
Ok(Box::new(IsoStream::open(&parsed.path, opts.title_index, &scan_opts)?))
}
"null" => {
Err(io::Error::new(io::ErrorKind::InvalidInput,
@@ -166,8 +170,8 @@ pub fn open_output(url: &str, meta: &DiscTitle) -> io::Result<Box<dyn IOStream>>
"disc:// is read-only — cannot use as output"))
}
"iso" => {
Err(io::Error::new(io::ErrorKind::Unsupported,
"iso:// is read-only — cannot use as output"))
validate_file_path(&parsed.path, "iso")?;
Ok(Box::new(IsoStream::create(&parsed.path)?.meta(meta)))
}
"null" => {
Ok(Box::new(NullStream::new().meta(meta)))