pub(crate) const SECTION_B1_FLAGS_PSI: u8 = 0xB0;
pub(crate) const SECTION_B1_FLAGS_DVB: u8 = 0xF0;
pub(crate) const SECTION_B1_SSI: u8 = 0x80;
pub(crate) const SECTION_B1_RESERVED_HI: u8 = 0x30;
pub(crate) fn check_section_length(
bytes_len: usize,
header_len: usize,
section_length: usize,
min_total: usize,
) -> crate::Result<usize> {
let total = header_len + section_length;
if bytes_len < total || total < min_total {
return Err(crate::error::Error::SectionLengthOverflow {
declared: section_length,
available: bytes_len.saturating_sub(header_len),
});
}
Ok(total)
}
pub mod any;
pub use any::AnyTableSection;
pub mod registry;
pub use registry::{TableObject, TableRegistry};
pub mod ait;
pub mod bat;
pub mod cat;
pub mod cit;
pub mod container;
pub mod dit;
pub mod downloadable_font_info;
pub mod dsmcc;
pub mod eit;
pub mod int;
pub mod mpe;
pub mod mpe_fec;
pub mod mpe_ifec;
pub mod nit;
pub mod pat;
pub mod pmt;
pub mod protection_message;
pub mod rct;
pub mod rnt;
pub mod rst;
pub mod sat;
pub mod sdt;
pub mod sit;
pub mod st;
pub mod tdt;
pub mod tot;
pub mod tsdt;
pub mod unt;