timed_metadata/lib.rs
1//! Timed-metadata / DPI signalling conversion core.
2//!
3//! Translates SCTE-35 splice information to and from the carriages used in OTT
4//! delivery: HLS `EXT-X-DATERANGE` (RFC 8216 / draft-pantos-hls-rfc8216bis
5//! §4.4.5.1) and DASH `emsg` (SCTE 214-3, scheme `urn:scte:scte35:2013:bin`).
6//!
7//! Conversions are lossless: the original `splice_info_section` bytes are
8//! carried verbatim (DATERANGE `SCTE35-OUT` hex, emsg `message_data`).
9//!
10//! Pure functions live in [`convert`]; the stateful [`Timeline`] session adds a
11//! wall-clock [`TimeAnchor`] and 33-bit PTS wrap-unrolling.
12#![no_std]
13#![forbid(unsafe_code)]
14
15extern crate alloc;
16
17pub mod anchor;
18pub mod convert;
19pub mod daterange;
20pub mod error;
21pub mod event;
22pub mod timeline;
23
24pub use anchor::TimeAnchor;
25pub use daterange::DateRange;
26pub use error::{Error, Result};
27pub use event::{EventKind, MediaDuration, MediaTime, SourcePayload, TimedEvent};
28pub use timeline::Timeline;
29
30/// 90 kHz — the SCTE-35 / MPEG-2 PTS clock.
31pub const PTS_HZ: u64 = 90_000;