Struct StatelessEncoder

Source
pub struct StatelessEncoder<Codec, Handle, Backend>
where Backend: StatelessVideoEncoderBackend<Codec>, Codec: StatelessCodec<Backend>,
{ /* private fields */ }

Implementations§

Source§

impl<M, H> StatelessEncoder<AV1, H, VaapiBackend<M, H>>
where M: SurfaceMemoryDescriptor, H: Borrow<Surface<M>> + 'static,

Source

pub fn new_vaapi( display: Rc<Display>, config: EncoderConfig, fourcc: Fourcc, coded_size: Resolution, low_power: bool, blocking_mode: BlockingMode, ) -> EncodeResult<Self>

Source§

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

Source

pub fn new_vaapi( display: Rc<Display>, config: EncoderConfig, fourcc: Fourcc, coded_size: Resolution, low_power: bool, blocking_mode: BlockingMode, ) -> EncodeResult<Self>

Source§

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

Source

pub fn new_vaapi( display: Rc<Display>, config: EncoderConfig, fourcc: Fourcc, coded_size: Resolution, low_power: bool, blocking_mode: BlockingMode, ) -> EncodeResult<Self>

Trait Implementations§

Source§

impl<Codec, Handle, Backend> VideoEncoder<Handle> for StatelessEncoder<Codec, Handle, Backend>
where Codec: StatelessCodec<Backend>, Backend: StatelessVideoEncoderBackend<Codec> + StatelessEncoderBackendImport<Handle, Backend::Picture>, Self: StatelessEncoderExecute<Codec, Handle, Backend>,

Source§

fn tune(&mut self, tunings: Tunings) -> EncodeResult<()>

Changes dynamic parameters (aka Tunings) of the encoded stream. The change may not be effective right away. Depending on the used prediction structure, the Predictor may choose to delay the change until entire or a some part of the structure had been encoded. Read more
Source§

fn encode( &mut self, metadata: FrameMetadata, handle: Handle, ) -> EncodeResult<()>

Enqueues the frame for encoding. The implementation will drop the handle after it is no longer be needed. The encoder is not required to immediately start processing the frame and yield output bitstream. It is allowed to hold frames until certain conditions are met eg. for specified prediction structures or referencing in order to further optimize the compression rate of the bitstream.
Source§

fn drain(&mut self) -> EncodeResult<()>

Drains the encoder. This means that encoder is required to finish processing of all the frames in the internal queue and yield output bitstream by the end of the call. The output bitstream then can be polled using Self::poll function. Read more
Source§

fn poll(&mut self) -> EncodeResult<Option<CodedBitstreamBuffer>>

Polls on the encoder for the available output bitstream with compressed frames that where submitted with Self::encode. Read more

Auto Trait Implementations§

§

impl<Codec, Handle, Backend> Freeze for StatelessEncoder<Codec, Handle, Backend>
where Backend: Freeze,

§

impl<Codec, Handle, Backend> !RefUnwindSafe for StatelessEncoder<Codec, Handle, Backend>

§

impl<Codec, Handle, Backend> !Send for StatelessEncoder<Codec, Handle, Backend>

§

impl<Codec, Handle, Backend> !Sync for StatelessEncoder<Codec, Handle, Backend>

§

impl<Codec, Handle, Backend> Unpin for StatelessEncoder<Codec, Handle, Backend>
where Backend: Unpin, Handle: Unpin, <Codec as StatelessCodec<Backend>>::CodedPromise: Unpin, <Codec as StatelessCodec<Backend>>::ReferencePromise: Unpin,

§

impl<Codec, Handle, Backend> !UnwindSafe for StatelessEncoder<Codec, Handle, Backend>

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.