pub struct NvencEncoder { /* private fields */ }Available on 64-bit and crate feature
nvidia and (Linux or Windows) only.Expand description
A hardware HEVC encoder on an NVIDIA GPU’s NVENC engine: RGBA frames in,
an hvc1 MP4 out.
Implementations§
Source§impl NvencEncoder
impl NvencEncoder
Sourcepub fn new(
width: u32,
height: u32,
fps: u32,
rate: NvencRate,
keyframe_secs: u32,
realtime: bool,
) -> Result<Self, String>
pub fn new( width: u32, height: u32, fps: u32, rate: NvencRate, keyframe_secs: u32, realtime: bool, ) -> Result<Self, String>
Open an encoder for width × height frames at fps, rate-controlled
by rate, a keyframe every keyframe_secs seconds. realtime picks
the low-latency tuning and a faster preset; otherwise high quality.
Trait Implementations§
Source§impl Drop for NvencEncoder
impl Drop for NvencEncoder
Auto Trait Implementations§
impl !Send for NvencEncoder
impl !Sync for NvencEncoder
impl Forget for NvencEncoder
impl Freeze for NvencEncoder
impl Move for NvencEncoder
impl RefUnwindSafe for NvencEncoder
impl Unpin for NvencEncoder
impl UnsafeUnpin for NvencEncoder
impl UnwindSafe for NvencEncoder
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> 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