Skip to content

MF-grabber: Add support for bottom-up image handling #1752

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

Merged
merged 5 commits into from
Jun 14, 2024

Conversation

Thinner77
Copy link
Contributor

@Thinner77 Thinner77 commented Jun 4, 2024

Summary

Hi,

this PR will (re-)add support for bottom-up images in MF-grabber. The previous implementation was removed in my PR #1739, as it was based on pixelformat which was incorrect (see comments there). It's now based on image stride, information is collected in MF-grabber and processed there only once.

Tested on Windows 10 using MF-grabber with internal web-camera as top-down image source and DroidCam (free version) as bottom-up image source.

Convincing reason for adding this feature: Lord-Grey said: "Our intend is to make things as easy as possible for users, i.e. if they setup the system it should work out of the box as much as possible." Personal reason: If i break things, i have to fix them.

wbr

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of web configuration, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing setups:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's body (e.g. Fixes: #xxx[,#xxx], where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated (docs/docs/en)
  • Related tests have been updated

PLEASE DON'T FORGET TO ADD YOUR CHANGES TO CHANGELOG.MD

  • Yes, CHANGELOG.md is also updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

resources used:
https://learn.microsoft.com/en-us/windows/win32/medfound/image-stride
https://learn.microsoft.com/en-us/windows/win32/medfound/mf-mt-default-stride-attribute
https://learn.microsoft.com/en-us/windows/win32/medfound/uncompressed-video-buffers

@Thinner77
Copy link
Contributor Author

Thinner77 commented Jun 5, 2024

Hi, please don't merge yet, i'm still not happy with the code. Sorry. wbr

@Lord-Grey
Copy link
Collaborator

@Thinner77 Thanks for going the extra mile on this; much appreciated.
I will wait, until you say it is ready for review/merge.

@Thinner77
Copy link
Contributor Author

Hi @Lord-Grey,

i think i'm happy with the code now. Minimal changes to the MF-grabber and the flipmode is only corrected once during device initialization. Please review and test, then decide to merge.

The failed check is unrelated to this code change.

wbr

@Thinner77 Thinner77 changed the title MF: Add support for bottom-up image handling MF-grabber: Add support for bottom-up image handling Jun 10, 2024
@Lord-Grey Lord-Grey merged commit 7f90637 into hyperion-project:master Jun 14, 2024
17 of 18 checks passed
@Thinner77 Thinner77 deleted the bottomup branch May 26, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants