Struct VaapiBackend

Source
pub struct VaapiBackend<M>{ /* private fields */ }

Trait Implementations§

Source§

impl<M: SurfaceMemoryDescriptor + 'static> StatelessAV1DecoderBackend for VaapiBackend<M>

Source§

fn new_sequence( &mut self, sequence: &Rc<SequenceHeaderObu>, highest_spatial_layer: Option<u32>, ) -> StatelessBackendResult<()>

Called when a new Sequence Header OBU is parsed. The highest_spatial_layer argument refers to the maximum layer selected by the client through set_operating_point() and the scalability information present in the stream, if any.
Source§

fn new_picture( &mut self, hdr: &FrameHeaderObu, timestamp: u64, highest_spatial_layer: Option<u32>, ) -> NewPictureResult<Self::Picture>

Called when the decoder determines that a new picture was found. The backend allocates all the resources it needs to process that picture.
Source§

fn begin_picture( &mut self, picture: &mut Self::Picture, sequence: &SequenceHeaderObu, hdr: &FrameHeaderObu, reference_frames: &[Option<Self::Handle>; 8], ) -> StatelessBackendResult<()>

Called to set the global parameters of a picture.
Source§

fn decode_tile_group( &mut self, picture: &mut Self::Picture, tile_group: TileGroupObu<'_>, ) -> StatelessBackendResult<()>

Called to dispatch a decode operation to the backend.
Source§

fn submit_picture( &mut self, picture: Self::Picture, ) -> StatelessBackendResult<Self::Handle>

Called when the decoder wants the backend to finish the decoding operations for picture. At this point, decode_tile has been called for all tiles.
Source§

impl<M> StatelessDecoderBackend for VaapiBackend<M>

Source§

type Handle = Rc<RefCell<VaapiDecodedHandle<M>>>

The type that the backend returns as a result of a decode operation. This will usually be some backend-specific type with a resource and a resource pool so that said buffer can be reused for another decode operation when it goes out of scope.
Source§

type FramePool = VaSurfacePool<M>

Source§

fn frame_pool(&mut self, layer: PoolLayer) -> Vec<&mut Self::FramePool>

Returns the frame pool currently in use by the backend for layer.
Source§

fn stream_info(&self) -> Option<&StreamInfo>

Returns the current decoding parameters, as parsed from the stream.
Source§

impl<M: SurfaceMemoryDescriptor + 'static> StatelessDecoderBackendPicture<Av1> for VaapiBackend<M>

Source§

type Picture = Picture<PictureNew, PooledVaSurface<M>>

Backend-specific type representing a frame being decoded. Useful for decoders that need to render a frame in several steps and to preserve its state in between. Read more
Source§

impl<M: SurfaceMemoryDescriptor + 'static> StatelessDecoderBackendPicture<H264> for VaapiBackend<M>

Source§

type Picture = Picture<PictureNew, PooledVaSurface<M>>

Backend-specific type representing a frame being decoded. Useful for decoders that need to render a frame in several steps and to preserve its state in between. Read more
Source§

impl<M: SurfaceMemoryDescriptor + 'static> StatelessDecoderBackendPicture<H265> for VaapiBackend<M>

Source§

type Picture = VaapiH265Picture<Picture<PictureNew, PooledVaSurface<M>>>

Backend-specific type representing a frame being decoded. Useful for decoders that need to render a frame in several steps and to preserve its state in between. Read more
Source§

impl<M: SurfaceMemoryDescriptor + 'static> StatelessDecoderBackendPicture<Vp8> for VaapiBackend<M>

Source§

type Picture = Picture<PictureNew, PooledVaSurface<M>>

Backend-specific type representing a frame being decoded. Useful for decoders that need to render a frame in several steps and to preserve its state in between. Read more
Source§

impl<M: SurfaceMemoryDescriptor + 'static> StatelessDecoderBackendPicture<Vp9> for VaapiBackend<M>

Source§

type Picture = Picture<PictureNew, PooledVaSurface<M>>

Backend-specific type representing a frame being decoded. Useful for decoders that need to render a frame in several steps and to preserve its state in between. Read more
Source§

impl<M: SurfaceMemoryDescriptor + 'static> StatelessH264DecoderBackend for VaapiBackend<M>

Source§

fn new_sequence(&mut self, sps: &Rc<Sps>) -> StatelessBackendResult<()>

Called when a new SPS is parsed.
Source§

fn start_picture( &mut self, picture: &mut Self::Picture, picture_data: &PictureData, sps: &Sps, pps: &Pps, dpb: &Dpb<Self::Handle>, hdr: &SliceHeader, ) -> StatelessBackendResult<()>

Called by the decoder when starting a new frame or field.
Source§

fn decode_slice( &mut self, picture: &mut Self::Picture, slice: &Slice<'_>, sps: &Sps, pps: &Pps, ref_pic_list0: &[&DpbEntry<Self::Handle>], ref_pic_list1: &[&DpbEntry<Self::Handle>], ) -> StatelessBackendResult<()>

Called to dispatch a decode operation to the backend.
Source§

fn submit_picture( &mut self, picture: Self::Picture, ) -> StatelessBackendResult<Self::Handle>

Called when the decoder wants the backend to finish the decoding operations for picture. At this point, decode_slice has been called for all slices. Read more
Source§

fn new_picture(&mut self, timestamp: u64) -> NewPictureResult<Self::Picture>

Called when the decoder determines that a frame or field was found.
Source§

fn new_field_picture( &mut self, timestamp: u64, first_field: &Self::Handle, ) -> NewPictureResult<Self::Picture>

Called when the decoder determines that a second field was found. Indicates that the underlying BackendHandle is to be shared between the two pictures. This is so both fields decode to the same underlying resource and can thus be presented together as a single frame.
Source§

impl<M: SurfaceMemoryDescriptor + 'static> StatelessH265DecoderBackend for VaapiBackend<M>

Source§

fn new_sequence(&mut self, sps: &Sps) -> StatelessBackendResult<()>

Called when a new SPS is parsed.
Source§

fn new_picture( &mut self, coded_resolution: Resolution, timestamp: u64, ) -> NewPictureResult<Self::Picture>

Called when the decoder determines that a frame or field was found.
Source§

fn begin_picture( &mut self, picture: &mut Self::Picture, picture_data: &PictureData, sps: &Sps, pps: &Pps, dpb: &Dpb<Self::Handle>, rps: &RefPicSet<Self::Handle>, slice: &Slice<'_>, ) -> StatelessBackendResult<()>

Called by the decoder for every frame or field found.
Source§

fn decode_slice( &mut self, picture: &mut Self::Picture, slice: &Slice<'_>, sps: &Sps, _: &Pps, ref_pic_list0: &[Option<RefPicListEntry<Self::Handle>>; 16], ref_pic_list1: &[Option<RefPicListEntry<Self::Handle>>; 16], ) -> StatelessBackendResult<()>

Called to dispatch a decode operation to the backend.
Source§

fn submit_picture( &mut self, picture: Self::Picture, ) -> StatelessBackendResult<Self::Handle>

Called when the decoder wants the backend to finish the decoding operations for picture. At this point, decode_slice has been called for all slices.
Source§

impl<M: SurfaceMemoryDescriptor + 'static> StatelessVp8DecoderBackend for VaapiBackend<M>

Source§

fn new_sequence(&mut self, header: &Header) -> StatelessBackendResult<()>

Called when new stream parameters are found.
Source§

fn new_picture(&mut self, timestamp: u64) -> NewPictureResult<Self::Picture>

Called when the decoder determines that a frame or field was found.
Source§

fn submit_picture( &mut self, picture: Self::Picture, hdr: &Header, last_ref: &Option<Self::Handle>, golden_ref: &Option<Self::Handle>, alt_ref: &Option<Self::Handle>, bitstream: &[u8], segmentation: &Segmentation, mb_lf_adjust: &MbLfAdjustments, ) -> StatelessBackendResult<Self::Handle>

Called when the decoder wants the backend to finish the decoding operations for picture. Read more
Source§

impl<M: SurfaceMemoryDescriptor + 'static> StatelessVp9DecoderBackend for VaapiBackend<M>

Source§

fn new_sequence(&mut self, header: &Header) -> StatelessBackendResult<()>

Called when new stream parameters are found.
Source§

fn new_picture(&mut self, timestamp: u64) -> NewPictureResult<Self::Picture>

Allocate all resources required to process a new picture.
Source§

fn submit_picture( &mut self, picture: Self::Picture, hdr: &Header, reference_frames: &[Option<Self::Handle>; 8], bitstream: &[u8], segmentation: &[Segmentation; 8], ) -> StatelessBackendResult<Self::Handle>

Called when the decoder wants the backend to finish the decoding operations for picture. Read more
Source§

impl<Codec: StatelessCodec, M> TryFormat<Codec> for VaapiBackend<M>
where for<'a> &'a Codec::FormatInfo: VaStreamInfo, M: SurfaceMemoryDescriptor + 'static,

Source§

fn try_format( &mut self, format_info: &Codec::FormatInfo, format: DecodedFormat, ) -> Result<()>

Try to alter the decoded format.

Auto Trait Implementations§

§

impl<M> Freeze for VaapiBackend<M>

§

impl<M> !RefUnwindSafe for VaapiBackend<M>

§

impl<M> !Send for VaapiBackend<M>

§

impl<M> !Sync for VaapiBackend<M>

§

impl<M> Unpin for VaapiBackend<M>

§

impl<M> !UnwindSafe for VaapiBackend<M>

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.