pub struct HardwareEncodeCapability {Show 18 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,
pub default_channel_depth: 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 selects this path; one
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. Backends needing a cross-device copy are 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 with max_l1_references zero means no B
pictures. None when not reported.
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 (constant
quantizer), and on D3D12 qvbr.
plane_ring_slots: usizePlane-texture pairs the renderer packs into, allocated for the whole session. Zero when it packs into the surfaces themselves.
handoff_retained_surfaces: usizeSurfaces the handoff may still hold after the host released them (a copying backend keeps each until its slot comes round). Allocated on top of the host’s, so budgets count them.
codec_retained_surfaces: usizeSurfaces the encoder holds after accepting them, until consumed. Also on top of the host’s.
default_channel_depth: usizeThe default encode channel depth (ALPHA2_ENCODE_QUEUE_DEPTH overrides): the smallest depth
within 3 % of the best measured per-frame time on this backend.
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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more