Skip to content

apps: include <zephyr/video/video.h> for the video API - #84

Merged
rosterloh merged 1 commit into
mainfrom
video-subsystem-includes
Sep 7, 2026
Merged

apps: include <zephyr/video/video.h> for the video API#84
rosterloh merged 1 commit into
mainfrom
video-subsystem-includes

Conversation

@rosterloh

Copy link
Copy Markdown
Owner

Summary

Zephyr 4.5 (zephyr#112420, migration guide line 1354) split the video API. The release note frames it as "applications only need to rename the #include", but it's a split rather than a rename:

  • <zephyr/video/video.h> — the application-facing API (buffers, formats, streaming)
  • <zephyr/drivers/video.h> — still 25 KB of driver-side API (video_device, video_ctrl, video_find_vdev), and now includes the new header

Both apps are pure consumers — I checked every video_* / VIDEO_* symbol they reference and none are driver-side — so they should be on the new header.

File Change
applications/embedded_vision/src/main.c drivers/video.hvideo/video.h
applications/data_collection/src/cam_mgmt.c drivers/video.hvideo/video.h, keeps its explicit video/formats.h

VIDEO_FOURCC_TO_STR and video_bits_per_pixel come from video/formats.h, which video/video.h includes — so main.c keeps them without adding an include.

Not changed

The out-of-tree video drivers in rosterloh-drivers (imx219.c, ov5647.c, arducam_pivariety.c, video_esp32_csi.c) are drivers, so <zephyr/drivers/video.h> remains correct for them. Three already include both headers; video_esp32_csi.c gets the consumer API transitively, which is fine.

Verification

mise run agent-build embedded_vision and mise run agent-build data_collection --sysbuild both build.

🤖 Generated with Claude Code

Zephyr 4.5 split the video API (zephyr#112420): the application-facing
half moved to <zephyr/video/video.h>, while <zephyr/drivers/video.h>
kept the driver-side pieces (video_device, video_ctrl, video_find_vdev)
and now just includes the new header.

Both apps are consumers - they use only buffer/format/stream calls, no
driver-side types - so point them at the new header. video/video.h pulls
in formats.h, which is what supplies VIDEO_FOURCC_TO_STR and
video_bits_per_pixel; cam_mgmt.c keeps its explicit formats.h include.

The out-of-tree video drivers in rosterloh-drivers are unaffected: as
drivers they legitimately want <zephyr/drivers/video.h>.

Verified: embedded_vision and data_collection --sysbuild both build.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rosterloh
rosterloh merged commit 66c2dca into main Sep 7, 2026
8 checks passed
@rosterloh
rosterloh deleted the video-subsystem-includes branch September 7, 2026 16:03
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.

1 participant