Skip to content

MF-grabber: Add some clarifying comments #1754

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 2 commits into from
Jun 16, 2024

Conversation

Thinner77
Copy link
Contributor

Summary

Hi,

i would like to add two comments to MF-grabber to clarify why image data is processed as BGR24, even though Microsoft Media Foundation (MMF) does not support this pixel format (https://learn.microsoft.com/en-us/windows/win32/medfound/video-subtype-guids#uncompressed-rgb-formats). I'm sure they'll be helpful to others looking at the code.

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:

@Thinner77 Thinner77 changed the title MF-Grabber: Add some clarifying comments MF-grabber: Add some clarifying comments Jun 10, 2024
@Thinner77
Copy link
Contributor Author

Hi,

i don't know what's wrong for Windows x64 builds:

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'D:\a\hyperion.ng\hyperion.ng\build\CMakeFiles\182a5313634d792e9514e930a393d00f\message.pb.cc.rule;D:\a\hyperion.ng\hyperion.ng\libsrc\protoserver\CMakeLists.txt' exited with code -1073741819. [D:\a\hyperion.ng\hyperion.ng\build\libsrc\protoserver\protoclient.vcxproj]

wbr

@Lord-Grey
Copy link
Collaborator

@Thinner77 Thanks for the background on the FMT and memory layout.
Would you mind updating libsrc/grabber/video/mediafoundation/MFSourceReaderCB.h to revert the changes from BGR24 to RGB24 via a previous commit, so the code is also in line with your comments?

@Lord-Grey
Copy link
Collaborator

i don't know what's wrong for Windows x64 builds:

The build problems were fixed, please merge the master into your branch.

@Thinner77
Copy link
Contributor Author

Hi @Lord-Grey,

I would not revert the changes as I still believe they were correct and necessary. If someone new looks at the MF-Grabber code and sees a mix of RGB24 and BGR24, they will probably fall into the same trap as me. Now the code is internally consistent. And in places where questions could still arise (e.g. in the EncoderThread), the comments help to solve the puzzle. What do you think?

wbr

@Lord-Grey
Copy link
Collaborator

Then let's go for it....

@Lord-Grey Lord-Grey merged commit 719c844 into hyperion-project:master Jun 16, 2024
18 checks passed
@Thinner77 Thinner77 deleted the comments 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