Skip to main content

Error

Enum Error 

Source
pub enum Error {
Show 30 variants PrerollError(PrerollError), SeekError(SeekError), ThreadSpawnError(ThreadSpawnError), FileDemuxError(FileDemuxError), AppSourceError(AppSourceError), RtspSourceError(RtspSourceError), TestVideoSourceError(TestVideoSourceError), TestAudioSourceError(TestAudioSourceError), SwDecoderError(SwDecoderError), SwEncoderError(SwEncoderError), PacerError(PacerError), VideoSynchronizerError(VideoSynchronizerError), SwAudioEncoderError(SwAudioEncoderError), AudioResamplerError(AudioResamplerError), AudioVolumeError(AudioVolumeError), SwScalerError(SwScalerError), SwChromaKeyError(SwChromaKeyError), QueueError(QueueError), PipelineBridgeError(PipelineBridgeError), GraphError(GraphError), LogInitError(LogInitError), AudioMixerError(AudioMixerError), SwVideoCompositorError(SwVideoCompositorError), FileMuxerError(FileMuxerError), HlsMuxerError(HlsMuxerError), RtspSinkError(RtspSinkError), OrtDetectorError(OrtDetectorError), WebRtcError(WebRtcError), Ffmpeg(Error), Other(String),
}
Expand description

Crate-wide error. Each element defines its own {Element}Error (see FileDemuxError, SwDecoderError, QueueError) for its own domain-specific failures; this enum just aggregates them so trait methods (Sink::consume, SourceElement::run, …) — which have to return one common error type to stay object-safe across arbitrary Box<dyn Sink> — can report any of them. ? chains through automatically: an element’s own function returns its own error type, and the moment that gets used with ? inside a function returning this top-level Result, it’s converted here via #[from].

Variants§

§

PrerollError(PrerollError)

Waiting for a pipeline-wide preroll failed.

§

SeekError(SeekError)

One or more elements rejected a pipeline-wide seek check.

§

ThreadSpawnError(ThreadSpawnError)

A pipeline, queue, or driver worker thread could not be created.

§

FileDemuxError(FileDemuxError)

A file demuxer operation failed.

§

AppSourceError(AppSourceError)

An application source channel is closed.

§

RtspSourceError(RtspSourceError)

An RTSP source operation failed.

§

TestVideoSourceError(TestVideoSourceError)

A synthetic video source rejected an operation.

§

TestAudioSourceError(TestAudioSourceError)

A synthetic audio source rejected an operation.

§

SwDecoderError(SwDecoderError)

A software decoder operation failed.

§

SwEncoderError(SwEncoderError)

A software video encoder operation failed.

§

PacerError(PacerError)

A pacer could not schedule an input timestamp.

§

VideoSynchronizerError(VideoSynchronizerError)

A video synchronizer could not schedule an input frame.

§

SwAudioEncoderError(SwAudioEncoderError)

A software audio encoder operation failed.

§

AudioResamplerError(AudioResamplerError)

An audio resampling operation failed.

§

AudioVolumeError(AudioVolumeError)

An audio gain operation failed.

§

SwScalerError(SwScalerError)

A software scaling operation failed.

§

SwChromaKeyError(SwChromaKeyError)

A software chroma-key operation failed.

§

QueueError(QueueError)

A queue worker or capacity policy failed.

§

PipelineBridgeError(PipelineBridgeError)

§

GraphError(GraphError)

A pipeline graph mutation violated a topology invariant.

§

LogInitError(LogInitError)

Private file logging could not be initialized.

§

AudioMixerError(AudioMixerError)

An audio mixer operation failed.

§

SwVideoCompositorError(SwVideoCompositorError)

A software video compositor operation failed.

§

FileMuxerError(FileMuxerError)

Writing a container file failed.

§

HlsMuxerError(HlsMuxerError)

HLS muxing or option validation failed.

§

RtspSinkError(RtspSinkError)

Sending a stream to an RTSP endpoint failed.

§

OrtDetectorError(OrtDetectorError)

Available on crate feature ort only.

ONNX Runtime inference or detector processing failed.

§

WebRtcError(WebRtcError)

Available on crate feature webrtc only.

A WebRTC peer operation failed.

§

Ffmpeg(Error)

An FFmpeg error not assigned to a more specific element error.

§

Other(String)

An application-defined error message without a more specific category.

Trait Implementations§

Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<AppSourceError> for Error

Source§

fn from(source: AppSourceError) -> Self

Converts to this type from the input type.
Source§

impl From<AudioMixerError> for Error

Source§

fn from(source: AudioMixerError) -> Self

Converts to this type from the input type.
Source§

impl From<AudioResamplerError> for Error

Source§

fn from(source: AudioResamplerError) -> Self

Converts to this type from the input type.
Source§

impl From<AudioVolumeError> for Error

Source§

fn from(source: AudioVolumeError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<FileDemuxError> for Error

Source§

fn from(source: FileDemuxError) -> Self

Converts to this type from the input type.
Source§

impl From<FileMuxerError> for Error

Source§

fn from(source: FileMuxerError) -> Self

Converts to this type from the input type.
Source§

impl From<GraphError> for Error

Source§

fn from(source: GraphError) -> Self

Converts to this type from the input type.
Source§

impl From<HlsMuxerError> for Error

Source§

fn from(source: HlsMuxerError) -> Self

Converts to this type from the input type.
Source§

impl From<LogInitError> for Error

Source§

fn from(source: LogInitError) -> Self

Converts to this type from the input type.
Source§

impl From<OrtDetectorError> for Error

Source§

fn from(source: OrtDetectorError) -> Self

Converts to this type from the input type.
Source§

impl From<PacerError> for Error

Source§

fn from(source: PacerError) -> Self

Converts to this type from the input type.
Source§

impl From<PipelineBridgeError> for Error

Source§

fn from(source: PipelineBridgeError) -> Self

Converts to this type from the input type.
Source§

impl From<PrerollError> for Error

Source§

fn from(source: PrerollError) -> Self

Converts to this type from the input type.
Source§

impl From<QueueError> for Error

Source§

fn from(source: QueueError) -> Self

Converts to this type from the input type.
Source§

impl From<RtspSinkError> for Error

Source§

fn from(source: RtspSinkError) -> Self

Converts to this type from the input type.
Source§

impl From<RtspSourceError> for Error

Source§

fn from(source: RtspSourceError) -> Self

Converts to this type from the input type.
Source§

impl From<SeekError> for Error

Source§

fn from(source: SeekError) -> Self

Converts to this type from the input type.
Source§

impl From<SwAudioEncoderError> for Error

Source§

fn from(source: SwAudioEncoderError) -> Self

Converts to this type from the input type.
Source§

impl From<SwChromaKeyError> for Error

Source§

fn from(source: SwChromaKeyError) -> Self

Converts to this type from the input type.
Source§

impl From<SwDecoderError> for Error

Source§

fn from(source: SwDecoderError) -> Self

Converts to this type from the input type.
Source§

impl From<SwEncoderError> for Error

Source§

fn from(source: SwEncoderError) -> Self

Converts to this type from the input type.
Source§

impl From<SwScalerError> for Error

Source§

fn from(source: SwScalerError) -> Self

Converts to this type from the input type.
Source§

impl From<SwVideoCompositorError> for Error

Source§

fn from(source: SwVideoCompositorError) -> Self

Converts to this type from the input type.
Source§

impl From<TestAudioSourceError> for Error

Source§

fn from(source: TestAudioSourceError) -> Self

Converts to this type from the input type.
Source§

impl From<TestVideoSourceError> for Error

Source§

fn from(source: TestVideoSourceError) -> Self

Converts to this type from the input type.
Source§

impl From<ThreadSpawnError> for Error

Source§

fn from(source: ThreadSpawnError) -> Self

Converts to this type from the input type.
Source§

impl From<VideoSynchronizerError> for Error

Source§

fn from(source: VideoSynchronizerError) -> Self

Converts to this type from the input type.
Source§

impl From<WebRtcError> for Error

Source§

fn from(source: WebRtcError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Freeze for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CryptoSafe for T
where T: Send + Sync + Debug,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more