Struct VaapiBackend

Source
pub struct VaapiBackend<M, H>
where M: SurfaceMemoryDescriptor, H: Borrow<Surface<M>> + 'static,
{ /* private fields */ }

Implementations§

Source§

impl<M, H> VaapiBackend<M, H>

Source

pub fn new( display: Rc<Display>, va_profile: Type, fourcc: Fourcc, coded_size: Resolution, bitrate_control: u32, low_power: bool, ) -> StatelessBackendResult<Self>

Trait Implementations§

Source§

impl<M, H> StatelessAV1EncoderBackend for VaapiBackend<M, H>
where M: SurfaceMemoryDescriptor, H: Borrow<Surface<M>> + 'static,

Source§

fn encode_tile_group( &mut self, request: BackendRequest<Self::Picture, Self::Reconstructed>, ) -> StatelessBackendResult<(Self::ReconPromise, Self::CodedPromise)>

Submit a BackendRequest to the backend. This operation returns both a StatelessVideoEncoderBackend::ReconPromise and a StatelessVideoEncoderBackend::CodedPromise with resulting slice data.
Source§

impl<M, Handle> StatelessEncoderBackendImport<Handle, Handle> for VaapiBackend<M, Handle>
where M: SurfaceMemoryDescriptor, Handle: Borrow<Surface<M>>,

Source§

fn import_picture( &mut self, _metadata: &FrameMetadata, handle: Handle, ) -> StatelessBackendResult<Handle>

Imports the input handle from client and transforms into Picture
Source§

impl<M> StatelessEncoderBackendImport<M, Surface<M>> for VaapiBackend<M, Surface<M>>

Source§

fn import_picture( &mut self, meta: &FrameMetadata, handle: M, ) -> StatelessBackendResult<Surface<M>>

Imports the input handle from client and transforms into Picture
Source§

impl<M, H> StatelessH264EncoderBackend for VaapiBackend<M, H>
where M: SurfaceMemoryDescriptor, H: Borrow<Surface<M>> + 'static,

Source§

fn encode_slice( &mut self, request: BackendRequest<H, Reconstructed>, ) -> StatelessBackendResult<(Self::ReconPromise, Self::CodedPromise)>

Submit a BackendRequest to the backend. This operation returns both a StatelessVideoEncoderBackend::CodedPromise and a StatelessVideoEncoderBackend::ReconPromise with resulting slice data.
Source§

impl<M, Handle> StatelessVP9EncoderBackend for VaapiBackend<M, Handle>
where M: SurfaceMemoryDescriptor, Handle: Borrow<Surface<M>>,

Source§

impl<M, Handle> StatelessVideoEncoderBackend<AV1> for VaapiBackend<M, Handle>
where M: SurfaceMemoryDescriptor, Handle: Borrow<Surface<M>>,

Source§

type Picture = Handle

Backend’s specific representation of the input frame, transformed with import_picture. Might be a wrapper of the input handle with additional backend specific data or a copy of an input frame in internal backend’s representation.
Source§

type Reconstructed = Reconstructed

Backend’s reconstructed frame handle.
Source§

type CodedPromise = CodedOutputPromise<M, Handle>

Backend’s specific BackendPromise for bitstream, a result of StatelessCodec::Request submission.
Source§

type ReconPromise = ReadyPromise<<VaapiBackend<M, Handle> as StatelessVideoEncoderBackend<AV1>>::Reconstructed>

Source§

impl<M, H> StatelessVideoEncoderBackend<H264> for VaapiBackend<M, H>
where M: SurfaceMemoryDescriptor, H: Borrow<Surface<M>> + 'static,

Source§

type Picture = H

Backend’s specific representation of the input frame, transformed with import_picture. Might be a wrapper of the input handle with additional backend specific data or a copy of an input frame in internal backend’s representation.
Source§

type Reconstructed = Reconstructed

Backend’s reconstructed frame handle.
Source§

type CodedPromise = CodedOutputPromise<M, H>

Backend’s specific BackendPromise for bitstream, a result of StatelessCodec::Request submission.
Source§

type ReconPromise = ReadyPromise<<VaapiBackend<M, H> as StatelessVideoEncoderBackend<H264>>::Reconstructed>

Source§

impl<M, Handle> StatelessVideoEncoderBackend<VP9> for VaapiBackend<M, Handle>
where M: SurfaceMemoryDescriptor, Handle: Borrow<Surface<M>>,

Source§

type Picture = Handle

Backend’s specific representation of the input frame, transformed with import_picture. Might be a wrapper of the input handle with additional backend specific data or a copy of an input frame in internal backend’s representation.
Source§

type Reconstructed = Reconstructed

Backend’s reconstructed frame handle.
Source§

type CodedPromise = CodedOutputPromise<M, Handle>

Backend’s specific BackendPromise for bitstream, a result of StatelessCodec::Request submission.
Source§

type ReconPromise = ReadyPromise<<VaapiBackend<M, Handle> as StatelessVideoEncoderBackend<VP9>>::Reconstructed>

Auto Trait Implementations§

§

impl<M, H> Freeze for VaapiBackend<M, H>

§

impl<M, H> !RefUnwindSafe for VaapiBackend<M, H>

§

impl<M, H> !Send for VaapiBackend<M, H>

§

impl<M, H> !Sync for VaapiBackend<M, H>

§

impl<M, H> Unpin for VaapiBackend<M, H>
where M: Unpin, H: Unpin,

§

impl<M, H> !UnwindSafe for VaapiBackend<M, H>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.