rustduck 1.1.0

Ergonomic rustduck facade with opt-in transport-stream extensions
Documentation
//! Ergonomic RustDuck entry point.
//!
//! The safe TSDuck API is re-exported from [`rustduck_core`]. Optional pure
//! Rust transport-stream utilities are available only through the matching
//! `ext-*` Cargo features, under the [`ext`] namespace.
//!
//! # Quick start
//!
//! Analyze one or more 188-byte transport-stream packets:
//!
//! ```no_run
//! use rustduck::{DuckContext, Report, TS_PACKET_SIZE, TSAnalyzer};
//!
//! fn main() -> rustduck::Result<()> {
//!     let duck = DuckContext::new(Report::null()?)?;
//!     let mut analyzer = TSAnalyzer::new(duck)?;
//!     analyzer.feed(&[0x47; TS_PACKET_SIZE])?;
//!
//!     let snapshot = analyzer.snapshot()?;
//!     println!("{} packets", snapshot.summary.packet_count);
//!     Ok(())
//! }
//! ```

pub use rustduck_core::*;

/// Explicitly opt-in transport-stream extensions.
pub mod ext {
    /// Borrowed MPEG transport-stream packet primitives.
    #[cfg(feature = "ext-transport-stream")]
    pub mod transport_stream {
        pub use rustduck_ext_transport_stream::*;
    }

    /// Bounded fragmented-stream resynchronization.
    #[cfg(feature = "ext-resync")]
    pub mod resync {
        pub use rustduck_ext_resync::*;
    }
}