Commit Graph

7 Commits

Author SHA1 Message Date
Mousen
508111c923 Reapply "Prevent iOS daemon throttling with SSH launch and priority boosts"
This reverts commit 4ba8384929.
2025-12-10 04:43:41 +05:00
Mousen
4ba8384929 Revert "Prevent iOS daemon throttling with SSH launch and priority boosts"
This reverts commit 6d5d143dd9.
2025-12-10 04:39:26 +05:00
Mousen
6d5d143dd9 Prevent iOS daemon throttling with SSH launch and priority boosts
iOS aggressively throttles daemon processes, causing CADisplayLink callbacks
to be delayed or skipped. This commit implements multiple workarounds:

- Replace CADisplayLink with high-priority dispatch timer (QOS_CLASS_USER_INTERACTIVE)
- Add power assertions to prevent display/GPU/CPU throttling
- Launch daemon via SSH to localhost for better scheduler treatment
- Set real-time thread priority and ProcessType=Interactive
- Add FPS diagnostics logging to monitor capture performance
- Auto-setup passwordless SSH keys during package installation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 08:12:48 +05:00
Mousen
aecc88aed2 Remove timer-based polling, always use CADisplayLink for frame updates
CADisplayLink provides better vsync alignment and consistent 60fps updates.
The timer-based 400Hz polling path added unnecessary complexity and CPU
overhead without meaningful benefits.

- Remove useCADisplayLink parameter and displaysync preference
- Simplify FrameUpdater to always use CADisplayLink
- Remove preference UI toggle for display sync option
- Add CLAUDE.md project documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 07:03:17 +05:00
Mousen
404b9ace35 Optimize frame capture performance and fix IOSurface alignment
- Add frame skip logic to prevent queue buildup and reduce lock contention
- Serialize operation queue to prevent concurrent frame processing
- Align IOSurface bytes per row to 16 bytes (required for IOSurfaceAccelerator)
- Only create renderServerSurface when scaling is needed, avoiding unnecessary allocations
- Support flexible resolution: width-only, height-only, or both dimensions
- Pass native dimensions to FrameUpdater for proper scaling decisions
- Enable 60 FPS limit on CADisplayLink
- Add IOSurface lock option constants for future use

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 06:22:17 +05:00
Mousen
297e88fa13 Add dual capture mode support and aspect ratio adjustments
- Introduced CaptureMode enum for selecting between CARenderServer and IOMobileFramebuffer.
- Updated FrameUpdater and ScreenDumpVNC to handle new capture mode logic.
- Implemented aspect ratio calculations and adjustments in ScreenDumpVNC.
- Added toggleCaptureMode method to switch between capture modes via keyboard input.
- Enhanced initialization of FrameUpdater to accommodate new parameters.
2025-12-08 05:30:19 +05:00
Mousen
9757a0c623 Initial commit 2025-04-20 06:45:03 +05:00