feat: Replace screen capture with ScreenCaptureKit and fix performance issues #6

Merged
Ivan merged 20 commits from replace-rust-swift-screencapture-with-screencapturekit into develop 2025-07-04 22:03:41 +08:00

20 Commits

Author SHA1 Message Date
3a44b96621 Update README.md with comprehensive project documentation
- Replace default Tauri template content with detailed project description
- Add comprehensive feature list and tech stack information
- Include complete installation and development setup guide
- Document application interface and configuration details
- Add development workflow and debugging tips
- Provide contributing guidelines and support information
- Write documentation in English for international accessibility
2025-07-04 21:57:36 +08:00
5da81e5f93 Fix resource leak and CPU performance issues
- Fix integer underflow panic in LED color publisher by adding bounds checking
- Reduce screenshot capture frequency from 15 FPS to 5 FPS for better CPU performance
- Reduce WebSocket force-send frequency from 200ms to 500ms
- Fix WebSocket resource leak by properly cleaning up streams when connections end
- Add proper stream lifecycle management with is_running flag checks
- Ensure background tasks exit when streams are stopped

This resolves the issue where CPU usage remained above 100% after visiting
the LED strip configuration page, even when navigating to other pages.
2025-07-04 21:49:05 +08:00
a10fae75d2 Refactor LED strip configuration interface layout
- Separate LED control panels from display preview areas
- Add dedicated LED count control section at bottom of page
- Create new LedCountControlPanel component with 4-column grid layout
- Fix display container height to prevent layout overflow
- Remove embedded LED controls from DisplayView component
- Improve text color for display info panel title
- Hide spinner buttons on number inputs for cleaner UI
- Enhance input field styling with centered text and larger font
2025-07-04 19:13:35 +08:00
5f12b8312a feat: enhance white balance interface with expandable help content
- Add comprehensive expandable help section in normal mode with detailed instructions
- Include usage recommendations, adjustment tips, and comparison methods
- Add simplified tooltip in fullscreen mode for quick reference
- Improve user guidance for LED strip color calibration process
- Maintain dual-mode functionality (normal/fullscreen) with appropriate help content
2025-07-04 18:31:44 +08:00
1944c88b55 Optimize screen streaming performance and clean up debug logs
- Reduced image processing time from 7-8 seconds to 340-420ms (15-20x improvement)
- Optimized BGRA->RGBA conversion with unsafe pointer operations and batch processing
- Changed image resize filter from Lanczos3 to Nearest for maximum speed
- Reduced target resolution from 400x225 to 320x180 for better performance
- Reduced JPEG quality from 75 to 50 for faster compression
- Fixed force-send mechanism timing from 500ms to 200ms intervals
- Improved frame rate from 0 FPS to ~2.5 FPS
- Cleaned up extensive debug logging and performance instrumentation
- Removed unused imports and variables to reduce compiler warnings
2025-07-04 14:45:50 +08:00
c8db28168c feat: Add Daisy-UI and optimize LED strip configuration UI
- Install and configure Tailwind CSS 4.1 with Daisy-UI plugin
- Redesign main navigation with responsive navbar and dark theme
- Optimize LED strip configuration layout with modern card components
- Improve screen preview performance with frame-based rendering
- Reduce LED pixel size for better visual appearance
- Remove excessive debug logging for better performance
- Fix Tailwind CSS ESM compatibility issues with dynamic imports
2025-07-03 13:28:19 +08:00
93ad9ae46c feat: implement real-time LED strip preview
- Add LED strip visualization around display previews
- Show real-time color status for each LED pixel
- Support multi-display LED strip configurations
- Use elegant 16px thin LED strip design
- Real-time LED color sync via WebSocket
- Responsive layout with display scaling support
2025-07-03 02:09:19 +08:00
6c30a824b0 feat: upgrade Tailwind CSS to v4.1.11
- Upgrade Tailwind CSS from 3.x to 4.x for latest features and performance
- Install @tailwindcss/postcss plugin for Tailwind CSS 4.0 compatibility
- Update CSS configuration to use new @import and @config syntax
- Update PostCSS configuration to use new plugin format
- Build working correctly with new Tailwind CSS engine
2025-06-30 18:01:26 +08:00
515b3a4ccb feat: upgrade Vite to v6.3.5
- Upgrade Vite from 4.x to 6.x for better performance and features
- Update @types/node to v24.0.7 for compatibility
- Maintain compatibility with vite-plugin-solid 2.11.7
- Build and development server working correctly
2025-06-30 17:51:53 +08:00
ddf61c861d feat: update dependencies to latest compatible versions
- Update frontend dependencies (SolidJS, Vite, Tailwind, etc.)
- Update backend dependencies (Tauri 1.8.3, Tokio, Serde, etc.)
- Fix thread safety issues with SafeDisplay wrapper for ddc-hi::Display
- Resolve display-info API compatibility issues
- All dependencies updated within major version constraints
2025-06-30 17:35:03 +08:00
b1fd751090 Fix LED color events and improve screenshot capture
- Fix LED color publisher: uncomment display_colors_tx.send() to enable LED color events
- Replace rust_swift_screencapture with screen-capture-kit for better macOS compatibility
- Add bounds checking in LED color processing to prevent array index errors
- Update screenshot manager to use CGDisplay as fallback implementation
- Fix frontend screenshot URL protocol to use ambient-light://
- Add debug logging for LED color events in frontend
- Remove debug logs that were added for troubleshooting
- Update dependencies and remove CMake-dependent paho-mqtt temporarily

This resolves the issue where LED color events were not being sent to the frontend,
enabling real-time LED color visualization in the UI.
2025-06-30 14:35:03 +08:00
91983e6728 feat: 电脑睡眠后唤醒,支持重新开始捕捉屏幕内容。 2023-06-17 17:36:32 +08:00
bab3b8941e fix: 临时避免 CPU 占用率高的问题。 2023-06-10 21:09:36 +08:00
268ec1df81 feat: 使用 ScreenCaptureKit 获取屏幕帧数据。 2023-06-05 22:34:32 +08:00
ed72bdfdb1 feat: 改用 udp 向板子发送颜色校准信息。 2023-05-12 20:38:24 +08:00
98d2f7891a feat: 支持定期向板子发送显示器亮度信息。 2023-05-11 21:52:50 +08:00
3a23e1760b feat: 支持记住显示器配置。 2023-05-11 14:13:14 +08:00
8b124f8182 feat: 当新板子上线或音量变化时,推送当前音量给板子。 2023-05-10 21:50:51 +08:00
878180ed5b fix: 亮度调节指令频繁时通道被关闭。 2023-05-10 21:18:55 +08:00
5ddd704c9d chore: 完善。 2023-05-09 21:57:52 +08:00