-
Notifications
You must be signed in to change notification settings - Fork 15
Add composite view capture support for Apple Vision Pro #20
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
base: develop
Are you sure you want to change the base?
Conversation
Implements continuous real-time composite view capture using ReplayKit, allowing capture of both physical passthrough and digital content. Key changes: - Added com.apple.developer.screen-capture.composite-passthrough entitlement - Created CompositeViewCapture.swift with ReplayKit-based continuous capture - Extended EnterpriseCameraAccessManager.cs with UseCompositeCapture toggle - Added composite texture handling with Metal pipeline (mirrors physical camera) - Updated ConfigureXcodeSettings.cs with NSPhotoLibraryUsageDescription Features: - Toggle between physical camera and composite view capture - Real-time texture updates via getCompositeTexture() - No audio capture (microphone disabled) - Public API: GetCompositeTexture2D() Resolves #16 Co-authored-by: Masahiro Yamaguchi <from2001@users.noreply.github.com>
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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.
Pull request overview
This pull request adds composite view capture support for Apple Vision Pro, enabling capture of both physical passthrough and digital content using ReplayKit. This addresses issue #16 which requested the ability to capture AR composite views (physical environment + digital elements) rather than just the physical camera feed.
Changes:
- Added
UseCompositeCapturetoggle flag to switch between physical camera and composite view capture modes - Implemented ReplayKit-based continuous capture in new
CompositeViewCapture.swiftfile with Metal pipeline - Extended C# manager with composite capture methods and public API
- Added required entitlements and Info.plist permissions for screen capture
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 20 comments.
| File | Description |
|---|---|
| EnterpriseCameraAccessManager.cs | Added composite capture support with dual-mode operation, new texture management fields, and public GetCompositeTexture2D() API |
| CompositeViewCapture.swift | New ReplayKit-based composite capture implementation with Metal texture processing and pixel format conversion |
| ConfigureXcodeSettings.cs | Added NSPhotoLibraryUsageDescription permission to Info.plist configuration |
| Entitlements.entitlements | Added com.apple.developer.screen-capture.composite-passthrough entitlement for ReplayKit access |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Packages/com.styly.enterprise-camera-access/Runtime/Scripts/CompositeViewCapture.swift
Show resolved
Hide resolved
Packages/com.styly.enterprise-camera-access/Runtime/Scripts/EnterpriseCameraAccessManager.cs
Show resolved
Hide resolved
Packages/com.styly.enterprise-camera-access/Runtime/Scripts/EnterpriseCameraAccessManager.cs
Outdated
Show resolved
Hide resolved
Packages/com.styly.enterprise-camera-access/Runtime/Scripts/CompositeViewCapture.swift
Outdated
Show resolved
Hide resolved
Packages/com.styly.enterprise-camera-access/Runtime/Scripts/CompositeViewCapture.swift
Outdated
Show resolved
Hide resolved
Packages/com.styly.enterprise-camera-access/Runtime/Scripts/CompositeViewCapture.swift
Show resolved
Hide resolved
Packages/com.styly.enterprise-camera-access/Runtime/Scripts/CompositeViewCapture.swift
Show resolved
Hide resolved
Packages/com.styly.enterprise-camera-access/Runtime/Scripts/CompositeViewCapture.swift
Outdated
Show resolved
Hide resolved
Packages/com.styly.enterprise-camera-access/Runtime/Scripts/CompositeViewCapture.swift
Outdated
Show resolved
Hide resolved
Packages/com.styly.enterprise-camera-access/Runtime/Scripts/CompositeViewCapture.swift
Outdated
Show resolved
Hide resolved
- Remove unused ARKit import - Use explicit .shaderRead Metal texture usage instead of .unknown - Replace force unwraps with guard statements for better error handling - Replace fatalError() with logging for graceful error recovery - Add memory cleanup in OnDisable for textures and render textures - Optimize TryGetCompositeTexture to only recreate texture when pointer changes - Add UpdateExternalTexture call in UpdateCompositeTexture for proper refresh - Add IsCompositeCaptureAvailable() public API method - Add XML documentation for GetCompositeTexture2D - Expand tooltip to explain composite vs physical capture trade-offs - Remove unnecessary NSPhotoLibraryUsageDescription plist entry - Log unsupported pixel formats instead of silently returning Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements continuous real-time composite view capture using ReplayKit, allowing capture of both physical passthrough and digital content.
Key Features
UseCompositeCaptureflagGetCompositeTexture2D()Implementation
com.apple.developer.screen-capture.composite-passthroughentitlementCompositeViewCapture.swiftwith ReplayKit-based continuous captureEnterpriseCameraAccessManager.cswith composite mode supportConfigureXcodeSettings.cswith Info.plist permissionsResolves #16
Generated with Claude Code