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

Question: About RGB10A2 #13

Open
TheKrisn opened this issue Feb 6, 2024 · 4 comments
Open

Question: About RGB10A2 #13

TheKrisn opened this issue Feb 6, 2024 · 4 comments

Comments

@TheKrisn
Copy link

TheKrisn commented Feb 6, 2024

Does this always capture RGBA8/BGRA8 or there is an ability to read from RGB10A2 buffers.

I am very new to this topic and recently been looking into obs-rs crate ( which works using graphics hook injection ) for game capture, but after injection that crate returns text_desc format = 24 for some games which is RGB10A2, but this crate return RGBA8 for everything.

Why is that happening, can someone help me or direct me to related reading material.

Thanks in advance

@DiscreteTom
Copy link
Owner

With Windows Desktop Duplication API, the pixel format is always BGRA.

See the doc here.

The format of the desktop image is always DXGI_FORMAT_B8G8R8A8_UNORM no matter what the current display mode is.

@TheKrisn
Copy link
Author

TheKrisn commented Feb 6, 2024

That means obs graphics hook uses a different method for capturing than Windows Desktop Duplication API. Capturing via Duplication API should be faster than graphics hook, right?

Thanks for the information 💯

@DiscreteTom
Copy link
Owner

There are other ways to capture windows (not desktop), you can checkout this repo for some information. Desktop Duplication should be the fastest one.

However this repo may not be the fastest approach, see #12 . Maybe improve this later.

@TheKrisn
Copy link
Author

TheKrisn commented Feb 6, 2024

It's hard for me to believe than python implementation is faster than rust xD. Yeah i hope you may improve performance in future, so starred your repo already. Also i am not able to capture fullscreen games with this, so have to settled with unmaintained dxgcap for now :(

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

No branches or pull requests

2 participants