kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder

Static kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder 

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

If set to kCFBooleanTrue, the VideoToolbox will try to allocate a hardware accelerated decoder and return an error if that isn’t possible. Setting this key automatically implies kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder – there is no need to set both and the Enable key does nothing if the Require key is set.

This key is set in the decoderSpecification passed in to VTDecompressionSessionCreate. Set it to kCFBooleanTrue to require hardware accelerated decode. If hardware acceleration is not possible, the VTDecompressionSessionCreate call will fail. This key is useful for clients that have their own software decode implementation or those that may want to configure software and hardware decode sessions differently. Hardware acceleration may be unavailable for a number of reasons. A few common cases are:

  • the machine does not have hardware acceleration capabilities
  • the requested decoding format or configuration is not supported
  • the hardware decode resources on the machine are busy

See also Apple’s documentation