Skip to content

[camera_windows] Fall back to a physical stream for cameras that reject preferred-stream selectors - #12748

Open
llfbandit wants to merge 2 commits into
flutter:mainfrom
llfbandit:camera_discovery
Open

[camera_windows] Fall back to a physical stream for cameras that reject preferred-stream selectors#12748
llfbandit wants to merge 2 commits into
flutter:mainfrom
llfbandit:camera_discovery

Conversation

@llfbandit

Copy link
Copy Markdown

Fixes #140014

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Windows camera implementation to resolve and use explicit source stream indices for preview, record, and photo capture, falling back to physical streams when preferred-stream selectors are rejected. This change addresses initialization failures on multi-stream USB cameras. The review feedback suggests modifying the stream resolution logic to prefer the first encountered video capture stream rather than the last.

Comment thread packages/camera/camera_windows/windows/capture_controller.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[camera_windows] Failed to initialize video preview with latest webcam driver

1 participant