Jump to content

X11DisplayOp

From RidgeRun Developer Wiki

🚧 Documentation is under development

The Holoscan SDK guide is currently under active development. Some sections may be incomplete or change without notice.

Questions? Contact RidgeRun or email to support@ridgerun.com.

Contents Pin






Preliminary reference
This reference is preliminary. The set of available operators and HSDK applications, along with their APIs and documented behavior, may change in future releases.


X11DisplayOp

X11DisplayOp displays a contiguous CUDA BGRA tensor in an X11 window. It copies each frame into XImage-owned host storage and presents it through Xlib.


X11 display integration
Bring processed camera images into your X11 application. Contact RidgeRun for help integrating the display and measuring how it affects performance.


Input arguments

Argument Meaning
width, height Positive dimensions of the input BGRA tensor and window image.
title Window title; defaults to Holoscan V4L2 Depth in the operator API.

Ports and data contract

Port Memory Queue Trigger Contract
input CUDA device, contiguous SDK default OnEach U8 rank-3 tensor with shape [height, width, 4] in BGRA order. Each sample is consumed by the display endpoint.

Example

ArgusCameraOp -> X11DisplayOp
V4L2UserPtrSourceOp -> RawBayerToBgraOp -> X11DisplayOp
TestPatternOp -> X11DisplayOp

Build

Follow Holoscan RidgeRun Build and Installation for the module build and installation. The operator-specific include, target, and runtime requirements are listed below.

Include x11_display/x11_display.hpp and link holoscan::x11_display. X11 development libraries and a valid DISPLAY connection are required for rendering.

Display requirements

At start() the operator creates the X11 window, graphics context and XImage. It accepts only a little-endian 32-bit TrueColor visual whose channel masks and row stride match packed BGRA. An incompatible visual disables the sink instead of silently swapping channels or presenting skewed rows. The window title is set from the constructor argument, and pressing q, Q or Escape, or closing the window, raises the application's stop signal.

Each compute validates the exact configured contiguous CUDA uint8 shape, copies the frame to XImage-owned host memory on the Holoscan CUDA stream, calls XPutImage, flushes the display and processes pending events. If X11 was disabled during startup, valid input frames are still consumed and no output is emitted. Cleanup destroys the XImage, window, graphics context and display connection.


Display and measurement scope
The X11 path includes a device-to-host presentation copy and desktop-server work. It should not be treated as equivalent to a headless fakesink or exclusive DRM/KMS output.


Source reference
You can find the source code at X11DisplayOp.


Related pages


Cookies help us deliver our services. By using our services, you agree to our use of cookies.