#[non_exhaustive]pub enum Error {
Show 17 variants
MissingAnchor,
Scte35EmsgVersionZero,
Scte35EmsgVersionZeroConversion,
#[non_exhaustive] UnsupportedScheme {
scheme: String,
},
Scte35(Error),
Emsg(Error),
AttrParse(String),
MissingEventId,
#[non_exhaustive] EmsgTimescaleMismatch {
emsg: Timescale,
timing: Timescale,
},
EmsgZeroTimescale,
EmsgPresentationTimeBeforeEpt,
EmsgDeltaOverflow(u64),
EmsgPresentationTimeOverflow,
UnsupportedPresentationTime,
HlsAttrValue(Error),
#[non_exhaustive] InvalidDuration {
what: &'static str,
value: f64,
},
TimestampOutOfRange(i64),
}Expand description
Errors produced by conversions and the crate::Timeline session.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MissingAnchor
A wall-clock conversion was attempted without a crate::TimeAnchor.
Scte35EmsgVersionZero
SCTE 35 emsg cannot be version 0: ANSI/SCTE 214-1:2024 §7.7.1(2),
private/specs-verified/scte/dash/scte-214-1-2024.md.
Scte35EmsgVersionZeroConversion
emsg_to_v0 was asked to write a SCTE 35 emsg, which 214-1 2024 §7.7.1(2) forbids.
#[non_exhaustive]UnsupportedScheme
An emsg presented to crate::convert::emsg_to_scte35 is not a
SCTE-35 carriage scheme.
Fields
This variant is marked as non-exhaustive
Scte35(Error)
SCTE-35 parse failure.
Emsg(Error)
emsg parse/serialize failure.
AttrParse(String)
EXT-X-DATERANGE tag could not be parsed.
MissingEventId
A SCTE-35-sourced event has no id (e.g. a time_signal cue with no
segmentation_descriptor), so it cannot be given a DATERANGE ID
(RFC 8216bis §4.4.5.1 requires unique IDs; emitting ID="" would
silently collide across cues).
#[non_exhaustive]EmsgTimescaleMismatch
emsg ↔ SegmentTiming timescale mismatch.
Fields
This variant is marked as non-exhaustive
EmsgZeroTimescale
The emsg states a timescale of 0, which no time can be read in.
EmsgPresentationTimeBeforeEpt
v0 emsg cannot carry an event starting before the segment EPT.
EmsgDeltaOverflow(u64)
v0 presentation_time_delta overflowed u32.
EmsgPresentationTimeOverflow
A v0 emsg’s earliest_presentation_time + presentation_time_delta
overflowed u64 (ISO/IEC 23009-1 §5.10.3.3); a wrapped value would
silently place the event near time zero.
UnsupportedPresentationTime
The emsg carries a PresentationTime variant this crate does not
know how to convert (the enum is #[non_exhaustive] upstream).
HlsAttrValue(Error)
A DATERANGE attribute value (ID, CLASS, or a SCTE35-* hex
token) could not be represented as an RFC 8216 §4.2 quoted-string —
contains ", CR or LF (issue #1140 / audit r12-TM-W4): these values
are frequently sourced from an upstream SCTE-35 segmentation
descriptor’s segmentation_upid, which is caller/network data, not
this crate’s own.
#[non_exhaustive]InvalidDuration
DURATION/PLANNED-DURATION was NaN, infinite, or negative (issue
#1140 / audit r13-BH-W4-class). RFC 8216 decimal-floating-point is
non-negative and finite.
Fields
This variant is marked as non-exhaustive
TimestampOutOfRange(i64)
A wall-clock instant is outside the range RFC 3339 formatting supports (years -9999..=9999).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()