#[non_exhaustive]pub enum Output {
Native,
Cpu,
Render,
}Expand description
The representation a decoder, capture, or scaler hands frames back in.
A choice, not a promise of GPU residency. Native lets a
hardware backend keep its picture where it made it, which on a software
backend is CPU memory anyway. Cpu is the portable exit: the
result is always Surface::I420, downloaded when it
had to be. #[non_exhaustive] so a narrower choice (a specific device, a
shareable handle) can be added without breaking a match.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Native
The backend’s natural representation: a GPU surface from a hardware
decoder or scaler, CPU pixels from a software one. The default, since it
never pays for a download nobody asked for. Match on each
Surface rather than assuming either.
Cpu
CPU-resident I420, whatever produced it. A hardware
decode pays a download per picture; a backend that can decode straight
to system memory does that instead. A surface with no download, such as
a non-NV12 pixel buffer, is an error (see
Surface::into_i420).
Render
What render::Renderer draws: a GPU surface it imports on this
platform stays one, and anything else is converted as Cpu
converts it, an error included. Without the render feature that is
every frame.
The renderer refuses the GPU surfaces it cannot import, so a source
feeding one asks for this instead of guessing which backend it will get.
Says nothing about the device, which may be unable to import at all:
render::output picks this only for a device that can, and
Cpu otherwise.
Trait Implementations§
impl Copy for Output
impl Eq for Output
impl StructuralPartialEq for Output
Auto Trait Implementations§
impl Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnsafeUnpin for Output
impl UnwindSafe for Output
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.