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

Iterator<Item=(u32, u32)> for Discrete/Stepwise enums (ResolutionInfo and IntervalInfo) #12

Open
Boscop opened this issue Jun 3, 2018 · 0 comments

Comments

@Boscop
Copy link

Boscop commented Jun 3, 2018

Re: #10

In the example Stepwise variant represents
{ ∀k≥0,m≥0 | (min(320 + kstep.0, 640), min(240 + mstep.1, 360)) }

It would be useful to have an iterator over this, for all enums with Discrete/Stepwise, i.e. ResolutionInfo and IntervalInfo.

E.g. it could be done by merging both types into one, as they are basically the same, and then making both an alias for that type. And then implementing Iterator<Item=(u32, u32)> for this type.

Having an iterator would make it easier to find the best setting to choose, as they can be zipped and mapped with a custom weighing function between fps and resolution, and then find the .max() :)

joelgallant added a commit to joelgallant/rscam that referenced this issue Oct 5, 2018
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

1 participant