Struct cros_codecs::utils::vaapi::VaapiBackend
source · [−]pub(crate) struct VaapiBackend<StreamData>where
for<'a> &'a StreamData: StreamInfo,{
pub(crate) metadata_state: StreamMetadataState,
pub(crate) negotiation_status: NegotiationStatus<Box<StreamData>>,
pub(crate) pending_jobs: VecDeque<Rc<RefCell<GenericBackendHandle>>>,
}
Fields
metadata_state: StreamMetadataState
The metadata state. Updated whenever the decoder reads new data from the stream.
negotiation_status: NegotiationStatus<Box<StreamData>>
The negotiation status
pending_jobs: VecDeque<Rc<RefCell<GenericBackendHandle>>>
The FIFO for all pending pictures, in the order they were submitted.
Implementations
sourceimpl<StreamData> VaapiBackend<StreamData>where
for<'a> &'a StreamData: StreamInfo,
impl<StreamData> VaapiBackend<StreamData>where
for<'a> &'a StreamData: StreamInfo,
pub(crate) fn new(display: Rc<Display>) -> Self
pub(crate) fn process_picture(
&mut self,
picture: Picture<PictureNew>,
block: BlockingMode
) -> StatelessBackendResult<<Self as VideoDecoderBackend>::Handle>
fn build_va_decoded_handle(
&self,
picture: Rc<RefCell<GenericBackendHandle>>,
timestamp: u64
) -> <Self as VideoDecoderBackend>::Handle
Trait Implementations
sourceimpl<StreamData> VideoDecoderBackend for VaapiBackend<StreamData>where
for<'a> &'a StreamData: StreamInfo,
impl<StreamData> VideoDecoderBackend for VaapiBackend<StreamData>where
for<'a> &'a StreamData: StreamInfo,
type Handle = DecodedHandle
type Handle = DecodedHandle
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. Read more
sourcefn coded_resolution(&self) -> Option<Resolution>
fn coded_resolution(&self) -> Option<Resolution>
Returns the current coded resolution of the bitstream being processed.
This may be None if we have not read the stream parameters yet. Read more
sourcefn display_resolution(&self) -> Option<Resolution>
fn display_resolution(&self) -> Option<Resolution>
Returns the current display resolution of the bitstream being processed.
This may be None if we have not read the stream parameters yet. Read more
sourcefn num_resources_total(&self) -> usize
fn num_resources_total(&self) -> usize
Gets the number of output resources allocated by the backend.
sourcefn num_resources_left(&self) -> usize
fn num_resources_left(&self) -> usize
Gets the number of output resources left in the backend.
sourcefn format(&self) -> Option<DecodedFormat>
fn format(&self) -> Option<DecodedFormat>
Gets the chosen format. This is set to a default after the decoder reads
enough stream metadata from the bitstream. Some buffers need to be
processed first before the default format can be set. Read more
sourcefn try_format(&mut self, format: DecodedFormat) -> VideoDecoderResult<()>
fn try_format(&mut self, format: DecodedFormat) -> VideoDecoderResult<()>
Try altering the decoded format.
sourcefn poll(
&mut self,
blocking_mode: BlockingMode
) -> VideoDecoderResult<VecDeque<Self::Handle>>
fn poll(
&mut self,
blocking_mode: BlockingMode
) -> VideoDecoderResult<VecDeque<Self::Handle>>
Poll for any ready pictures.
block
dictates whether this call should
block on the operation or return immediately. Read moresourcefn handle_is_ready(&self, handle: &Self::Handle) -> bool
fn handle_is_ready(&self, handle: &Self::Handle) -> bool
Whether the handle is ready for presentation. The decoder will check
this before returning the handle to clients. Read more
sourcefn block_on_handle(
&mut self,
handle: &Self::Handle
) -> StatelessBackendResult<()>
fn block_on_handle(
&mut self,
handle: &Self::Handle
) -> StatelessBackendResult<()>
Block on handle
handle
.Auto Trait Implementations
impl<StreamData> !RefUnwindSafe for VaapiBackend<StreamData>
impl<StreamData> !Send for VaapiBackend<StreamData>
impl<StreamData> !Sync for VaapiBackend<StreamData>
impl<StreamData> Unpin for VaapiBackend<StreamData>
impl<StreamData> !UnwindSafe for VaapiBackend<StreamData>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more