pub trait DecodedHandle {
    type Descriptor;

    // Required methods
    fn dyn_picture<'a>(&'a self) -> Box<dyn DynHandle + 'a>;
    fn timestamp(&self) -> u64;
    fn coded_resolution(&self) -> Resolution;
    fn display_resolution(&self) -> Resolution;
    fn is_ready(&self) -> bool;
    fn sync(&self) -> Result<()>;
    fn resource(&self) -> Ref<'_, Self::Descriptor>;
}
Expand description

The handle type used by the decoder backend. The only requirement from implementors is that they give access to the underlying handle and that they can be (cheaply) cloned.

Required Associated Types§

source

type Descriptor

Memory descriptor type - the type that provides the backend memory for the decoded frame. () is a special type meaning that the backend is responsible for allocating and managing the memory itself.

Required Methods§

source

fn dyn_picture<'a>(&'a self) -> Box<dyn DynHandle + 'a>

Returns a reference to an object allowing a CPU mapping of the decoded surface.

source

fn timestamp(&self) -> u64

Returns the timestamp of the picture.

source

fn coded_resolution(&self) -> Resolution

Returns the coded resolution at the time this handle was decoded.

source

fn display_resolution(&self) -> Resolution

Returns the display resolution at the time this handle was decoded.

source

fn is_ready(&self) -> bool

Returns true if this handle has been completely decoded.

source

fn sync(&self) -> Result<()>

Wait until this handle has been completely rendered.

source

fn resource(&self) -> Ref<'_, Self::Descriptor>

Implementations on Foreign Types§

source§

impl<M: SurfaceMemoryDescriptor> DecodedHandle for Rc<RefCell<GenericBackendHandle<M>>>

§

type Descriptor = M

source§

fn coded_resolution(&self) -> Resolution

source§

fn display_resolution(&self) -> Resolution

source§

fn timestamp(&self) -> u64

source§

fn dyn_picture<'a>(&'a self) -> Box<dyn DynHandle + 'a>

source§

fn is_ready(&self) -> bool

source§

fn sync(&self) -> Result<()>

source§

fn resource(&self) -> Ref<'_, M>

Implementors§