跳到主要内容

VideoSettingsBuilder

搜索

Struct VideoSettingsBuilder 

源代码
pub struct VideoSettingsBuilder { /* private fields */ }
展开描述

用于配置视频编码器设置的构建器。

Implementations§

源代码§

impl VideoSettingsBuilder

源代码

pub const fn new(width: u32, height: u32) -> Self

使用必需的尺寸参数构造一个新的 VideoSettingsBuilder

默认值:

源代码

pub const fn sub_type(self, sub_type: VideoSettingsSubType) -> Self

设置视频编解码器/子类型(例如 VideoSettingsSubType::HEVC)。

源代码

pub const fn bitrate(self, bitrate: u32) -> Self

设置目标比特率(单位:比特/秒)。

源代码

pub const fn width(self, width: u32) -> Self

设置目标帧宽度(单位:像素)。

源代码

pub const fn height(self, height: u32) -> Self

设置目标帧高度(单位:像素)。

源代码

pub const fn frame_rate(self, frame_rate: u32) -> Self

设置目标帧率(分子;分母固定为 1)。

源代码

pub const fn pixel_aspect_ratio(self, par: (u32, u32)) -> Self

以(分子,分母)形式设置像素宽高比。

源代码

pub const fn disabled(self, disabled: bool) -> Self

禁用或启用视频编码。

true 时,发送帧的调用仍会成功,但不会产生视频样本。

自动 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, 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>

执行此转换。