Add docs/cli/ entries for: transport_cli, discovery_cli, config_cli, protocol_cli, query_cli, test_image_cli, xorg_cli, v4l2_view_cli, stream_send_cli, stream_recv_cli, reconciler_cli, controller_cli Each doc covers: description, build instructions, full usage with all options and defaults, example output, and a relationship note pointing to related tools. controller_cli includes the display control IDs table and notes its temporary status. README.md: convert all CLI tool entries to links. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2.2 KiB
xorg_cli
A development tool for testing the xorg viewer sink. Opens an X11 window using GLFW/OpenGL, renders a test pattern at the chosen scale and anchor, and displays a text overlay showing the current date. The window stays open until the user presses Q, Escape, or closes it.
Build
From the repository root:
make cli
The binary is placed in build/cli/.
Requires the GLFW, OpenGL, and libjpeg-turbo libraries. If compiled without HAVE_GLFW, the binary will print an error and exit.
Usage
./xorg_cli [--pattern bars|ramp|grid]
[--width N] [--height N]
[--format yuv420|bgra]
[--scale stretch|fit|fill|1:1]
[--anchor center|topleft]
[--x N] [--y N]
| Option | Default | Description |
|---|---|---|
--pattern |
bars |
Test pattern to render |
--width N |
1280 |
Window width in pixels |
--height N |
720 |
Window height in pixels |
--format |
yuv420 |
Frame pixel format |
--scale |
stretch |
How the frame fills the window |
--anchor |
center |
Frame alignment within the window |
--x N |
0 |
Window X position on screen |
--y N |
0 |
Window Y position on screen |
Scale modes
| Mode | Description |
|---|---|
stretch |
Fill the window, ignoring aspect ratio |
fit |
Largest rect that fits, preserving aspect ratio (black bars) |
fill |
Smallest rect that covers, preserving aspect ratio (crops edges) |
1:1 |
Native pixel size, no scaling |
Anchor modes
Anchor applies when the frame does not fill the window (fit, fill, 1:1 modes):
| Mode | Description |
|---|---|
center |
Centre the frame in the window |
topleft |
Align frame to the top-left corner |
Example
./xorg_cli --pattern grid --scale fit --anchor center --width 1920 --height 1080
Relationship to the Video Routing System
xorg_cli exercises the xorg module used by the video node for its display sink role. The same viewer, scale/anchor logic, and text overlay system are used by stream_recv_cli and the node's START_DISPLAY command.
See also: v4l2_view_cli.md for live camera feed display; stream_recv_cli.md for network stream display.