-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Avfoundation] Add support for xcode14.1 #16408
base: xcode14.1
Are you sure you want to change the base?
[Avfoundation] Add support for xcode14.1 #16408
Conversation
|
src/CoreMidi/MidiStructs.cs
Outdated
|
||
#if NET | ||
[SupportedOSPlatform ("ios14.0")] | ||
[SupportedOSPlatform ("maccatalyst")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need, macCatalyst min version is 14.0
@@ -8692,6 +8970,25 @@ interface AVMutableVideoComposition { | |||
[Export ("sourceSampleDataTrackIDs", ArgumentSemantic.Copy)] | |||
[BindAs (typeof (int[]))] | |||
NSNumber[] SourceSampleDataTrackIds { get; set; } | |||
|
|||
[Async] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure we want Async here, is the completion handler really something that needs to be waited for in this context? Since it is a Create method, same for the following ones
|
||
[NoWatch, NoTV, MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] | ||
[Export ("supportedMaxPhotoDimensions")] | ||
NSValue[] SupportedMaxPhotoDimensions { get; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BindAs maybe? Any ideas on the wrapped types? Same for the one below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mac attribute mostly
interface AVMutableMovie_SynchronousAssetInterface | ||
{ | ||
[Export ("metadataForFormat:")] | ||
AVMetadataItem[] GetMetadataForFormat (string format); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AVMetadataItem[] GetMetadataForFormat (string format); | |
AVMetadataItem[] GetMetadata (string format); |
#if !COREBUILD | ||
public MidiProtocolId protocol; | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a couple of issues here:
- Structs must have the same size between COREBUILD and !COREBUILD.
- Public API must not start with a lower-cased letter.
- It's often best to have private fields and public property accessors for structs, because it makes things easier if Apple changes their structs, and also if we need to adjust due to marshalling reasons (which is even more important for this struct, since it contains a variable-length array).
So something like this instead.
int protocol;
...
#if !COREBUILD
public MidiProtocolId Protocol {
get => (MidiProtocolId) protocol;
set => protocol = (int) value;
}
#endif
[iOS (14,0), Mac (11,0), Watch (8,0), TV (14,0)] | ||
#endif | ||
[StructLayout (LayoutKind.Sequential)] | ||
public struct MidiEventPacket |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as for previous struct: private fields + public accessors.
#if MONOMAC | ||
[TV (16,0), NoWatch, Mac (13,0), iOS (16,0), MacCatalyst (16,0)] | ||
[Export ("sendMIDIEventList:")] | ||
void SendMidiEventList (MidiEventList eventList); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs manual bindings because MidiEventList
is a variable-length struct.
CMTime GetSamplePresentationTime (CMTime trackTime); | ||
|
||
[Export ("metadataForFormat:")] | ||
AVMetadataItem [] GetMetadataForFormat (NSString format); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AVMetadataItem [] GetMetadataForFormat (NSString format); | |
AVMetadataItem [] GetMetadata (NSString format); |
AVMetadataItem [] GetMetadata (AVMetadataFormat format); | ||
|
||
[Export ("associatedTracksOfType:")] | ||
AVAssetTrack [] GetAssociatedTracks (NSString avAssetTrackTrackAssociationType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look like this can be strongly typed to AVAssetTrackTrackAssociation
somehow.
AVMetadataItem [] GetMetadata (AVMetadataFormat format); | ||
|
||
[Export ("associatedTracksOfType:")] | ||
AVAssetTrack [] GetAssociatedTracks (NSString avAssetTrackTrackAssociationType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same: strongly typed to AVAssetTrackTrackAssociation
CMTime GetSamplePresentationTime (CMTime trackTime); | ||
|
||
[Export ("metadataForFormat:")] | ||
AVMetadataItem[] GetMetadataForFormat (string format); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AVMetadataItem[] GetMetadataForFormat (string format); | |
AVMetadataItem[] GetMetadata (string format); |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Alex Soto <alex@alexsoto.me> Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com> Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
interface AVComposition_SynchronousAssetInterface | ||
{ | ||
[Export ("metadataForFormat:")] | ||
AVMetadataItem[] GetMetadataForFormat (NSString format); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same - change to `GetMetadata (NSString format);
[Async] | ||
[Watch (9,0), TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)] | ||
[Export ("insertTimeRange:ofAsset:atTime:completionHandler:")] | ||
void InsertTimeRange (CMTimeRange timeRange, AVAsset asset, CMTime startTime, Action<NSError> completionHandler); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be Insert
instead of InsertTimeRange
?
AVTimedMetadataGroup[] GetChapterMetadataGroups (NSLocale locale, [NullAllowed] string[] commonKeys); | ||
|
||
[Export ("chapterMetadataGroupsBestMatchingPreferredLanguages:")] | ||
AVTimedMetadataGroup[] GetChapterMetadataGroupsBestMatchingPreferredLanguages (string[] preferredLanguages); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be GetChapterMetadataGroupsBestMatching
?
|
||
[TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16,0)] | ||
[Field ("AVVideoTransferFunction_Linear")] | ||
NSString AVVideoTransferFunction_Linear { get; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want the underscore?
NativeHandle Constructor (uint channel, AVMidiControlChangeMessageType messageType, uint value); | ||
|
||
[Export ("messageType")] | ||
AVMidiControlChangeMessageType MessageType { get; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why MessageType
here and Type
in AVMidiMetaEvent
?
❗ API diff for current PR / commit (Breaking changes)Legacy Xamarin (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
.NET (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
❗ API diff vs stable (Breaking changes)Legacy Xamarin (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
.NET (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
❌ [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) failed ❌Failed tests are:
Pipeline on Agent |
🔥 [CI Build] Test results 🔥Test results❌ Tests failed on VSTS: simulator tests 0 tests crashed, 8 tests failed, 215 tests passed. Failures❌ bcl tests
Html Report (VSDrops) Download ❌ cecil tests
Html Report (VSDrops) Download ❌ dotnettests tests
Html Report (VSDrops) Download ❌ xtro tests
Html Report (VSDrops) Download Successes✅ fsharp: All 7 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
No description provided.