pub struct VideoSettingsBuilder { /* private fields */ }展开描述
用于配置视频编码器设置的构建器。
实现§
源代码§impl VideoSettingsBuilder
impl VideoSettingsBuilder
源代码pub const fn new(width: u32, height: u32) -> Self
pub const fn new(width: u32, height: u32) -> Self
使用必需的尺寸参数构造一个新的 VideoSettingsBuilder。
默认值:
- Subtype:
VideoSettingsSubType::HEVC - 比特率:15 Mbps
- 帧率:60 fps
- 像素宽高比:1:1
- 已禁用:false
源代码pub const fn sub_type(self, sub_type: VideoSettingsSubType) -> Self
pub const fn sub_type(self, sub_type: VideoSettingsSubType) -> Self
设置视频编解码器/子类型(例如 VideoSettingsSubType::HEVC)。
源代码pub const fn frame_rate(self, frame_rate: 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 pixel_aspect_ratio(self, par: (u32, u32)) -> Self
以(分子,分母)形式设置像素宽高比。
自动 Trait 实现§
impl Freeze for VideoSettingsBuilder
impl RefUnwindSafe for VideoSettingsBuilder
impl Send for VideoSettingsBuilder
impl Sync for VideoSettingsBuilder
impl Unpin for VideoSettingsBuilder
impl UnsafeUnpin for VideoSettingsBuilder
impl UnwindSafe for VideoSettingsBuilder
通用实现§
源代码§impl<T> IntoEither for T
impl<T> IntoEither for T
源代码§fn into_either(self, into_left: bool) -> Either<Self, Self>
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>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
将
self 转换为 Left 变体,如果 Either<Self, Self>
当 into_left(&self) returns true.
Converts self into a Right 变体,如果 Either<Self, Self>
否则。 阅读更多