-
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 xcode 13 beta 5. #12550
Merged
mandel-macaque
merged 20 commits into
xamarin:main
from
mandel-macaque:avfoundation-xcode13-beta5
Sep 15, 2021
Merged
Changes from 10 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
1a970ff
[AVFoundation] Add support for xcdoe 13 beta 5.
mandel-macaque 87c642c
Add missing using.
mandel-macaque aaa698a
Generator crashes when we use support os with no version.
mandel-macaque 1ee4425
Address reviews.
mandel-macaque 4fdca6e
Apply suggestions from code review
mandel-macaque adfeed7
Update src/avfoundation.cs
mandel-macaque a320726
Merge branch 'main' into avfoundation-xcode13-beta5
mandel-macaque bc8c875
Merge branch 'avfoundation-xcode13-beta5' of github.com:mandel-macaqu…
mandel-macaque b1dcdac
Fix compilation after applying comments.
mandel-macaque 4d54edf
Fix intro tests by removing not present selector.
mandel-macaque c0e1067
Address reviews.
mandel-macaque 2f84fd6
Merge branch 'main' into avfoundation-xcode13-beta5
mandel-macaque 9457b4f
Fix issue with the catalyst intro tests.
mandel-macaque 5c7d5c3
Merge branch 'main' into avfoundation-xcode13-beta5
mandel-macaque ebf0fd3
Fix API after xtro was fixed.
mandel-macaque f8cd240
Merge branch 'main' into avfoundation-xcode13-beta5
mandel-macaque b9c67d8
Address reviews.
mandel-macaque 9690ab2
Simplify preprocessor #if
mandel-macaque 656b890
Merge branch 'main' into avfoundation-xcode13-beta5
mandel-macaque de398b7
Remove not needed attrs.
mandel-macaque File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
#if !COREBUILD | ||
using OpenTK; | ||
#endif | ||
|
||
using System.Runtime.Versioning; | ||
using CoreGraphics; | ||
using ObjCRuntime; | ||
|
||
|
@@ -328,7 +328,7 @@ public struct AVSampleCursorChunkInfo { | |
} | ||
#endif | ||
|
||
#if MONOMAC | ||
#if MONOMAC || __MACCATALYST__ | ||
|
||
[Mac (10,15)] | ||
[StructLayout (LayoutKind.Sequential)] | ||
|
@@ -340,4 +340,76 @@ public struct AVSampleCursorAudioDependencyInfo { | |
} | ||
#endif | ||
|
||
#if MONOMAC | ||
|
||
#if !NET | ||
[NoWatch, NoTV, NoiOS, Mac (12,0), NoMacCatalyst] | ||
#else | ||
[UnsupportedOSPlatform ("ios"), UnsupportedOSPlatform ("tvos"), UnsupportedOSPlatform ("maccatalyst"), SupportedOSPlatform ("macos12.0")] | ||
#endif | ||
[Native] | ||
public enum AVCaptionUnitsType : long { | ||
Unspecified = 0, | ||
Cells, | ||
Percent, | ||
} | ||
|
||
#if !NET | ||
[NoWatch, NoTV, NoiOS, Mac (12,0), NoMacCatalyst] | ||
#else | ||
[UnsupportedOSPlatform ("ios"), UnsupportedOSPlatform ("tvos"), UnsupportedOSPlatform ("maccatalyst"), SupportedOSPlatform ("macos12.0")] | ||
#endif | ||
[StructLayout (LayoutKind.Sequential)] | ||
public struct AVCaptionDimension { | ||
public nfloat Value; | ||
nuint units; | ||
|
||
public AVCaptionUnitsType Units { | ||
get => (AVCaptionUnitsType) (long) units; | ||
set => units = (nuint) (long) value; | ||
} | ||
|
||
[DllImport (Constants.AVFoundationLibrary)] | ||
static extern AVCaptionDimension AVCaptionDimensionMake (nfloat dimension, /* AVCaptionUnitsType */ nuint units); | ||
|
||
public static AVCaptionDimension Create (nfloat dimension, AVCaptionUnitsType units) | ||
=> AVCaptionDimensionMake (dimension, (nuint) (long)units); | ||
} | ||
|
||
#if !NET | ||
[NoWatch, NoTV, NoiOS, Mac (12,0), NoMacCatalyst] | ||
#else | ||
[UnsupportedOSPlatform ("ios"), UnsupportedOSPlatform ("tvos"), UnsupportedOSPlatform ("maccatalyst"), SupportedOSPlatform ("macos12.0")] | ||
#endif | ||
[StructLayout (LayoutKind.Sequential)] | ||
public struct AVCaptionPoint { | ||
public AVCaptionDimension X; | ||
public AVCaptionDimension Y; | ||
|
||
[DllImport (Constants.AVFoundationLibrary)] | ||
static extern AVCaptionPoint AVCaptionPointMake (AVCaptionDimension x, AVCaptionDimension y); | ||
|
||
public static AVCaptionPoint Create (AVCaptionDimension x, AVCaptionDimension y) | ||
=> AVCaptionPointMake (x,y); | ||
} | ||
|
||
#if !NET | ||
[NoWatch, NoTV, NoiOS, Mac (12,0), NoMacCatalyst] | ||
#else | ||
[UnsupportedOSPlatform ("ios"), UnsupportedOSPlatform ("tvos"), UnsupportedOSPlatform ("maccatalyst"), SupportedOSPlatform ("macos12.0")] | ||
#endif | ||
[StructLayout (LayoutKind.Sequential)] | ||
public struct AVCaptionSize { | ||
public AVCaptionDimension Width; | ||
public AVCaptionDimension Height; | ||
|
||
[DllImport (Constants.AVFoundationLibrary)] | ||
static extern AVCaptionSize AVCaptionSizeMake (AVCaptionDimension width, AVCaptionDimension height); | ||
|
||
public static AVCaptionSize Create (AVCaptionDimension width, AVCaptionDimension height) | ||
=> AVCaptionSizeMake (width, height); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||
} | ||
|
||
#endif | ||
|
||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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