Skip to content

Commit

Permalink
[ScreeCaptureKit] Add support for Xcode 14 beta 4. (#15647)
Browse files Browse the repository at this point in the history
  • Loading branch information
mandel-macaque authored Aug 8, 2022
1 parent ee9751b commit f35cc9b
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 28 deletions.
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.

5 comments on commit f35cc9b

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💻 [CI Build] Tests on macOS Mac Catalina (10.15) passed 💻

All tests on macOS Mac Catalina (10.15) passed.

Pipeline on Agent
Hash: f35cc9b590e9d0c65964d1cea368c0746e7bff15 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ API diff for current PR / commit

Legacy Xamarin (No breaking changes)
  • iOS (no change detected)
  • tvOS (no change detected)
  • watchOS (no change detected)
  • macOS: vsdrops gist (No breaking changes)
.NET (No breaking changes)
  • iOS: (empty diff detected)
  • tvOS: (empty diff detected)
  • MacCatalyst: (empty diff detected)
  • macOS: vsdrops gist (No breaking changes)

❗ API diff vs stable (Breaking changes)

Legacy Xamarin (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • iOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • tvOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • watchOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • macOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
.NET (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • iOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • tvOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • MacCatalyst: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • macOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • Microsoft.iOS vs Microsoft.MacCatalyst: vsdrops gist
Legacy Xamarin (stable) vs .NET

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: f35cc9b590e9d0c65964d1cea368c0746e7bff15 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ [CI Build] Tests on macOS M1 - Mac Big Sur (11.5) failed ❌

Failed tests are:

  • introspection
  • xammac_tests
  • monotouch-test

Pipeline on Agent
Hash: f35cc9b590e9d0c65964d1cea368c0746e7bff15 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📚 [CI Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMMINI-060.Monterey'
Hash: f35cc9b590e9d0c65964d1cea368c0746e7bff15 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 [CI Build] Test results 🔥

Test results

❌ Tests failed on VSTS: simulator tests

0 tests crashed, 2 tests failed, 226 tests passed.

Failures

❌ introspection tests

1 tests failed, 12 tests passed.
  • introspection/watchOS 32-bits - simulator/Debug (watchOS 6.0): Crashed Known issue: HE0038)

Html Report (VSDrops) Download

❌ monotouch tests

1 tests failed, 22 tests passed.
  • monotouch-test/watchOS 32-bits - simulator/Debug: TimedOut

Html Report (VSDrops) Download

Successes

✅ bcl: All 69 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 7 tests passed. Html Report (VSDrops) Download
✅ framework: All 8 tests passed. Html Report (VSDrops) Download
✅ generator: All 2 tests passed. Html Report (VSDrops) Download
✅ interdependent_binding_projects: All 7 tests passed. Html Report (VSDrops) Download
✅ install_source: All 1 tests passed. Html Report (VSDrops) Download
✅ linker: All 65 tests passed. Html Report (VSDrops) Download
✅ mac_binding_project: All 1 tests passed. Html Report (VSDrops) Download
✅ mmp: All 2 tests passed. Html Report (VSDrops) Download
✅ mononative: All 12 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ mtouch: All 1 tests passed. Html Report (VSDrops) Download
✅ xammac: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 8 tests passed. Html Report (VSDrops) Download
✅ xtro: All 2 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: [CI build]

Please sign in to comment.