# openipc/waybeam architecture

> Architecture diagram of the GitHub repository openipc/waybeam, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/openipc/waybeam
- Repository: https://github.com/openipc/waybeam

## Overview

Waybeam is an embedded vehicle-camera encoder and streamer. Its principal workflow starts at the daemon, selects a SoC backend, configures the camera pipeline, encodes HEVC, and sends video to a ground station; optional branches provide audio and recording. The HTTP API and dashboard expose configuration and live tuning. The README documents these product capabilities, but several implementation connections are not visible in the sampled excerpts, so those links are marked unverified rather than asserted as source-proven calls.

Main entry points: [`src/star6e_pipeline.c`](https://github.com/openipc/waybeam/blob/master/src/star6e_pipeline.c) (Star6E pipeline), [`src/maruko_pipeline.c`](https://github.com/openipc/waybeam/blob/master/src/maruko_pipeline.c) (Maruko pipeline), [`src/backend.c`](https://github.com/openipc/waybeam/blob/master/src/backend.c) (Backend dispatch), [`src/venc_httpd.c`](https://github.com/openipc/waybeam/blob/master/src/venc_httpd.c) (HTTP API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Daemon and Control"]
  node_daemon["Waybeam daemon<br/>[main.c]"]
  node_backend["Backend dispatch<br/>[backend.c]"]
  node_config["Runtime configuration<br/>[venc_config.c]"]
end

subgraph group_camera["Camera Pipelines"]
  node_starbackend["Star6E backend<br/>[backend_star6e.c]"]
  node_marukobackend["Maruko backend<br/>[backend_maruko.c]"]
  node_cvbackend["CV610 backend<br/>[backend_cv610.c]"]
  node_starpipe["Star6E pipeline<br/>[star6e_pipeline.c]"]
  node_marukopipe["Maruko pipeline<br/>[maruko_pipeline.c]"]
  node_cvpipe["CV610 pipeline<br/>[cv610_pipeline.c]"]
  node_sensor["Sensor selection<br/>[sensor_select.c]"]
  node_common["Pipeline utilities<br/>[pipeline_common.c]"]
end

subgraph group_media["Media and Storage"]
  node_encoder["Video encoding<br/>[venc_api.c]"]
  node_transport["Video transport<br/>[rtp_packetizer.c]"]
  node_audio["Audio capture<br/>[star6e_audio.c]"]
  node_record["Recording<br/>[star6e_recorder.c]"]
  node_tsrecord["Transport-stream recording"]
end

subgraph group_operations["Live Operations"]
  node_http["HTTP API<br/>[venc_httpd.c]"]
  node_dashboard["Web dashboard<br/>[venc_webui.c]"]
  node_iq["ISP IQ tuning<br/>[star6e_iq.c]"]
end

node_operator(("Operator"))
node_ground(("Ground station"))
node_sd[("SD card")]

node_operator -->|"starts"| node_daemon
node_daemon -->|"loads"| node_config
node_daemon -.->|"dispatches"| node_backend
node_backend -.->|"selects"| node_starbackend
node_backend -.->|"selects"| node_marukobackend
node_backend -.->|"selects"| node_cvbackend
node_starbackend -.->|"starts"| node_starpipe
node_marukobackend -.->|"starts"| node_marukopipe
node_cvbackend -.->|"starts"| node_cvpipe
node_starpipe -.->|"configures"| node_sensor
node_marukopipe -.->|"configures"| node_sensor
node_starpipe -->|"uses"| node_common
node_marukopipe -->|"uses"| node_common
node_cvpipe -->|"uses"| node_common
node_starpipe -.->|"encodes"| node_encoder
node_marukopipe -.->|"encodes"| node_encoder
node_cvpipe -.->|"encodes"| node_encoder
node_encoder -.->|"packetizes"| node_transport
node_transport -->|"streams"| node_ground
node_starpipe -.->|"captures"| node_audio
node_marukopipe -.->|"captures"| node_audio
node_starpipe -.->|"records"| node_record
node_marukopipe -.->|"records"| node_record
node_starpipe -.->|"records"| node_tsrecord
node_marukopipe -.->|"records"| node_tsrecord
node_record -->|"writes"| node_sd
node_tsrecord -->|"writes"| node_sd
node_operator -->|"tunes live"| node_http
node_http -.->|"updates"| node_config
node_operator -->|"uses"| node_dashboard
node_dashboard -.->|"calls"| node_http
node_http -.->|"tunes"| node_iq

click node_daemon "https://github.com/openipc/waybeam/blob/master/src/main.c"
click node_backend "https://github.com/openipc/waybeam/blob/master/src/backend.c"
click node_config "https://github.com/openipc/waybeam/blob/master/src/venc_config.c"
click node_starbackend "https://github.com/openipc/waybeam/blob/master/src/backend_star6e.c"
click node_marukobackend "https://github.com/openipc/waybeam/blob/master/src/backend_maruko.c"
click node_cvbackend "https://github.com/openipc/waybeam/blob/master/src/backend_cv610.c"
click node_starpipe "https://github.com/openipc/waybeam/blob/master/src/star6e_pipeline.c"
click node_marukopipe "https://github.com/openipc/waybeam/blob/master/src/maruko_pipeline.c"
click node_cvpipe "https://github.com/openipc/waybeam/blob/master/src/cv610_pipeline.c"
click node_sensor "https://github.com/openipc/waybeam/blob/master/src/sensor_select.c"
click node_common "https://github.com/openipc/waybeam/blob/master/src/pipeline_common.c"
click node_encoder "https://github.com/openipc/waybeam/blob/master/src/venc_api.c"
click node_transport "https://github.com/openipc/waybeam/blob/master/src/rtp_packetizer.c"
click node_audio "https://github.com/openipc/waybeam/blob/master/src/star6e_audio.c"
click node_record "https://github.com/openipc/waybeam/blob/master/src/star6e_recorder.c"
click node_tsrecord "https://github.com/openipc/waybeam/blob/master/src/star6e_ts_recorder.c"
click node_http "https://github.com/openipc/waybeam/blob/master/src/venc_httpd.c"
click node_dashboard "https://github.com/openipc/waybeam/blob/master/src/venc_webui.c"
click node_iq "https://github.com/openipc/waybeam/blob/master/src/star6e_iq.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_daemon,node_backend,node_config toneBlue
class node_starbackend,node_marukobackend,node_cvbackend,node_starpipe,node_marukopipe,node_cvpipe,node_sensor,node_common,node_sd toneAmber
class node_encoder,node_transport,node_audio,node_record,node_tsrecord toneMint
class node_http,node_dashboard,node_iq toneRose
class node_operator,node_ground toneIndigo
```

## Components

### Daemon and Control

- [Waybeam daemon](https://github.com/openipc/waybeam/blob/master/src/main.c): `src/main.c`
- [Backend dispatch](https://github.com/openipc/waybeam/blob/master/src/backend.c): `src/backend.c`
- [Runtime configuration](https://github.com/openipc/waybeam/blob/master/src/venc_config.c): `src/venc_config.c`

### Camera Pipelines

- [Star6E backend](https://github.com/openipc/waybeam/blob/master/src/backend_star6e.c): `src/backend_star6e.c`
- [Maruko backend](https://github.com/openipc/waybeam/blob/master/src/backend_maruko.c): `src/backend_maruko.c`
- [CV610 backend](https://github.com/openipc/waybeam/blob/master/src/backend_cv610.c): `src/backend_cv610.c`
- [Star6E pipeline](https://github.com/openipc/waybeam/blob/master/src/star6e_pipeline.c): `src/star6e_pipeline.c`
- [Maruko pipeline](https://github.com/openipc/waybeam/blob/master/src/maruko_pipeline.c): `src/maruko_pipeline.c`
- [CV610 pipeline](https://github.com/openipc/waybeam/blob/master/src/cv610_pipeline.c): `src/cv610_pipeline.c`
- [Sensor selection](https://github.com/openipc/waybeam/blob/master/src/sensor_select.c): `src/sensor_select.c`
- [Pipeline utilities](https://github.com/openipc/waybeam/blob/master/src/pipeline_common.c): `src/pipeline_common.c`

### Media and Storage

- [Video encoding](https://github.com/openipc/waybeam/blob/master/src/venc_api.c): `src/venc_api.c`
- [Video transport](https://github.com/openipc/waybeam/blob/master/src/rtp_packetizer.c): `src/rtp_packetizer.c`
- [Audio capture](https://github.com/openipc/waybeam/blob/master/src/star6e_audio.c): `src/star6e_audio.c`
- [Recording](https://github.com/openipc/waybeam/blob/master/src/star6e_recorder.c): `src/star6e_recorder.c`
- [Transport-stream recording](https://github.com/openipc/waybeam/blob/master/src/star6e_ts_recorder.c): `src/star6e_ts_recorder.c`

### Live Operations

- [HTTP API](https://github.com/openipc/waybeam/blob/master/src/venc_httpd.c): `src/venc_httpd.c`
- [Web dashboard](https://github.com/openipc/waybeam/blob/master/src/venc_webui.c): `src/venc_webui.c`
- [ISP IQ tuning](https://github.com/openipc/waybeam/blob/master/src/star6e_iq.c): `src/star6e_iq.c`

### Other components

- **Operator**
- **Ground station**
- **SD card**

## Connections

- Operator → Waybeam daemon: starts (evidence: `README.md`)
- Waybeam daemon → Runtime configuration: loads (evidence: `README.md`)
- Waybeam daemon → Backend dispatch: dispatches
- Backend dispatch → Star6E backend: selects
- Backend dispatch → Maruko backend: selects
- Backend dispatch → CV610 backend: selects
- Star6E backend → Star6E pipeline: starts
- Maruko backend → Maruko pipeline: starts
- CV610 backend → CV610 pipeline: starts
- Star6E pipeline → Sensor selection: configures
- Maruko pipeline → Sensor selection: configures
- Star6E pipeline → Pipeline utilities: uses
- Maruko pipeline → Pipeline utilities: uses
- CV610 pipeline → Pipeline utilities: uses (evidence: `src/cv610_pipeline.c`)
- Star6E pipeline → Video encoding: encodes
- Maruko pipeline → Video encoding: encodes
- CV610 pipeline → Video encoding: encodes
- Video encoding → Video transport: packetizes
- Video transport → Ground station: streams (evidence: `README.md`)
- Star6E pipeline → Audio capture: captures
- Maruko pipeline → Audio capture: captures
- Star6E pipeline → Recording: records
- Maruko pipeline → Recording: records
- Star6E pipeline → Transport-stream recording: records
- Maruko pipeline → Transport-stream recording: records
- Recording → SD card: writes (evidence: `README.md`)
- Transport-stream recording → SD card: writes (evidence: `README.md`)
- Operator → HTTP API: tunes live (evidence: `README.md`)
- HTTP API → Runtime configuration: updates
- Operator → Web dashboard: uses (evidence: `README.md`)
- Web dashboard → HTTP API: calls
- HTTP API → ISP IQ tuning: tunes
