blue-debug opened a new pull request, #3976: URL: https://github.com/apache/nuttx-apps/pull/3976
*Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).* ## Summary <UAPI PR> gives the V4L2 structs in `<sys/videoio.h>` the Linux layout. Two apps would stop building with that layout; this PR changes them so that they build with both the current and the new header, so it can go in first. - examples/uvc_cam: stop setting `buf_type` of `v4l2_frmsizeenum` and `v4l2_frmivalenum`. Linux has no such field and the NuttX kernel never read it; <UAPI PR> removes it. Also fixes the two existing nxstyle errors in the file. - system/nxcamera: control ids become 32 bits wide, as on Linux. nxcamera passed `&ctrl.id` and `&qctrl.id` to a `uint16_t *`, which no longer builds (incompatible pointer types). The id is now looked up into a local `uint32_t` and then assigned, which builds with both id widths. ## Impact Affects: examples/uvc_cam and system/nxcamera. Behavior: no change; every NuttX control id fits in 16 bits today, and the kernel does not read `buf_type`. Compatibility: builds with the current `<sys/videoio.h>` and with the Linux layout of <UAPI PR>. ## Testing Simulator (sim:nxcamera plus EXAMPLES_CAMERA, EXAMPLES_UVC_CAM and SYSTEM_NXCODEC), checkpatch passes: - Each commit builds with no new warnings against apache/nuttx master 6e1126a2362, and the PR builds with no new warnings against master + <UAPI PR>. Plain sim:nxcamera with `-Werror`, as CI builds it, passes with both. - Without this PR, master + <UAPI PR> fails in uvc_cam_main.c (`'struct v4l2_frmsizeenum' has no member named 'buf_type'`), and plain sim:nxcamera with `-Werror` fails three times in nxcamera_main.c (`incompatible-pointer-types`). - Runtime with <UAPI PR>: nxcamera captures 10 frames from a v4l2loopback device, each byte-identical to FFmpeg's smptebars frame. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
