Unified Stream trait: read() and write() on one type
Stream trait: read() returns PesFrame, write() accepts PesFrame. A stream is a stream — you read from it or write to it. No separate Input/Output traits. API: libfreemkv::input(url) and libfreemkv::output(url, title, codecs) Returns Box<dyn Stream>.
This commit is contained in:
@@ -25,6 +25,25 @@ pub struct Event {
|
||||
/// Types of events the lib can fire.
|
||||
#[derive(Debug)]
|
||||
pub enum EventKind {
|
||||
// ── Init sequence events ────────────────────────────────────────
|
||||
|
||||
/// Drive opened successfully.
|
||||
DriveOpened { device: String },
|
||||
|
||||
/// Drive is ready (disc spun up).
|
||||
DriveReady,
|
||||
|
||||
/// Firmware init completed.
|
||||
InitComplete { success: bool },
|
||||
|
||||
/// Disc probe completed.
|
||||
ProbeComplete { success: bool },
|
||||
|
||||
/// Disc scan completed.
|
||||
ScanComplete { titles: usize },
|
||||
|
||||
// ── Read events ─────────────────────────────────────────────────
|
||||
|
||||
/// Bytes successfully read and written to output.
|
||||
BytesRead {
|
||||
/// Bytes written so far.
|
||||
|
||||
Reference in New Issue
Block a user