Skip to content

Commit

Permalink
[AVFoundation] Add support for xcdoe 13 beta 5.
Browse files Browse the repository at this point in the history
  • Loading branch information
mandel-macaque committed Aug 25, 2021
1 parent b4e828c commit 1a970ff
Show file tree
Hide file tree
Showing 13 changed files with 1,838 additions and 1,421 deletions.
69 changes: 68 additions & 1 deletion src/AVFoundation/AVTypes.cs
Expand Up @@ -328,7 +328,7 @@ public struct AVSampleCursorChunkInfo {
}
#endif

#if MONOMAC
#if MONOMAC || __MACCATALYST__

[Mac (10,15)]
[StructLayout (LayoutKind.Sequential)]
Expand All @@ -340,4 +340,71 @@ 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;
public AVCaptionUnitsType Units;

[DllImport (Constants.AVFoundationLibrary)]
static extern AVCaptionDimension AVCaptionDimensionMake (nfloat dimension, AVCaptionUnitsType units);

public static AVCaptionDimension Create (nfloat dimension, AVCaptionUnitsType units)
=> AVCaptionDimensionMake (dimension, 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);
}

#endif

}

0 comments on commit 1a970ff

Please sign in to comment.