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

ioctl functions should probably return the raw V4L2 type? #26

Open
Gnurou opened this issue May 10, 2024 · 0 comments
Open

ioctl functions should probably return the raw V4L2 type? #26

Gnurou opened this issue May 10, 2024 · 0 comments

Comments

@Gnurou
Copy link
Owner

Gnurou commented May 10, 2024

ioctls currently go through the labor of converting the ioctl result into a higher-level, safer representation. This comes with a few disadvantages:

  • Each ioctl error type must include a specific variant to handle conversion errors,
  • The returned type must be TryFrom, meaning that types that could just be From need to have their errors checked as well.

Wouldn't it be better to just return the raw V4L2 type (with the exception of v4l2_buffer and v4l2_ext_controls) and let the caller perform the conversion they want?

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