跳到主要内容

VideoEncoderError

搜索

Enum VideoEncoderError 

源代码
pub enum VideoEncoderError {
    WindowsError(Error),
    FrameSendError(SendError<Option<(VideoEncoderSource, TimeSpan)>>),
    AudioSendError(SendError<Option<(AudioEncoderSource, TimeSpan)>>),
    VideoDisabled,
    AudioDisabled,
    IoError(Error),
    UnsupportedFrameFormat(ColorFormat),
}
展开描述

VideoEncoder 在配置、流式传输或收尾过程中发出的错误。

变体§

§

WindowsError(Error)

Windows Runtime/Win32 API 调用失败。

包装了 windows::core::Error

§

FrameSendError(SendError<Option<(VideoEncoderSource, TimeSpan)>>)

无法将视频样本送入内部流水线。

通常表示内部通道已关闭。

§

AudioSendError(SendError<Option<(AudioEncoderSource, TimeSpan)>>)

无法将音频样本送入内部流水线。

通常表示内部通道已关闭。

§

VideoDisabled

视频编码已通过 VideoSettingsBuilder::disabled 禁用。

§

AudioDisabled

音频编码已通过 AudioSettingsBuilder::disabled 禁用。

§

IoError(Error)

在文件创建或写入过程中发生 I/O 错误。

包装了 std::io::Error

§

UnsupportedFrameFormat(ColorFormat)

所提供的帧颜色格式不被该编码器路径支持。

请参阅 crate::settings::ColorFormat

Trait 实现§

源代码§

impl Debug for VideoEncoderError

源代码§

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

使用给定的格式化器格式化值。阅读更多
源代码§

impl Display for VideoEncoderError

源代码§

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

使用给定的格式化器格式化值。阅读更多
源代码§

impl Error for VideoEncoderError

源代码§

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

返回此错误的低级来源(如果有)。阅读更多
1.0.0 · 源代码§

fn description(&self) -> &str

👎自 1.42.0 起已弃用:请使用 Display 实现或 to_string()
1.0.0 · 源代码§

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

👎自 1.33.0 起已弃用:已由 Error::source 替代,后者支持向下转型
源代码§

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

🔬这是 nightly-only 实验性 API。(error_generic_member_access)
提供基于类型的上下文访问,用于错误报告。阅读更多
源代码§

impl From<Error> for VideoEncoderError

源代码§

fn from(source: Error) -> Self

从输入类型转换为此类型。
源代码§

impl From<Error> for VideoEncoderError

源代码§

fn from(source: Error) -> Self

从输入类型转换为此类型。
源代码§

impl From<SendError<Option<(AudioEncoderSource, TimeSpan)>>> for VideoEncoderError

源代码§

fn from(source: SendError<Option<(AudioEncoderSource, TimeSpan)>>) -> Self

从输入类型转换为此类型。
源代码§

impl From<SendError<Option<(VideoEncoderSource, TimeSpan)>>> for VideoEncoderError

源代码§

fn from(source: SendError<Option<(VideoEncoderSource, TimeSpan)>>) -> Self

从输入类型转换为此类型。
源代码§

impl Send for VideoEncoderError

源代码§

impl Sync for VideoEncoderError

自动 Trait 实现§

通用实现§

源代码§

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

源代码§

fn type_id(&self) -> TypeId

获取 selfTypeId阅读更多
源代码§

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

源代码§

fn borrow(&self) -> &T

从拥有的值不可变地借用。阅读更多
源代码§

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

源代码§

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

从拥有的值可变地借用。阅读更多
源代码§

impl<T> From<T> for T

源代码§

fn from(t: T) -> T

原样返回参数。

源代码§

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

源代码§

fn into(self) -> U

调用 U::from(self)

也就是说,此转换由 From<T> for U 的实现决定。

源代码§

impl<T> IntoEither for T

源代码§

fn into_either(self, into_left: bool) -> Either<Self, Self>

self 转换为 Left 变体,如果 Either<Self, Self>into_left is true. Converts self into a Right 变体,如果 Either<Self, Self> 否则。 阅读更多
源代码§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

self 转换为 Left 变体,如果 Either<Self, Self>into_left(&self) returns true. Converts self into a Right 变体,如果 Either<Self, Self> 否则。 阅读更多
源代码§

impl<T> Pointable for T

源代码§

const ALIGN: usize

指针的对齐方式。
源代码§

type Init = T

初始化器的类型。
源代码§

unsafe fn init(init: <T as Pointable>::Init) -> usize

使用给定的初始化器初始化 a。阅读更多
源代码§

unsafe fn deref<'a>(ptr: usize) -> &'a T

解引用给定的指针。阅读更多
源代码§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

可变地解引用给定的指针。阅读更多
源代码§

unsafe fn drop(ptr: usize)

释放在给定指针处指向的对象。阅读更多
源代码§

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

源代码§

fn to_string(&self) -> String

将给定的值转换为 String阅读更多
源代码§

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

源代码§

type Error = Infallible

转换失败时返回的类型。
源代码§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

执行此转换。
源代码§

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

源代码§

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

转换失败时返回的类型。
源代码§

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

执行此转换。