pub enum PacerError {
InvalidTimeBase {
numerator: i32,
denominator: i32,
},
UnpaceableTimestamp {
pts: i64,
},
NotAttached,
}Expand description
Errors specific to Pacer.
Variants§
InvalidTimeBase
time_base came from
crate::elements::FileDemuxer::stream_time_base/an encoder’s own
time base — i.e. from a demuxed file or an otherwise externally
supplied stream, not a value this crate controls. A malformed or
unusual stream can legitimately have an invalid one.
UnpaceableTimestamp
pts is external input too (see PacerError::InvalidTimeBase) —
an adversarial or corrupt value that cannot be turned into a wait at
all: it does not fit in nanoseconds at this stream’s time base.
Reported rather than swallowed because the alternative is the buffer going through unpaced, which is a whole stream arriving at once.
NotAttached
A buffer arrived before the pipeline gave this pacer its playback
clock, which
cannot happen through ordinary wiring: attach_context runs when the
branch is built and a branch cannot carry buffers before it exists.
Reported rather than passed through, because pacing nothing is a whole stream arriving at once and there is no quieter way for that to go wrong.
Trait Implementations§
Source§impl Debug for PacerError
impl Debug for PacerError
Source§impl Display for PacerError
impl Display for PacerError
Source§impl Error for PacerError
impl Error for PacerError
1.30.0 · 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()