whaletx is a Rust implementation of the RV1106 video transmitter pipeline
used in this repository.
Current scope:
- local INI parsing
- ISP / AIQ startup
V4L2 rkisp path -> MPI MMZ dma-buf -> VENC -> UDP RTP- optional
--drain - optional
msposdshared-memory OSD bridge - per-stage timing statistics and summary logs
Sensor modes currently present in mis5001.c:
2592x1944 @ 30fps1920x1080 @ 60fps1280x720 @ 90fps832x464 @ 120fps
Current verified runtime configuration:
1280x720 @ 90fps,H.264msposdOSD overRK_FMT_BGRA5551- default
--osd-fps 2
Path selection:
vi_channel = 0selectsrkisp_mainpath(/dev/video11)vi_channel = 1selectsrkisp_selfpath(/dev/video12)-d /dev/videoXoverridesvi_channel
The encoder path currently accepts H.264 configs only.
whaletx supports the optional --osd-msposd shared-memory OSD bridge.
Current verified format:
- RGN overlay pixel format:
RK_FMT_BGRA5551 - shared-memory canvas format:
BGRA5551, 16bpp - shared-memory size:
width * height * 2 + 4bytes
Important SDK-specific note:
- For this SDK / board combination,
RK_FMT_2BPPis usable, but it is not a normal 4-color palette in practice. RK_FMT_BGRA5551is the verified 16bpp path with normal visible colors.RK_FMT_ARGB1555andRK_FMT_BGRA5551naming is confusing in the Rockchip documentation because the enum meaning and little-endian memory layout are described separately.
Current verified visible probe colors in BGRA5551:
- white:
0xFFFF - green:
0x83E0 - red:
0xFC00
Test helper:
tools/osd_demo.cwrites directly into/msposd- default mode is a probe image for format verification
demomode renders a small moving OSD closer to real use
src/Safe Rust application logic, runtime flow, sink, stats, and argument parsing.src/ffi/Raw C ABI types and wrappers.unsafestays here.csrc/Thin C bridge code for Rockchip / V4L2 / AIQ integration and other C-style interfaces that are clearer to keep out of the normal Rust modules.scripts/Small build helpers such as the SDK-aware linker wrapper.
Before building, provide the SDK root:
export WHALETX_SDK=/path/to/luckfox-sdkThen build:
cargo +nightly build --releaseBuild artifact:
target/armv7-unknown-linux-uclibceabihf/release/whaletxThe remaining toolchain, include, and library paths are derived from
WHALETX_SDK. If the SDK layout differs from the default RV1106/uClibc tree,
you can override:
WHALETX_TOOLCHAIN_TRIPLEWHALETX_MEDIA_INCLUDE_DIRSWHALETX_LINK_DIRS
For build troubleshooting, each build writes the resolved environment and paths to:
target/armv7-unknown-linux-uclibceabihf/*/build/whaletx-*/out/whaletx-build-env.txtDefault runtime config: whaletx.ini
Default runtime config values:
1280x720 @ 90fpsH.264vi_channel = 1(rkisp_selfpath)- UDP/RTP output enabled