Skip to main content

EncodeError

Enum EncodeError 

Source
#[non_exhaustive]
pub enum EncodeError { Cancelled, InvalidTimestamp, Adapter(String), Output(String), OutputInUse(String), Publish { message: String, kept: Option<PathBuf>, }, EncoderRejected { encoder: String, frame: u64, message: String, }, Gpu { fault: GpuFault, message: String, }, EncodersRefused { message: String, refusals: Vec<EncoderRefusal>, }, }
Expand description

Typed encoding failure.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Cancelled

The operation was cancelled; partial output must be removed by policy.

§

InvalidTimestamp

Input timestamps violated monotonic/interleave requirements.

§

Adapter(String)

Adapter failure without leaking a platform error type.

§

Output(String)

The output file could not be created or claimed. Nothing was encoded.

§

OutputInUse(String)

Another live export, in any process, holds the output’s partial file. Nothing was encoded.

§

Publish

The output was encoded but could not be moved to its final path. The finished file is kept beside the target under another name.

Fields

§message: String

The target, the step that failed and the operating system’s error.

§kept: Option<PathBuf>

Where the finished file is now; None when that move also failed.

§

EncoderRejected

The encoder refused an input frame on a still-usable device; another path may succeed.

Fields

§encoder: String

The encoder that refused, as FFmpeg names it (h264_d3d12va).

§frame: u64

The frame it refused, counted from 0 in the order frames were sent.

§message: String

The encoder’s message and session state.

§

Gpu

A GPU call failed; message names the call and its platform status.

Fields

§fault: GpuFault

What the status says about the device.

§message: String

The failed call and its platform status.

§

EncodersRefused

No encoder candidate opened. Each refusal’s kind tells whether retrying can help.

Fields

§message: String

Every candidate’s refusal, in the order they were tried.

§refusals: Vec<EncoderRefusal>

The refusals themselves, most preferred candidate first.

Implementations§

Source§

impl EncodeError

Source

pub fn gpu_timeout(what: impl Display) -> Self

A timed-out GPU wait for what, carrying GPU_TIMEOUT_MESSAGE.

Trait Implementations§

Source§

impl Clone for EncodeError

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EncodeError

Source§

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

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

impl Display for EncodeError

Source§

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

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

impl Eq for EncodeError

Source§

impl Error for EncodeError

1.30.0 · 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 PartialEq for EncodeError

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for EncodeError

Auto Trait Implementations§

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.