Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
224 changes: 224 additions & 0 deletions src/avfoundation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5674,22 +5674,67 @@ interface AVAsset : NSCopying {
[Export ("loadMetadataForFormat:completionHandler:")]
void LoadMetadata (string format, Action<NSArray<AVMetadataItem>, NSError> completionHandler);

#if !XAMCORE_5_0
[Obsolete ("Call 'LoadTrack2' instead.")]
[Async]
[TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTrackWithTrackID:completionHandler:")]
void LoadTrack (int trackId, Action<AVCompositionTrack, NSError> completionHandler);
#endif

[Async]
[TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTrackWithTrackID:completionHandler:")]
#if XAMCORE_5_0
void LoadTrack (int trackId, AVAssetLoadTrackCallback completionHandler);
#else
[Sealed]
void LoadTrack2 (int trackId, AVAssetLoadTrackCallback completionHandler);
#endif

#if !XAMCORE_5_0
[Obsolete ("Call the 'LoadTrackWithMediaCharacteristics (..., AVAssetLoadTracksCallback)' overload instead (or the 'LoadTrackWithMediaCharacteristics2Async' method).")]
[Async]
[TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaCharacteristic:completionHandler:")]
void LoadTrackWithMediaCharacteristics (string mediaCharacteristic, Action<NSArray<AVCompositionTrack>, NSError> completionHandler);
#endif

#if XAMCORE_5_0
[Async]
#else
[Async ("LoadTrackWithMediaCharacteristics2Async")]
[Sealed]
#endif
[TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaCharacteristic:completionHandler:")]
void LoadTrackWithMediaCharacteristics (string mediaCharacteristic, AVAssetLoadTracksCallback completionHandler);

#if !XAMCORE_5_0
[Obsolete ("Call 'LoadTracksWithMediaType (..., AVAssetLoadTracksCallback)' instead (or the 'LoadTracksWithMediaType' method).")]
[Async]
[TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaType:completionHandler:")]
void LoadTracksWithMediaType (string mediaType, Action<NSArray<AVMutableCompositionTrack>, NSError> completionHandler);
#endif

#if XAMCORE_5_0
[Async]
#else
[Async ("LoadTracksWithMediaType2Async")]
[Sealed]
#endif
[TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaType:completionHandler:")]
void LoadTracksWithMediaType (string mediaType, AVAssetLoadTracksCallback completionHandler);

[Wrap ("LoadTracksWithMediaType (mediaType.GetConstant ()!, completionHandler)")]
void LoadTracksWithMediaType (AVMediaTypes mediaType, AVAssetLoadTracksCallback completionHandler);
}

delegate void AVAssetLoadTrackCallback ([NullAllowed] AVAssetTrack track, [NullAllowed] NSError error);
delegate void AVAssetLoadTracksCallback ([NullAllowed] AVAssetTrack [] tracks, [NullAllowed] NSError error);

interface IAVFragmentMinding { }

/// <summary>Interface for to support tracking whether fragments have been appended to a fragmented asset.</summary>
Expand Down Expand Up @@ -12657,22 +12702,66 @@ interface AVMovie_AVMovieTrackInspection {
[Wrap ("This.GetTracksWithMediaCharacteristic (mediaCharacteristic.GetConstant ()!)")]
AVMovieTrack [] GetTracks (AVMediaCharacteristics mediaCharacteristic);

#if !XAMCORE_5_0
[Obsolete ("Call the 'LoadTrack (..., AVMovieLoadTracksCallback)' overload instead (or the 'LoadTrack2Async' method).")]
[Async]
[NoTV, iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTrackWithTrackID:completionHandler:")]
void LoadTrack (int trackId, Action<AVMutableCompositionTrack, NSError> completionHandler);
#endif

#if XAMCORE_5_0
[Async]
#else
[Async ("LoadTrack2Async")]
#endif
[NoTV, iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTrackWithTrackID:completionHandler:")]
void LoadTrack (int trackId, AVMovieLoadTrackCallback completionHandler);

#if !XAMCORE_5_0
[Obsolete ("Call the 'LoadTracksWithMediaType (..., AVMovieLoadTracksCallback)' overload instead (or the 'LoadTracksWithMediaType2Async' method).")]
[Async]
[NoTV, iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaType:completionHandler:")]
void LoadTracksWithMediaType (string mediaType, Action<NSArray<AVMutableCompositionTrack>, NSError> completionHandler);
#endif

#if XAMCORE_5_0
[Async]
#else
[Async ("LoadTracksWithMediaType2Async")]
#endif
[NoTV, iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaType:completionHandler:")]
void LoadTracksWithMediaType (string mediaType, AVMovieLoadTracksCallback completionHandler);

[Async]
[NoTV, iOS (15, 0), MacCatalyst (15, 0)]
[Wrap ("This.LoadTracksWithMediaType (mediaType.GetConstant ()!, completionHandler)")]
void LoadTracksWithMediaType (AVMediaTypes mediaType, AVMovieLoadTracksCallback completionHandler);

#if !XAMCORE_5_0
[Obsolete ("Call the 'LoadTracksWithMediaCharacteristic (..., AVMovieLoadTracksCallback)' overload instead (or the 'LoadTracksWithMediaCharacteristic2Async' method).")]
[Async]
[NoTV, iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaCharacteristic:completionHandler:")]
void LoadTracksWithMediaCharacteristic (string mediaCharacteristic, Action<NSArray<AVMutableCompositionTrack>, NSError> completionHandler);
#endif

#if XAMCORE_5_0
[Async]
#else
[Async ("LoadTracksWithMediaCharacteristic2Async")]
#endif
[NoTV, iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaCharacteristic:completionHandler:")]
void LoadTracksWithMediaCharacteristic (string mediaCharacteristic, AVMovieLoadTracksCallback completionHandler);
}

delegate void AVMovieLoadTrackCallback ([NullAllowed] AVMovieTrack track, [NullAllowed] NSError error);
delegate void AVMovieLoadTracksCallback ([NullAllowed] AVMovieTrack [] tracks, [NullAllowed] NSError error);

[NoTV, iOS (13, 0)]
[MacCatalyst (13, 1)]
[BaseType (typeof (AVMovie))]
Expand Down Expand Up @@ -12736,20 +12825,64 @@ interface AVMutableMovie {
[Export ("interleavingPeriod", ArgumentSemantic.Assign)]
CMTime InterleavingPeriod { get; set; }

#if !XAMCORE_5_0
[Obsolete ("Call 'LoadTrack2' instead.")]
[Async]
[NoTV, iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTrackWithTrackID:completionHandler:")]
void LoadTrack (int trackId, Action<AVMovieTrack, NSError> completionHandler);
#endif

[Async]
[NoTV, iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTrackWithTrackID:completionHandler:")]
#if XAMCORE_5_0
void LoadTrack (int trackId, AVMutableMovieLoadTrackCallback completionHandler);
#else
[Sealed]
void LoadTrack2 (int trackId, AVMutableMovieLoadTrackCallback completionHandler);
#endif

#if !XAMCORE_5_0
[Obsolete ("Call the 'LoadTracksWithMediaType (..., AVMutableMovieLoadTracksCallback)' overload instead (or the 'LoadTracksWithMediaCharacteristic2Async' method).")]
[Async]
[NoTV, iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaType:completionHandler:")]
void LoadTracksWithMediaType (string mediaType, Action<NSArray<AVMovieTrack>, NSError> completionHandler);
#endif

#if XAMCORE_5_0
[Async]
#else
[Async ("LoadTracksWithMediaType2Async")]
[Sealed]
#endif
[NoTV, iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaType:completionHandler:")]
void LoadTracksWithMediaType (string mediaType, AVMutableMovieLoadTracksCallback completionHandler);

[Async]
[NoTV, iOS (15, 0), MacCatalyst (15, 0)]
[Wrap ("LoadTracksWithMediaType (mediaType.GetConstant ()!, completionHandler)")]
void LoadTracksWithMediaType (AVMediaTypes mediaType, AVMutableMovieLoadTracksCallback completionHandler);

#if !XAMCORE_5_0
[Obsolete ("Call the 'LoadTracksWithMediaCharacteristic (..., AVMutableMovieLoadTracksCallback)' overload instead (or the 'LoadTracksWithMediaCharacteristic2Async' method).")]
[Async]
[NoTV, iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaCharacteristic:completionHandler:")]
void LoadTracksWithMediaCharacteristic (string mediaCharacteristic, Action<NSArray<AVMovieTrack>, NSError> completionHandler);
#endif

#if XAMCORE_5_0
[Async]
#else
[Async ("LoadTracksWithMediaCharacteristic2Async")]
[Sealed]
#endif
[NoTV, iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaCharacteristic:completionHandler:")]
void LoadTracksWithMediaCharacteristic (string mediaCharacteristic, AVMutableMovieLoadTracksCallback completionHandler);

// inlined from the AVMutableMovie (SynchronousAssetInterface) category
[Export ("metadataForFormat:")]
Expand All @@ -12773,6 +12906,9 @@ interface AVMutableMovie {
int GetUnusedTrackId ();
}

delegate void AVMutableMovieLoadTrackCallback ([NullAllowed] AVMutableMovieTrack track, [NullAllowed] NSError error);
delegate void AVMutableMovieLoadTracksCallback ([NullAllowed] AVMutableMovieTrack [] tracks, [NullAllowed] NSError error);

[NoTV, iOS (13, 0)]
[MacCatalyst (13, 1)]
[Category]
Expand Down Expand Up @@ -12973,22 +13109,66 @@ interface AVFragmentedMovie_AVFragmentedMovieTrackInspection {
[Wrap ("This.GetTracksWithMediaCharacteristic (mediaCharacteristic.GetConstant ()!)")]
AVFragmentedMovieTrack [] GetTracks (AVMediaCharacteristics mediaCharacteristic);

#if !XAMCORE_5_0
[Obsolete ("Call the 'LoadTrack (..., AVFragmentedMovieLoadTrackCallback)' overload instead (or the 'LoadTrack2Async' method).")]
[Async]
[iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTrackWithTrackID:completionHandler:")]
void LoadTrack (int trackId, Action<AVMutableCompositionTrack, NSError> completionHandler);
#endif

#if XAMCORE_5_0
[Async]
#else
[Async ("LoadTrack2Async")]
#endif
[iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTrackWithTrackID:completionHandler:")]
void LoadTrack (int trackId, AVFragmentedMovieLoadTrackCallback completionHandler);

#if !XAMCORE_5_0
[Obsolete ("Call the 'LoadTracksWithMediaType (..., AVFragmentedMovieLoadTracksCallback)' overload instead (or the 'LoadTracksWithMediaType2Async' method).")]
[Async]
[iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaType:completionHandler:")]
void LoadTracksWithMediaType (string mediaType, Action<NSArray<AVMutableCompositionTrack>, NSError> completionHandler);
#endif

#if XAMCORE_5_0
[Async]
#else
[Async ("LoadTracksWithMediaType2Async")]
#endif
[iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaType:completionHandler:")]
void LoadTracksWithMediaType (string mediaType, AVFragmentedMovieLoadTracksCallback completionHandler);

[Async]
[iOS (15, 0), MacCatalyst (15, 0)]
[Wrap ("This.LoadTracksWithMediaType (mediaType.GetConstant ()!, completionHandler)")]
void LoadTracksWithMediaType (AVMediaTypes mediaType, AVFragmentedMovieLoadTracksCallback completionHandler);

#if !XAMCORE_5_0
[Obsolete ("Call the 'LoadTracksWithMediaCharacteristic (..., AVFragmentedMovieLoadTracksCallback)' overload instead (or the 'LoadTracksWithMediaCharacteristic2Async' method).")]
[Async]
[iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaCharacteristic:completionHandler:")]
void LoadTracksWithMediaCharacteristic (string mediaCharacteristic, Action<NSArray<AVMutableCompositionTrack>, NSError> completionHandler);
#endif

#if XAMCORE_5_0
[Async]
#else
[Async ("LoadTracksWithMediaCharacteristic2Async")]
#endif
[iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaCharacteristic:completionHandler:")]
void LoadTracksWithMediaCharacteristic (string mediaCharacteristic, AVFragmentedMovieLoadTracksCallback completionHandler);
}

delegate void AVFragmentedMovieLoadTrackCallback ([NullAllowed] AVFragmentedMovieTrack track, [NullAllowed] NSError error);
delegate void AVFragmentedMovieLoadTracksCallback ([NullAllowed] AVFragmentedMovieTrack [] tracks, [NullAllowed] NSError error);

[iOS (13, 0), NoTV]
[MacCatalyst (13, 1)]
[BaseType (typeof (AVFragmentedAssetMinder))]
Expand Down Expand Up @@ -13563,22 +13743,66 @@ interface AVComposition_AVCompositionTrackInspection {
[Wrap ("This.GetTracksWithMediaCharacteristic (mediaCharacteristic.GetConstant ()!)")]
AVCompositionTrack [] GetTracks (AVMediaCharacteristics mediaCharacteristic);

#if !XAMCORE_5_0
[Obsolete ("Call the 'LoadTrack (..., AVCompositionLoadTrackCallback)' overload instead (or the 'LoadTrack2Async' method).")]
[Async]
[TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTrackWithTrackID:completionHandler:")]
void LoadTrack (int trackId, Action<AVMutableCompositionTrack, NSError> completionHandler);
#endif

#if XAMCORE_5_0
[Async]
#else
[Async ("LoadTrack2Async")]
#endif
[TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTrackWithTrackID:completionHandler:")]
void LoadTrack (int trackId, AVCompositionLoadTrackCallback completionHandler);

#if !XAMCORE_5_0
[Obsolete ("Call the 'LoadTracksWithMediaType (..., AVCompositionLoadTracksCallback)' overload instead (or the 'LoadTracksWithMediaType' method).")]
[Async]
[TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaType:completionHandler:")]
void LoadTracksWithMediaType (string mediaType, Action<NSArray<AVMutableCompositionTrack>, NSError> completionHandler);
#endif

#if XAMCORE_5_0
[Async]
#else
[Async ("LoadTracksWithMediaType2Async")]
#endif
[TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaType:completionHandler:")]
void LoadTracksWithMediaType (string mediaType, AVCompositionLoadTracksCallback completionHandler);

[Async]
[TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)]
[Wrap ("This.LoadTracksWithMediaType (mediaType.GetConstant ()!, completionHandler)")]
void LoadTracksWithMediaType (AVMediaTypes mediaType, AVCompositionLoadTracksCallback completionHandler);

#if !XAMCORE_5_0
[Obsolete ("Call the 'LoadTracksWithMediaCharacteristic (..., AVCompositionLoadTracksCallback)' overload instead (or the 'LoadTracksWithMediaCharacteristic' method).")]
[Async]
[TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaCharacteristic:completionHandler:")]
void LoadTracksWithMediaCharacteristic (string mediaCharacteristic, Action<NSArray<AVMutableCompositionTrack>, NSError> completionHandler);
#endif

#if XAMCORE_5_0
[Async]
#else
[Async ("LoadTracksWithMediaCharacteristic2Async")]
#endif
[TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)]
[Export ("loadTracksWithMediaCharacteristic:completionHandler:")]
void LoadTracksWithMediaCharacteristic (string mediaCharacteristic, AVCompositionLoadTracksCallback completionHandler);
}

delegate void AVCompositionLoadTrackCallback ([NullAllowed] AVCompositionTrack track, [NullAllowed] NSError error);
delegate void AVCompositionLoadTracksCallback ([NullAllowed] AVCompositionTrack [] tracks, [NullAllowed] NSError error);

[MacCatalyst (13, 1)]
[BaseType (typeof (AVComposition))]
interface AVMutableComposition {
Expand Down
Loading
Loading