Skip to content
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

Push camera dimensions back to NativeVideo texture #1121

Merged
merged 7 commits into from
Aug 23, 2022

Conversation

Alex-MSFT
Copy link
Contributor

This PR pushes the actual used camera dimension back to the NativeVideo texture so that readPixels and getSize return the proper dimensions of the object rather than defaulting to whatever is passed in for maxHeight and maxWidth as outlined in #1107. With this change we will properly report the correct resolution on both iOS and Android. Android requires additional follow up work to select the correct camera configuration to most closely match the target resolution.

@ryantrem
Copy link
Member

Dang we have too much duplication between the different NativeCameraImpls. I don't think each platform should re-define the header. We can fix this in a later change, but if we find ourselves continuing to duplicate things across platforms in future changes, we should consider reworking this a bit.

Plugins/NativeCamera/Source/Android/NativeCameraImpl.cpp Outdated Show resolved Hide resolved
Plugins/NativeCamera/Source/NativeVideo.cpp Outdated Show resolved Hide resolved
Plugins/NativeCamera/Source/NativeVideo.cpp Outdated Show resolved Hide resolved
Plugins/NativeCamera/Source/Android/NativeCameraImpl.h Outdated Show resolved Hide resolved
@Alex-MSFT Alex-MSFT merged commit 6c53664 into BabylonJS:master Aug 23, 2022
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.

3 participants