Summary
VTCompressionProperties.LogTransferFunction is currently bound as a plain string property (backed by kVTCompressionPropertyKey_LogTransferFunction). We should add a strongly typed version using CMFormatDescriptionLogTransferFunction (already defined in CoreMedia), following the same pattern used elsewhere in the codebase — renaming the existing string property to WeakLogTransferFunction and adding a new strongly typed LogTransferFunction property.
Background
The property was added in PR #25990 ([VideoToolbox] Update bindings up to Xcode 27 Beta 3). At the time, it was left as a plain string because other values beyond those in CMFormatDescriptionLogTransferFunction are allowed. A follow-up was requested by @rolfbjarne.
Proposed Change
In src/videotoolbox.cs, on the VTCompressionProperties interface:
// Current (plain string):
[TV (27, 0), MacCatalyst (27, 0), Mac (27, 0), iOS (27, 0)]
[Export ("LogTransferFunction")]
string LogTransferFunction { get; set; }
// Proposed (rename existing to Weak, add strongly typed):
[TV (27, 0), MacCatalyst (27, 0), Mac (27, 0), iOS (27, 0)]
[Export ("LogTransferFunction")]
[Internal]
string WeakLogTransferFunction { get; set; }
[TV (27, 0), MacCatalyst (27, 0), Mac (27, 0), iOS (27, 0)]
[Wrap ("WeakLogTransferFunction")]
CMFormatDescriptionLogTransferFunction LogTransferFunction { get; set; }
References
Summary
VTCompressionProperties.LogTransferFunctionis currently bound as a plainstringproperty (backed bykVTCompressionPropertyKey_LogTransferFunction). We should add a strongly typed version usingCMFormatDescriptionLogTransferFunction(already defined in CoreMedia), following the same pattern used elsewhere in the codebase — renaming the existingstringproperty toWeakLogTransferFunctionand adding a new strongly typedLogTransferFunctionproperty.Background
The property was added in PR #25990 ([VideoToolbox] Update bindings up to Xcode 27 Beta 3). At the time, it was left as a plain
stringbecause other values beyond those inCMFormatDescriptionLogTransferFunctionare allowed. A follow-up was requested by @rolfbjarne.Proposed Change
In
src/videotoolbox.cs, on theVTCompressionPropertiesinterface:References
CMFormatDescriptionLogTransferFunctionis defined insrc/coremedia.csCMFormatDescriptionin CoreMedia uses the same weak/strong convention for log transfer function values