Skip to content

[AVFoundation] APIs that take AVFileTypes are bound as string without type safe helper variants #15693

Open
@tipa

Description

@tipa

I am in the process of migrating my apps from legacy Xamarin to .NET6.
Previously, I could use AVFileType.Mpeg4 to set the property OutputFileType of AVAssetExportSession.
Now the AVFileType type has gone and I have to use AVFileTypes.Mpeg4.GetConstant() instead (correct?).

Wouldn't it make sense to then also change the OutputFileType (and SupportedFileTypes) property types of AVAssetExportSession to AVFileType? and AVFileType[] respectively?

This would then also better match the types documented by Apple: https://developer.apple.com/documentation/avfoundation/avassetexportsession/1387110-outputfiletype
For developers it is not intuitive to use a method on an enum to get the string required.

Related issue:
#8735
#15683

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThe issue or pull request is an enhancementhelp wantedThis is an issue or pull request where we request help from the community to fix or complete

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions