kVTVideoDecoderSpecification_PreferredDecoderGPURegistryID

Static kVTVideoDecoderSpecification_PreferredDecoderGPURegistryID 

Source
pub unsafe static kVTVideoDecoderSpecification_PreferredDecoderGPURegistryID: &'static CFString
Available on crate feature VTDecompressionProperties only.
Expand description

If set, the VideoToolbox will try to use a hardware decoder running on the GPU specified by the provided GPU registryID. If the GPU does not support decode of the specified format, the VideoToolbox will fall back to alternate decoders.

This specification implies kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder. A separate hardware decode opt-in is not required. If both kVTVideoDecoderSpecification_PreferredDecoderGPURegistryID and kVTVideoDecoderSpecification_RequiredDecoderGPURegistryID are set, kVTVideoDecoderSpecification_PreferredDecoderGPURegistryID will be ignored. This specification can be used in conjunction with kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder to prevent a fallback to software decode. The GPU registryID can be obtained from a MTLDevice using [MTLDevice registryID] or can be obtained from OpenGL or OpenCL. This option can only be used to specify a GPU registryID corresponding to a removable GPU (eGPU).

See also Apple’s documentation