Open tipa opened 2 years ago
I can confirm, we have those bound as string OutputFileType
today. In other cases with smart enums we so something like:
[Export ("type")]
NSString WeakType { get; }
public AVMetadataObjectType Type {
get {
return AVMetadataObjectTypeExtensions.GetValue (WeakType);
}
So this is one area we can improve the bindings, though getting a name for the type safe version will be tricky.
I am in the process of migrating my apps from legacy Xamarin to .NET6. Previously, I could use
AVFileType.Mpeg4
to set the propertyOutputFileType
ofAVAssetExportSession
. Now theAVFileType
type has gone and I have to useAVFileTypes.Mpeg4.GetConstant()
instead (correct?).Wouldn't it make sense to then also change the
OutputFileType
(andSupportedFileTypes
) property types ofAVAssetExportSession
toAVFileType?
andAVFileType[]
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: https://github.com/xamarin/xamarin-macios/issues/8735 https://github.com/xamarin/xamarin-macios/issues/15683