Resolution not found? Reload the list of supported resolutions.#103
Open
koutheir wants to merge 1 commit intosoyersoyer:mainfrom
Open
Resolution not found? Reload the list of supported resolutions.#103koutheir wants to merge 1 commit intosoyersoyer:mainfrom
koutheir wants to merge 1 commit intosoyersoyer:mainfrom
Conversation
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.
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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