Skip to content

Add built-in UAPI headers, and feature to force using UAPI headers.#59

Open
showier-drastic wants to merge 1 commit into
Gnurou:masterfrom
showier-drastic:master
Open

Add built-in UAPI headers, and feature to force using UAPI headers.#59
showier-drastic wants to merge 1 commit into
Gnurou:masterfrom
showier-drastic:master

Conversation

@showier-drastic
Copy link
Copy Markdown

This commit adds code within build.rs to check for the current kernel header version, and if kernel version is less than 6.8 (building will definitely fail for kernel < 6.8 in the current state, as v4l2_ctrl_av1_frame is missing), use the built-in UAPI headers. A feature flag builtin-uapi-header is added to force using builtin headers. If V4L2R_VIDEODEV2_H_PATH is specified, the built-in UAPI headers won't be used, so existing users won't be affected.

A script is added (lib/update-uapi-headers.sh) to sync the UAPI headers from the current host system.

DEFAULT_VIDEODEV2_H_PATH is removed, because clang will contain /usr/include within the default include path, and with this you can successfully find #include <linux/videodev2.h>, so there is no need for DEFAULT_VIDEODEV2_H_PATH in the default case. Moreover, the default value is wrong, because this will result in /usr/include/linux/linux/videodev2.h anyways. So it should cause no harm to remove this.

This closes #58.

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.

Stateless HEVC and AV1 structs with older Linux Kernels (before 5.18)

1 participant