Contents

kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder

A Boolean value indicating whether hardware-accelerated encoding is required.

Declaration

let kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder: CFString

Discussion

This key is set in the encoderSpecification passed in to VTCompressionSessionCreate(allocator:width:height:codecType:encoderSpecification:imageBufferAttributes:compressedDataAllocator:outputCallback:refcon:compressionSessionOut:). Set it to kCFBooleanTrue to require hardware-accelerated encoding. If hardware acceleration is not possible, the VTCompressionSessionCreate(allocator:width:height:codecType:encoderSpecification:imageBufferAttributes:compressedDataAllocator:outputCallback:refcon:compressionSessionOut:) call fails. Setting this key automatically implies that kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder is enabled; there is no need to set both.

This key is useful for clients that have their own software encoding implementation or those that may need to configure software and hardware encode sessions differently. Hardware acceleration may be unavailable for a number of reasons:

  • 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

Encoder Selection