Add ScreenCaptureKit screen capture for Mac Catalyst#259
Closed
Copilot wants to merge 3 commits intomac-catalystfrom
Closed
Add ScreenCaptureKit screen capture for Mac Catalyst#259Copilot wants to merge 3 commits intomac-catalystfrom
Copilot wants to merge 3 commits intomac-catalystfrom
Conversation
Create MacScreenCapture class that uses ScreenCaptureKit to capture the whole screen on macCatalyst, delivering frames through the existing buffered video pipeline. On iOS, the existing ReplayKit broadcast extension approach is preserved. - New file: Moblin/Various/MacScreenCapture.swift - Modified: ModelScreenCapture.swift (platform-conditional delegate) - Modified: Model.swift (macScreenCapture property and setup) Co-authored-by: eerimoq <176810+eerimoq@users.noreply.github.com>
Co-authored-by: eerimoq <176810+eerimoq@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for screen capture in Mac Catalyst build
Add ScreenCaptureKit screen capture for Mac Catalyst
Feb 28, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Mac Catalyst has no broadcast extension support, so the existing ReplayKit-based screen capture is non-functional. This adds in-process screen capture via ScreenCaptureKit, wired into the existing buffered video pipeline. The "Screen capture" video source option already exists in scenes/widgets UI — this makes it work on Mac Catalyst.
Changes
Moblin/Various/MacScreenCapture.swift(new) —SCStreamwrapper capturing the primary display at 2x (Retina) resolution, 30 FPS, BGRA. DeliversCMSampleBufferframes via delegate. Entire file is#if targetEnvironment(macCatalyst).Moblin/Various/Model/ModelScreenCapture.swift— Extracted shared helpers (handleScreenCaptureStarted/Stopped/SampleBuffer) and split delegate conformance by platform:MacScreenCaptureDelegateon macCatalyst (zero latency, in-process),SampleBufferReceiverDelegateon iOS (0.2s latency for ReplayKit IPC).Moblin/Various/Model/Model.swift— AddedmacScreenCaptureproperty and conditional setup insetupSampleBufferReceiver()to start ScreenCaptureKit on macCatalyst instead of the Unix socket listener.Design
Follows the AVCaptureSession pattern (direct in-process capture) rather than the iOS approach (out-of-process broadcast extension + socket IPC). Frames feed into the same
addBufferedVideo/appendBufferedVideoSampleBufferpipeline used by all non-camera video sources.🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.