-
Notifications
You must be signed in to change notification settings - Fork 461
Fix camera view app crashes when switching camera on windows #2907
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
Fix camera view app crashes when switching camera on windows #2907
Conversation
…t' into Fix-CameraView-App-crashes-when-switching-camera-on-Windows
|
@TheCodeTraveler Thanks for the update, the fix looks good. That said, I think a few other changes from #2634 that didn’t make it into this PR are still worth including, as they bring measurable performance benefits:
These changes significantly reduce unnecessary refresh calls during camera initialization. For example, from my testing, when opening the CameraView page in the sample app, a breakpoint set in
2 out of the last 3 calls are redundant and affect performance, especially since RefreshAvailableCameras() on Windows is relatively expensive. Ideally, the refresh should only occur once during initialization. The introduction of the private In my testing, these changes reduce invocation of the refresh logic to one, without altering existing behaviour. It would be great if you could take a look - I believe merging these improvements would make the overall fix more robust and efficient. |
|
Thanks @zhitaop! Yea, if you could submit a PR that improves performance without introducing an |
Description of Change
This PR replaces #2634 by @zhitaop, focusing on the only the bug fixes.
This PR is built on top of the #2906 PR which has been broken out into a separate PR to make the review process easier. This PR should be merged only after #2906 has been merged.
From #2634 by @zhitaop:
Linked Issues
PR Checklist
approved(bug) orChampioned(feature/proposal)mainat time of PRAdditional information
This PR will remain in Draft until #2906 is merged.