pub struct HardwareEncodeCapability {Show 17 fields
pub backend: HardwareEncodeBackend,
pub encoder: &'static str,
pub codec: NativeVideoCodec,
pub gpu_input_only: bool,
pub input_layout: EncoderInputLayout,
pub handoff: EncoderInputHandoff,
pub shares_renderer_device: bool,
pub minimum: (u32, u32),
pub maximum: (u32, u32),
pub granularity: (u32, u32),
pub max_p_picture_l0_references: Option<u32>,
pub max_b_picture_l0_references: Option<u32>,
pub max_l1_references: Option<u32>,
pub rate_control_modes: Vec<&'static str>,
pub plane_ring_slots: usize,
pub handoff_retained_surfaces: usize,
pub codec_retained_surfaces: usize,
}Expand description
What one hardware encoder accepts on this device, read from the device.
Fields§
§backend: HardwareEncodeBackendThe native API the session drives.
encoder: &'static strThe FFmpeg encoder a session opens.
codec: NativeVideoCodecThe codec it encodes.
gpu_input_only: boolWhether the encoder takes GPU frames only. Pinning such an encoder is
asking for this path; an encoder the readback path can also feed
(h264_videotoolbox) can be pinned on either.
input_layout: EncoderInputLayoutThe surface layout it takes.
handoff: EncoderInputHandoffHow a packed frame reaches its surface.
Whether the encoder runs on the renderer’s own device. A backend that would need a copy between devices is not offered as GPU-resident.
minimum: (u32, u32)Smallest accepted coded width and height.
maximum: (u32, u32)Largest accepted coded width and height.
granularity: (u32, u32)Granularity the output size is aligned up to before the limits apply.
max_p_picture_l0_references: Option<u32>References a P picture may use, when the device reports it.
max_b_picture_l0_references: Option<u32>Forward references a B picture may use; zero together with
max_l1_references means no B pictures. None when the device does
not report it.
max_l1_references: Option<u32>Backward references a B picture may use, when the device reports it.
rate_control_modes: Vec<&'static str>The rate-control modes the device reports: cbr, vbr, disabled
(a constant quantizer), and on D3D12 qvbr.
plane_ring_slots: usizePlane-texture pairs the renderer packs into, allocated for the whole session whatever the pipeline depth. Zero when it packs into the surfaces themselves.
handoff_retained_surfaces: usizeSurfaces the handoff may still hold after the host has let go of them: a copying backend keeps each surface it copied into until its slot comes round again. They are allocated on top of the frames the host holds, so a budget has to count them.
codec_retained_surfaces: usizeSurfaces the encoder itself still holds after it has accepted them, until it has consumed them. Also allocated on top of the host’s.
Implementations§
Source§impl HardwareEncodeCapability
impl HardwareEncodeCapability
Sourcepub const fn retained_surfaces(&self) -> usize
pub const fn retained_surfaces(&self) -> usize
Every surface the pool may hold beyond those the host has leased.
Trait Implementations§
Source§impl Clone for HardwareEncodeCapability
impl Clone for HardwareEncodeCapability
Source§impl Debug for HardwareEncodeCapability
impl Debug for HardwareEncodeCapability
impl Eq for HardwareEncodeCapability
Source§impl PartialEq for HardwareEncodeCapability
impl PartialEq for HardwareEncodeCapability
impl StructuralPartialEq for HardwareEncodeCapability
Auto Trait Implementations§
impl Freeze for HardwareEncodeCapability
impl RefUnwindSafe for HardwareEncodeCapability
impl Send for HardwareEncodeCapability
impl Sync for HardwareEncodeCapability
impl Unpin for HardwareEncodeCapability
impl UnsafeUnpin for HardwareEncodeCapability
impl UnwindSafe for HardwareEncodeCapability
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.