Static kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder

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

If set to kCFBooleanTrue, only use hardware encode and return an error if this isn’t possible. Setting this key automatically implies kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder – 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 encoderSpecification passed in to VTCompressionSessionCreate. Set it to kCFBooleanTrue to require hardware accelerated encode. If hardware acceleration is not possible, the VTCompressionSessionCreate call will fail. This key is useful for clients that have their own software encode implementation or those that may want to configure software and hardware encode 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 encoding format or encoding configuration is not supported
  • the hardware encoding resources on the machine are busy

See also Apple’s documentation