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

Fix high resolution camera performance on mobile by allowing a default resolution #347

Merged
merged 19 commits into from
Nov 10, 2021
Merged

Fix high resolution camera performance on mobile by allowing a default resolution #347

merged 19 commits into from
Nov 10, 2021

Conversation

ROBYER1
Copy link
Contributor

@ROBYER1 ROBYER1 commented Nov 8, 2021

Use a manually set default resolution within 300px to choose the nearest default resolution on mobile. Is auto-selected if the value matches or if it is within the 300px range
-Prevents huge performance issues on phones with high resolution cameras when using the sample app

RobFEPM and others added 5 commits November 5, 2021 12:15
-Allow default resolution of camera to be set to 1280x720 for devices that have high resolution cameras (prevents crash behaviour on mobile)
…est default resolution on mobile

-Prevents huge performance issues on phones with high resolution cameras when using the sample app
Copy link
Contributor Author

@ROBYER1 ROBYER1 left a comment

Choose a reason for hiding this comment

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

Thanks for the change suggestions - I learnt some good practices for PRs here also which I will use in future when making PRs. If you need any explicit changes to this, let me know!

@ROBYER1
Copy link
Contributor Author

ROBYER1 commented Nov 9, 2021

Updated now only WebCamSource does the switching, the only outstanding issue I can see (other than me hopefully finally sorting the .cs scripts to be lf not crlf - sorry about that!) is that the resolution dropdown in the config menu doesn't actually show the current resolution being used when it is set automatically in WebCamSource.cs.

Wondering what is the best way to approach that?

@homuler
Copy link
Owner

homuler commented Nov 9, 2021

Wondering what is the best way to approach that?

Revert all the changes in ImageSourceConfig.cs
https://github.com/homuler/MediaPipeUnityPlugin/pull/347/files#diff-e59ac127e792a73fca8e43e5201c656b7eb7f23e40684d0ed549ea4a40aa2e3a

@ROBYER1
Copy link
Contributor Author

ROBYER1 commented Nov 9, 2021

All sorted there now, if there is anything else needing to be changed on this, let me know. I'm going to get back to looking into the graph latency issue this week but I'm pretty stumped with that as I'm still learning how the new sample app works.

Copy link
Owner

@homuler homuler left a comment

Choose a reason for hiding this comment

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

Thanks. I think we're almost there.

@ROBYER1
Copy link
Contributor Author

ROBYER1 commented Nov 9, 2021

All done, thanks for your help on this also 🦾 Seems the Github pull request commits I can make off your changes also makes the line endings in files changed on Github crlf - I'll have to see if that's a setting on my end on the Github website!

Copy link
Owner

@homuler homuler left a comment

Choose a reason for hiding this comment

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

Thanks!
LGTM

@homuler homuler merged commit 4826ee2 into homuler:master Nov 10, 2021
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.

None yet

3 participants