pub struct SvtAv1Encoder { /* private fields */ }Expand description
One SVT-AV1 session for one capture.
Implementations§
Source§impl SvtAv1Encoder
impl SvtAv1Encoder
Sourcepub fn new(settings: &RustCaptureSettings, rgba: bool) -> Result<Self, String>
pub fn new(settings: &RustCaptureSettings, rgba: bool) -> Result<Self, String>
Open a session on host frames; rgba names the byte order they arrive in.
pub fn codec(&self) -> Codec
pub fn is_fullcolor(&self) -> bool
pub fn is_full_range(&self) -> bool
pub fn last_reference(&self) -> Reference
Sourcepub fn holds_quantizer(&self) -> bool
pub fn holds_quantizer(&self) -> bool
Whether hold_quantizer holds a frame at its quantizer: at a constant rate where the
release takes a new target with a picture. A constant-quantizer session is cleaned up
through its own quality instead (pipeline::decide_constant_quality): a per-picture
quantizer (use_qp_file) drops the library’s key-frame and layer offsets from every
picture it names, and a cleanup key frame held that way came out at 49.6 dB where the
session’s own key frame at the paint-over quality reached 61.0.
Sourcepub fn last_quality(&self) -> Option<u32>
pub fn last_quality(&self) -> Option<u32>
The quality index the rate control last coded a frame at, held frames aside.
Sourcepub fn invalidate_reference(&mut self, frame_id: u16) -> bool
pub fn invalidate_reference(&mut self, frame_id: u16) -> bool
Leave frame frame_id and every frame after it out of the predictions where the session
names its references; refused otherwise, so the caller codes a key frame.
Sourcepub fn acknowledge_reference(&mut self, frame_id: u16, held: bool)
pub fn acknowledge_reference(&mut self, frame_id: u16, held: bool)
Every consumer holds frame frame_id, or where not held was sent it
(ReferenceSlots::acknowledge), where the session names its references.
Sourcepub fn hold_quantizer(&mut self, crf: u32)
pub fn hold_quantizer(&mut self, crf: u32)
Encode the next frame at the quantizer the quality index crf selects, leaving the
session’s own quantizer for the frame after: the cleanup of a still screen, at a constant
rate, where a held key picture is planned with a raised target (holds_quantizer). A
constant-quantizer session codes the frame at its own quantizer.
Sourcepub fn reconfigure_rate(
&mut self,
settings: &RustCaptureSettings,
) -> Result<(), String>
pub fn reconfigure_rate( &mut self, settings: &RustCaptureSettings, ) -> Result<(), String>
Apply a rate or frame-rate change: a new bitrate with the next picture where the library takes one live, since the VBV it holds spans the same time at any bitrate; anything else re-opens the encoder.
Trait Implementations§
Source§impl Drop for SvtAv1Encoder
impl Drop for SvtAv1Encoder
impl Send for SvtAv1Encoder
Auto Trait Implementations§
impl !Sync for SvtAv1Encoder
impl Freeze for SvtAv1Encoder
impl RefUnwindSafe for SvtAv1Encoder
impl Unpin for SvtAv1Encoder
impl UnsafeUnpin for SvtAv1Encoder
impl UnwindSafe for SvtAv1Encoder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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