Skip to content

Resolution not found? Reload the list of supported resolutions.#103

Open
koutheir wants to merge 1 commit intosoyersoyer:mainfrom
koutheir:main
Open

Resolution not found? Reload the list of supported resolutions.#103
koutheir wants to merge 1 commit intosoyersoyer:mainfrom
koutheir:main

Conversation

@koutheir
Copy link
Copy Markdown

@koutheir koutheir commented May 6, 2026

In some devices, the list of supported resolutions depend on the selected pixel format. If the pixel format changed since the last call to get_format_ctrls(), then this reloads the list of supported resolutions to match that pixel format.

Closes #102

In some devices, the list of supported resolutions depend on the selected pixel format. If the pixel format changed since the last call to get_format_ctrls(), then this reloads the list of supported resolutions to match that pixel format.
@koutheir
Copy link
Copy Markdown
Author

koutheir commented May 6, 2026

This PR uses a simple approach of "refresh and try again" to solve the issue. But this approach might not be the best design to solve this. Perhaps the list of resolutions should be refreshed every time the pixel format changes (in other words, changing the pixel format invalidates the cache of list of supported resolutions). Perhaps the list of supported resolutions should never be cached in the first place, and instead retrieved again from the device each time it is requested. I'm not sure what's the best choice here is, but this simple change fixes the issue for me.

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.

Set pixel format before setting resolution

1 participant