PES pipeline: InputStream on DiscStream + IsoStream, MkvOutputStream

- DiscStream: next_frame() reads sectors → decrypts → demuxes → returns PesFrame
- IsoStream: same pattern, reads from ISO file
- MkvOutputStream: accepts PesFrame, writes MKV via MkvMuxer
- InputStream trait: next_frame(), info(), codec_private(), headers_ready()
- OutputStream trait: write_frame(), finish()
- FileSectorReader: SectorReader backed by a file
- PesFrame: track + pts + keyframe + data

Old Read/Write IOStream impls preserved for backward compatibility.
Next: replace pipe() in CLI to use PES pipeline.
This commit is contained in:
MattJackson
2026-04-15 03:03:45 +00:00
parent f9618bdd6d
commit e33b13a7ca
5 changed files with 192 additions and 0 deletions
+7
View File
@@ -39,6 +39,13 @@ pub trait InputStream {
/// Stream metadata (tracks, duration, etc).
fn info(&self) -> &crate::disc::DiscTitle;
/// Codec initialization data for a track (SPS/PPS for HEVC, etc).
/// Returns None until enough frames have been parsed.
fn codec_private(&self, track: usize) -> Option<Vec<u8>>;
/// True when codec_private is available for all video tracks.
fn headers_ready(&self) -> bool;
}
/// Output stream — consumes PES frames to any destination.