pub struct SpliceInfo {
pub command_type: u8,
pub pts_adjustment: u64,
pub pts: Option<u64>,
pub duration: Option<u64>,
pub event_id: Option<u32>,
pub cancel: bool,
pub out_of_network: bool,
pub raw: Bytes,
}Expand description
Parsed view of a splice_info_section, preserving the raw bytes for downstream passthrough alongside the timing fields HLS / DASH renderers need.
Fields§
§command_type: u8splice_command_type field (one of CMD_*).
pts_adjustment: u64pts_adjustment field. Added to every splice_time PTS by the
receiving decoder. Surfaced for completeness; the egress
renderers usually want the absolute PTS via SpliceInfo::pts.
pts: Option<u64>33-bit splice_time PTS extracted from the splice_command, when present and time_specified. None when:
- the command type has no splice_time (splice_null, splice_schedule, bandwidth_reservation, private_command),
- the splice_insert is splice_immediate (no pre-roll PTS),
- splice_insert.cancel_indicator is set,
- splice_insert is per-component (no program splice_time),
- splice_time.time_specified_flag is 0 (“immediate”).
duration: Option<u64>break_duration from splice_insert when the duration_flag is
set. None for time_signal and for splice_insert without duration.
event_id: Option<u32>splice_event_id from splice_insert. None for command types
other than splice_insert.
cancel: boolTrue when splice_event_cancel_indicator is set on a
splice_insert. Egress renderers may emit a cancellation
SCTE35-CMD entry.
out_of_network: boolTrue when out_of_network_indicator is set on a splice_insert
(signals an ad break out – “going to ad”). Drives the choice
of HLS SCTE35-OUT vs SCTE35-IN attribute.
raw: BytesRaw splice_info_section bytes from table_id through CRC_32, preserved for passthrough into HLS DATERANGE SCTE35-* hex attributes and DASH EventStream / Event base64 bodies.
Implementations§
Source§impl SpliceInfo
impl SpliceInfo
Sourcepub fn absolute_pts(&self) -> Option<u64>
pub fn absolute_pts(&self) -> Option<u64>
Absolute PTS of the splice = pts_adjustment + splice_time.pts,
when both are available. Wraps modulo 2^33 per SCTE 35.
Trait Implementations§
Source§impl Clone for SpliceInfo
impl Clone for SpliceInfo
Source§fn clone(&self) -> SpliceInfo
fn clone(&self) -> SpliceInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SpliceInfo
impl Debug for SpliceInfo
Source§impl PartialEq for SpliceInfo
impl PartialEq for SpliceInfo
Source§fn eq(&self, other: &SpliceInfo) -> bool
fn eq(&self, other: &SpliceInfo) -> bool
self and other values to be equal, and is used by ==.