Interprocess External-Endpoint Demo
🚧 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.
-
Overview
-
Build, Run, and Validate
-
Core Concepts
-
Operators and Graphs
-
Tensor Data and Memory
-
Interprocess Communication
-
-
Application and Operator Development
- Building an HSDK Application
- Writing a Minimal Operator
- Typed Parameters and Configuration
- Reading, Writing, and Forwarding Data
- Writing Tensor Operators
- Complete Operator Patterns
- Authoring Runtime Behavior
- Runtime Parameter Updates
- Lifecycle Callbacks and Restart Control
- Performance and Debugging
- SDK Source Map
-
Operator Reference
-
Core Operators
-
Holoscan Camera
-
Holoscan RidgeRun
- Overview
- Build and Installation
- ArgusCameraOp
- V4L2SourceOp
- V4L2UserPtrSourceOp
- BgraToPlanarTensorOp
- RawBayerToBgraOp
- RawBayerToYoloTensorOp
- YuyvToBgraOp
- TensorRtInferenceOp
- DrmDisplayOp
- DrmBgraDisplayOp
- X11DisplayOp
- CudaCompositorOp
- DepthColorizerOp
- FakesinkOp
- FrameSkipperOp
- InterprocessSrcOp
- TestPatternOp
-
-
Migration from Holoscan 4.x
-
Examples
-
Core
-
Holoscan Camera
-
Holoscan RidgeRun
-
-
Benchmark and Use Cases
-
Holoscan vs GStreamer
- Overview
-
Capture and Display
-
Capture and Inference
- Compare the workloads
- Implemented Applications
- Framework Selection
- Interprocess
-
Interprocess External-Endpoint Demo
Watch two separate processes exchange a live CUDA BGRA Tensor stream through a catalog-backed external endpoint. The sender captures RG10 Bayer frames from a V4L2 camera with V4L2UserPtrSourceOp, converts them to BGRA on the GPU, and publishes one stream. The receiver attaches to that endpoint and displays the frames continuously.
This example connects the external endpoint concepts to a RidgeRun application. Read External Endpoints and Endpoint Catalogs before changing the endpoint contract.
What you will learn
- How a sender captures live RG10 Bayer frames with
V4L2UserPtrSourceOp. - How the sender converts the live frames to BGRA and publishes one external endpoint.
- How a receiver selects a catalog entry through an external source operator.
- How the sender and receiver keep a single live stream running across the process boundary.
- Which catalog, discovery, display, and lifetime conditions must match.
Build and run
Clone the repository that contains the Interprocess application:
export HOLOSCAN_SDK_INSTALL_DIR="/absolute/path/to/holoscan-sdk/install" WORKSPACE="$HOME/holoscan-5.0" HOLOSCAN_RIDGERUN="$WORKSPACE/holoscan-ridgerun" mkdir -p "$WORKSPACE" git clone https://github.com/ridgeRun/holoscan-ridgerun.git "$HOLOSCAN_RIDGERUN" cd "$HOLOSCAN_RIDGERUN" ./holoscan_ridgerun build interprocess receiver ./holoscan_ridgerun build interprocess sender
Follow the workflow
Operators used
| Operator | Role in this example |
|---|---|
| V4L2UserPtrSourceOp | Captures live RG10 Bayer frames from the V4L2 camera through CUDA-mapped USERPTR buffers. |
| RawBayerToBgraOp | Converts the captured Bayer frames to display-ready BGRA tensors on the GPU. |
| InterprocessSrcOp | Selects the live external endpoint and provides its Tensor frames to the receiver graph. |
| X11DisplayOp | Displays the live stream in the receiver process. |
The sender owns one live-capture graph:
V4L2 camera (RG10) -> V4L2UserPtrSourceOp -> RawBayerToBgraOp -> external endpoint "video"
The receiver owns one graph with InterprocessSrcOp followed by X11DisplayOp. Both processes use the same JSON endpoint catalog. The wrapper's validate mode creates that catalog without opening the camera, and the sender and receiver modes use the same generated catalog path.
First create the catalog without opening the camera:
cd "$HOLOSCAN_RIDGERUN" ./holoscan_ridgerun run interprocess validate \ --no-local-build \ --docker-opts="--ipc=host --network=host"
Start the receiver in one terminal. The wrapper uses the receiver application's default options. The X11 socket and DISPLAY environment are passed into the receiver container:
cd "$HOLOSCAN_RIDGERUN" ./holoscan_ridgerun run interprocess receiver \ --no-local-build \ --docker-opts="--ipc=host --network=host --env DISPLAY=$DISPLAY --volume /tmp/.X11-unix:/tmp/.X11-unix:rw"
Start the sender in another terminal. The wrapper uses the sender application's default options. The camera device must be passed to Docker:
cd "$HOLOSCAN_RIDGERUN" ./holoscan_ridgerun run interprocess sender \ --no-local-build \ --docker-opts="--ipc=host --network=host --device=/dev/video0"
After the catalog exists, the sender waits for the receiver to attach before counting or publishing camera frames. If you need to override the application defaults, pass the desired application arguments through --run-args. For example:
# Receiver: override the frame size and polling interval ./holoscan_ridgerun run interprocess receiver \ --no-local-build \ --run-args="--width 1920 --height 1080 --poll-ms 5" \ --docker-opts="--ipc=host --network=host --env DISPLAY=$DISPLAY --volume /tmp/.X11-unix:/tmp/.X11-unix:rw" # Sender: override the camera, format, frame rate, and frame limit ./holoscan_ridgerun run interprocess sender \ --no-local-build \ --run-args="--device /dev/video0 --width 1920 --height 1080 --fps 60 --frame-limit 600" \ --docker-opts="--ipc=host --network=host --device=/dev/video0"
The optional --frame-limit 600 argument causes the sender to publish the completion signal and the receiver to close cleanly; omit it to run until the user stops the application.
Expected result
The receiver displays the live camera stream. When the optional --frame-limit 600 argument is used, the sender publishes sender_done after the synchronized frame limit and the receiver closes cleanly. Without the frame limit, both processes continue until stopped with q, Escape, a closed display window, or Ctrl-C. A camera that is not available through the device selected by the sender defaults, a capture mode that is not RAW10/RG10 USERPTR, different catalog paths, or an inaccessible X11 display prevents a useful observation.