Skip to content
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

[ScreeCaptureKit] Add support for Xcode 14 beta 4. #15647

Merged
Merged
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
25 changes: 25 additions & 0 deletions src/screencapturekit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ enum SCStreamErrorCode : long {
NoDisplayList = -3814,
NoCaptureSource = -3815,
RemovingStream = -3816,
UserStopped = -3817,
FailedToStartAudioCapture = -3818,
FailedToStopAudioCapture = -3819,
}

[NoiOS, NoTV, NoWatch, Mac (12,3), NoMacCatalyst]
Expand All @@ -58,6 +61,8 @@ enum SCFrameStatus : long {
[Native]
enum SCStreamOutputType : long {
Screen,
[Mac (13,0)]
Audio,
}

[NoiOS, NoTV, NoWatch, Mac (12,3), NoMacCatalyst]
Expand Down Expand Up @@ -244,6 +249,22 @@ interface SCStreamConfiguration {
[Advice ("Use the constants inside 'CGColorSpaceNames' class.")]
[Export ("colorSpaceName", ArgumentSemantic.Assign)]
NSString WeakColorSpaceName { get; set; }

[Mac (13, 0)]
[Export ("capturesAudio")]
bool CapturesAudio { get; set; }

[Mac (13, 0)]
[Export ("sampleRate")]
nint SampleRate { get; set; }

[Mac (13, 0)]
[Export ("channelCount")]
nint ChannelCount { get; set; }

[Mac (13, 0)]
[Export ("excludesCurrentProcessAudio")]
bool ExcludesCurrentProcessAudio { get; set; }
}

[NoiOS, NoTV, NoWatch, Mac (12,3), NoMacCatalyst]
Expand Down Expand Up @@ -275,6 +296,10 @@ interface SCStream {
// No Async even on Swift and it makes sense, these are callback APIs.
[Export ("stopCaptureWithCompletionHandler:")]
void StopCapture ([NullAllowed] Action<NSError> completionHandler);

[Mac (13, 0)]
[Export ("synchronizationClock")]
CMClock SynchronizationClock { [return: NullAllowed] get; }
}

interface ISCStreamDelegate {}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ignoring due to https://github.com/xamarin/xamarin-macios/issues/15656
!missing-field! SCStreamErrorDomain not bound
!missing-null-allowed! 'CoreMedia.CMClock ScreenCaptureKit.SCStream::get_SynchronizationClock()' is missing an [NullAllowed] on return type

This file was deleted.

3 changes: 3 additions & 0 deletions tests/xtro-sharpie/macOS-ScreenCaptureKit.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ignoring due to https://github.com/xamarin/xamarin-macios/issues/15656
!missing-field! SCStreamErrorDomain not bound
!missing-null-allowed! 'CoreMedia.CMClock ScreenCaptureKit.SCStream::get_SynchronizationClock()' is missing an [NullAllowed] on return type
14 changes: 0 additions & 14 deletions tests/xtro-sharpie/macOS-ScreenCaptureKit.todo

This file was deleted.