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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user