Skip to content

[VideoToolbox] Add strongly typed LogTransferFunction to VTCompressionProperties #26006

Description

@dalexsoto

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions