#[non_exhaustive]pub enum BusEvent {
Eos {
element_type: ElementType,
name: Arc<str>,
},
Error {
element_type: ElementType,
name: Arc<str>,
error: Error,
},
Dropped {
element_type: ElementType,
name: Arc<str>,
},
Seeked {
element_type: ElementType,
name: Arc<str>,
requested: Duration,
landed: Duration,
},
}Expand description
Marked #[non_exhaustive]: this grows as elements gain conditions worth
reporting, and a caller acting on Eos/Error should not stop compiling
because some unrelated element learned to report a stall. Within this crate
the attribute has no effect, so Bus::post and
BusReceiver::log_events still fail to compile until they handle a new
variant — the completeness check stays where it belongs.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Eos
An element completed ordered end-of-stream processing.
Fields
element_type: ElementTypeBuilt-in kind of the element that completed.
Error
An element encountered a failure that could not be returned through the synchronous call stack.
Fields
element_type: ElementTypeBuilt-in kind of the element reporting the failure.
Dropped
A Queue with OverflowPolicy::DropNewest dropped a buffer
because it was full.
Fields
element_type: ElementTypeBuilt-in kind of the queue that dropped the buffer.
Seeked
Posted by crate::control::drain_control once
crate::element::SourceElement::seek returns — requested is1
whatever crate::pipeline::Pipeline::seek was called with;
landed is where the source actually ended up, which the source
itself has to resolve (e.g. FileDemuxer can only reposition to a
keyframe at or before requested, never exactly on top of an
arbitrary timestamp — see its seek impl). Watch this instead of
assuming requested took effect verbatim.
Fields
element_type: ElementTypeBuilt-in kind of the source that performed the seek.
requested: DurationAbsolute media position requested by crate::pipeline::Pipeline::seek.