-
Notifications
You must be signed in to change notification settings - Fork 92
cameraCapture: Simplify codepaths, try to wait for a real frame #4365
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
Conversation
- Don't use fallback paths in camera capture; instead, have the test pick the exact path it's using, and parameterize over it. Test two paths: VideoFrame from MediaStreamTrackProcessor, and the old-fashioned HTMLVideoElement. - Work around an issue where Chrome (at least on Mac) shows blank frames for a while after initializing the camera. - I happened to notice that requesting different width/height from the camera is broken in Chrome in several ways, so added cases for that. - Added a TODO for copyExternalImageToTexture from camera These tests only worked in Chrome, and even then they were buggy (usually running the test on a blank first frame). Now, the HTMLVideoElement tests work in Safari. Firefox doesn't yet implement importExternalTexture. Test failures are as follows, on an M1 Mac: - Chrome: HTMLVideoElement passes some cases, but fails when a requested size is passed to getUserMedia(). - Chrome: VideoFrame fails due to incorrect color management (regardless of dstColorSpace). - Safari: HTMLVideoElement fails due to incorrect color management (regardless of dstColorSpace). - Safari: VideoFrame is skipped. Issue: 4363
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing! Some questions.
Oops, wait, I still haven't fixed the other code path. |
Done, @shaoboyan091 PTAL. Thanks for keeping me honest in using proper logic instead of timeout hacks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
These tests only worked in Chrome, and even then they were buggy (usually running the test on a blank first frame). Now, the HTMLVideoElement tests work in Safari.
Test failures are as follows, on an M1 Mac:
Issue: fixes #4363, cc #4364
Requirements for PR author:
.unimplemented()
./** documented */
and new helper files are found inhelper_index.txt
.Requirements for reviewer sign-off:
When landing this PR, be sure to make any necessary issue status updates.