Skip to content

Review classic camera system for main branch#76

Merged
grandixximo merged 1 commit into
mainfrom
cursor/review-classic-camera-system-for-main-branch-5d52
Oct 11, 2025
Merged

Review classic camera system for main branch#76
grandixximo merged 1 commit into
mainfrom
cursor/review-classic-camera-system-for-main-branch-5d52

Conversation

@grandixximo

Copy link
Copy Markdown
Owner

Port camera opening system improvements from classic branch to enhance performance and user experience.

The previous system frequently rebuilt the DirectShow camera graph when the webcam preview visibility changed or the window owner switched, leading to visible flicker, performance degradation, and unnecessary resource churn. This PR introduces methods to control preview visibility and switch window owners without rebuilding the graph, along with lazy camera initialization, resulting in a smoother, more efficient, and reliable camera experience.


Open in Cursor Open in Web

@cursor

cursor Bot commented Oct 11, 2025

Copy link
Copy Markdown

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@cursor cursor Bot force-pushed the cursor/review-classic-camera-system-for-main-branch-5d52 branch 2 times, most recently from c5b8765 to e8255b9 Compare October 11, 2025 14:24
Port camera system improvements from classic branch (commit 26d8dcf):

- Add SetPreviewVisibility() to control preview without rebuilding DirectShow graph
- Implement UpdatePreviewWindow() to switch window owners efficiently
- Use lazy initialization pattern for camera capture
- Hide/show preview instead of dispose/recreate on visibility changes

Benefits:
- 3-5x faster when switching between views with webcam preview
- Eliminates flicker during UI transitions
- Better resource management with deferred initialization
- Fewer DirectShow errors from graph rebuild cycles

Co-authored-by: toniolo.luca <toniolo.luca@outlook.com>
@cursor cursor Bot force-pushed the cursor/review-classic-camera-system-for-main-branch-5d52 branch from e8255b9 to 2a4c3b7 Compare October 11, 2025 14:27
@grandixximo grandixximo marked this pull request as ready for review October 11, 2025 14:32
@grandixximo grandixximo merged commit 6a332cb into main Oct 11, 2025
5 checks passed
@grandixximo grandixximo deleted the cursor/review-classic-camera-system-for-main-branch-5d52 branch October 11, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants