Static kVTCompressionPropertyKey_DataRateLimits

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

Zero, one or two hard limits on data rate.

Each hard limit is described by a data size in bytes and a duration in seconds, and requires that the total size of compressed data for any contiguous segment of that duration (in decode time) must not exceed the data size. By default, no data rate limits are set. The property is a CFArray of an even number of CFNumbers, alternating between bytes and seconds. Note that data rate settings only have an effect when timing information is provided for source frames, and that some codecs do not support limiting to specified data rates.

When both kVTCompressionPropertyKey_DataRateLimits and kVTCompressionPropertyKey_AverageBitRate are supported, it is recommended that kVTCompressionPropertyKey_AverageBitRate be set when kVTCompressionPropertyKey_DataRateLimits is set. If kVTCompressionPropertyKey_AverageBitRate is not specified, an overall average bit rate target will be selected at a safe margin below the kVTCompressionPropertyKey_DataRateLimits target, so that regional overshoot in the encoding will not exceed the kVTCompressionPropertyKey_DataRateLimits. The overall average bitrate target generated from kVTCompressionPropertyKey_DataRateLimits in the absence of kVTCompressionPropertyKey_AverageBitRate may not be ideal for all scenarios. Encoding is more likely to undershoot a requested kVTCompressionPropertyKey_AverageBitRate if the specified target is too close to a hard limit specified by kVTCompressionPropertyKey_DataRateLimits.

See also Apple’s documentation