pub struct VaapiEncoder {
encoder: Option<Video>,
width: u32,
height: u32,
encoder_name: String,
quality: QualityPreset,
encoded_frame_recv: Option<Receiver<EncodedVideoFrame>>,
encoded_frame_sender: Sender<EncodedVideoFrame>,
filter_graph: Option<Graph>,
}Expand description
Encoder which encodes frames using Vaapi
Fields§
§encoder: Option<Video>§width: u32§height: u32§encoder_name: String§quality: QualityPreset§encoded_frame_recv: Option<Receiver<EncodedVideoFrame>>§encoded_frame_sender: Sender<EncodedVideoFrame>§filter_graph: Option<Graph>Implementations§
Source§impl VaapiEncoder
impl VaapiEncoder
pub(crate) fn new( width: u32, height: u32, quality: QualityPreset, ) -> Result<Self>
fn create_encoder( width: u32, height: u32, encoder: &str, quality: &QualityPreset, ) -> Result<Video>
fn get_encoder_params(quality: &QualityPreset) -> Dictionary<'_>
fn create_filter_graph( encoder: &Video, width: u32, height: u32, ) -> Result<Graph>
Trait Implementations§
Source§impl Drop for VaapiEncoder
impl Drop for VaapiEncoder
Source§impl PipewireSPA for VaapiEncoder
impl PipewireSPA for VaapiEncoder
fn get_spa_definition() -> Result<Object>
Source§impl ProcessingThread for VaapiEncoder
impl ProcessingThread for VaapiEncoder
Source§impl VideoEncoder for VaapiEncoder
impl VideoEncoder for VaapiEncoder
Source§fn drain(&mut self) -> Result<()>
fn drain(&mut self) -> Result<()>
Drain the filter graph and encoder of any remaining frames it is processing
type Output = EncodedVideoFrame
fn reset(&mut self) -> Result<()>
fn drop_processor(&mut self)
fn output(&mut self) -> Option<Receiver<EncodedVideoFrame>>
fn get_encoder(&self) -> &Option<Video>
Auto Trait Implementations§
impl Freeze for VaapiEncoder
impl !RefUnwindSafe for VaapiEncoder
impl Send for VaapiEncoder
impl !Sync for VaapiEncoder
impl Unpin for VaapiEncoder
impl UnsafeUnpin for VaapiEncoder
impl !UnwindSafe for VaapiEncoder
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