How to set MaxH264SliceBytes property of VTCompres

2019-04-11 20:43发布

iOS VTCompressionSession has a property which is kVTCompressionPropertyKey_MaxH264SliceBytes. However, I cannot set the kVTCompressionPropertyKey_MaxH264SliceBytes property of VTCompressionSession. It returns a -12900 error code (kVTPropertyNotSupportedErr) and the description in VTCompressionProperties.h file says "If supported by an H.264 encoder, the value limits the size in bytes of slices produced by the encoder, where possible."

So I understand that usage of this property is supported for some encoder settings. Does anybody know what that settings are?

Thanks.

1条回答
我只想做你的唯一
2楼-- · 2019-04-11 21:30

As Apple Developer Technical Support answered us: The VTCompressionSession only supports configuring the maximum slice size if the dictionary returned by VTSessionCopySupportedPropertyDictionary contains the kVTCompressionPropertyKey_MaxH264SliceBytes key.

Turns out that it is not supported by iOS 8.4 on any of the devices I've tested (iPhone 5, 6s) -> it's probably not implemented, at least not on iOS.

The technical support suggested we file an enhancement request using the Apple Bug Reporter. I filed one, and I suggest you file one as well, as Apple priorities bug reports based on the number of duplicates filed.

查看更多
登录 后发表回答