pub struct HwEncoder {
pub accel_type: HwAccelType,
pub codec: String,
pub encoder_name: String,
pub available: bool,
pub max_resolution: (u32, u32),
pub features: Vec<HwFeature>,
}Expand description
Hardware encoder information.
Fields§
§accel_type: HwAccelTypeEncoder type.
codec: StringCodec name.
encoder_name: StringEncoder name.
available: boolWhether the encoder is available.
max_resolution: (u32, u32)Maximum resolution supported.
features: Vec<HwFeature>Supported features.
Implementations§
Source§impl HwEncoder
impl HwEncoder
Sourcepub fn new(
accel_type: HwAccelType,
codec: impl Into<String>,
encoder_name: impl Into<String>,
) -> Self
pub fn new( accel_type: HwAccelType, codec: impl Into<String>, encoder_name: impl Into<String>, ) -> Self
Creates a new hardware encoder info.
Sourcepub fn max_resolution(self, width: u32, height: u32) -> Self
pub fn max_resolution(self, width: u32, height: u32) -> Self
Sets the maximum resolution.
Sourcepub fn with_feature(self, feature: HwFeature) -> Self
pub fn with_feature(self, feature: HwFeature) -> Self
Adds a supported feature.
Sourcepub fn supports_feature(&self, feature: HwFeature) -> bool
pub fn supports_feature(&self, feature: HwFeature) -> bool
Checks if a feature is supported.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HwEncoder
impl RefUnwindSafe for HwEncoder
impl Send for HwEncoder
impl Sync for HwEncoder
impl Unpin for HwEncoder
impl UnsafeUnpin for HwEncoder
impl UnwindSafe for HwEncoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more