# xxxzhou/avox architecture

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

- Interactive diagram: https://gitdiagram.com/xxxzhou/avox
- Repository: https://github.com/xxxzhou/avox

## Overview

avox is a cross-platform C++ audio/video capability library, with playback as its most complete product workflow: a caller selects a live, local, or device source; the source is parsed and decoded; frames can pass through GPU processing to rendering or encoding and streaming/recording. The README also documents WebRTC, optional AI plugins, XR production capabilities, and game-engine texture interop. The tree exposes only a small part of the implementation, so several documented subsystems use their existing enclosing source directories; arrows reflect README-described flows, not inspected call sites.

Main entry points: [`src/avox`](https://github.com/xxxzhou/avox/tree/main/src/avox) (GPU processing), [`plugins/avox_webrtc/RtcEngine.cpp`](https://github.com/xxxzhou/avox/blob/main/plugins/avox_webrtc/RtcEngine.cpp) (WebRTC engine), [`src/avox/source/DeviceManager.hpp`](https://github.com/xxxzhou/avox/blob/main/src/avox/source/DeviceManager.hpp) (Device capture), [`src/avox/module/AvoxManager.cpp`](https://github.com/xxxzhou/avox/blob/main/src/avox/module/AvoxManager.cpp) (Runtime manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Core media"]
  node_manager["Runtime manager<br/>[AvoxManager.cpp]"]
  node_capture["Device capture<br/>[DeviceManager.hpp]"]
  node_source["Source selection"]
  node_torrent["Torrent source<br/>[TorrentEngine.cpp]"]
  node_decode["Demux and decode"]
  node_sync["Playback sync"]
  node_render["Surface rendering"]
  node_encode["Encode and mux"]
end

subgraph group_realtime["Realtime transport"]
  node_webrtc["WebRTC engine<br/>[RtcEngine.cpp]"]
  node_peer(("Remote peer"))
end

subgraph group_compute["GPU and AI"]
  node_gpu["GPU processing"]
  node_ai["AI capabilities"]
  node_ovinterface["Inference interface<br/>[IOVEngine.hpp]"]
  node_openvino["OpenVINO engine<br/>[OVEngine.cpp]"]
end

subgraph group_integration["Platform integration"]
  node_xr["XR production"]
  node_engines["Game engines"]
end

node_caller(("Application"))
node_media(("Media and devices"))
node_output(("Window or file"))

node_caller -->|"initializes"| node_manager
node_manager -->|"registers sources"| node_capture
node_media -->|"provides input"| node_capture
node_media -->|"supplies media"| node_source
node_caller -->|"selects source"| node_source
node_source -.->|"uses for magnets"| node_torrent
node_source -->|"provides stream"| node_decode
node_capture -->|"provides frames"| node_decode
node_torrent -->|"reads media bytes"| node_decode
node_decode -->|"supplies timestamps"| node_sync
node_sync -->|"dispatches frames"| node_gpu
node_gpu -->|"returns processed frames"| node_render
node_render -->|"renders to"| node_output
node_gpu -->|"supplies frames"| node_encode
node_encode -->|"writes or streams"| node_output
node_webrtc -->|"configures media decoding"| node_decode
node_webrtc -->|"configures media encoding"| node_encode
node_webrtc -->|"exchanges media"| node_peer
node_caller -.->|"requests capabilities"| node_ai
node_ai -.->|"uses inference contract"| node_ovinterface
node_ovinterface -.->|"implemented by"| node_openvino
node_gpu -.->|"supports fusion workflows"| node_xr
node_gpu -.->|"shares textures"| node_engines

click node_manager "https://github.com/xxxzhou/avox/blob/main/src/avox/module/AvoxManager.cpp"
click node_capture "https://github.com/xxxzhou/avox/blob/main/src/avox/source/DeviceManager.hpp"
click node_source "https://github.com/xxxzhou/avox/tree/main/src/avox"
click node_torrent "https://github.com/xxxzhou/avox/blob/main/plugins/avox_torrent/TorrentEngine.cpp"
click node_decode "https://github.com/xxxzhou/avox/tree/main/src/avox"
click node_sync "https://github.com/xxxzhou/avox/tree/main/src/avox"
click node_gpu "https://github.com/xxxzhou/avox/tree/main/src/avox"
click node_render "https://github.com/xxxzhou/avox/tree/main/src/avox"
click node_encode "https://github.com/xxxzhou/avox/tree/main/src/avox"
click node_webrtc "https://github.com/xxxzhou/avox/blob/main/plugins/avox_webrtc/RtcEngine.cpp"
click node_ai "https://github.com/xxxzhou/avox/tree/main/plugins"
click node_ovinterface "https://github.com/xxxzhou/avox/blob/main/src/avox/vision/IOVEngine.hpp"
click node_openvino "https://github.com/xxxzhou/avox/blob/main/plugins/avox_openvino/OVEngine.cpp"
click node_xr "https://github.com/xxxzhou/avox/tree/main/src/avox"
click node_engines "https://github.com/xxxzhou/avox/tree/main/platform"

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_manager,node_capture,node_source,node_torrent,node_decode,node_sync,node_render,node_encode toneBlue
class node_webrtc,node_peer toneAmber
class node_gpu,node_ai,node_ovinterface,node_openvino toneMint
class node_xr,node_engines toneRose
class node_caller,node_media,node_output toneIndigo
```

## Components

### Core media

- [Runtime manager](https://github.com/xxxzhou/avox/blob/main/src/avox/module/AvoxManager.cpp): `src/avox/module/AvoxManager.cpp`
- [Device capture](https://github.com/xxxzhou/avox/blob/main/src/avox/source/DeviceManager.hpp): `src/avox/source/DeviceManager.hpp`
- [Source selection](https://github.com/xxxzhou/avox/tree/main/src/avox): `src/avox`
- [Torrent source](https://github.com/xxxzhou/avox/blob/main/plugins/avox_torrent/TorrentEngine.cpp): `plugins/avox_torrent/TorrentEngine.cpp`
- [Demux and decode](https://github.com/xxxzhou/avox/tree/main/src/avox): `src/avox`
- [Playback sync](https://github.com/xxxzhou/avox/tree/main/src/avox): `src/avox`
- [Surface rendering](https://github.com/xxxzhou/avox/tree/main/src/avox): `src/avox`
- [Encode and mux](https://github.com/xxxzhou/avox/tree/main/src/avox): `src/avox`

### Realtime transport

- [WebRTC engine](https://github.com/xxxzhou/avox/blob/main/plugins/avox_webrtc/RtcEngine.cpp): `plugins/avox_webrtc/RtcEngine.cpp`
- **Remote peer**

### GPU and AI

- [GPU processing](https://github.com/xxxzhou/avox/tree/main/src/avox): `src/avox`
- [AI capabilities](https://github.com/xxxzhou/avox/tree/main/plugins): `plugins`
- [Inference interface](https://github.com/xxxzhou/avox/blob/main/src/avox/vision/IOVEngine.hpp): `src/avox/vision/IOVEngine.hpp`
- [OpenVINO engine](https://github.com/xxxzhou/avox/blob/main/plugins/avox_openvino/OVEngine.cpp): `plugins/avox_openvino/OVEngine.cpp`

### Platform integration

- [XR production](https://github.com/xxxzhou/avox/tree/main/src/avox): `src/avox`
- [Game engines](https://github.com/xxxzhou/avox/tree/main/platform): `platform`

### Other components

- **Application**
- **Media and devices**
- **Window or file**

## Connections

- Application → Runtime manager: initializes
- Runtime manager → Device capture: registers sources
- Media and devices → Device capture: provides input
- Media and devices → Source selection: supplies media
- Application → Source selection: selects source
- Source selection → Torrent source: uses for magnets
- Source selection → Demux and decode: provides stream
- Device capture → Demux and decode: provides frames
- Torrent source → Demux and decode: reads media bytes
- Demux and decode → Playback sync: supplies timestamps
- Playback sync → GPU processing: dispatches frames
- GPU processing → Surface rendering: returns processed frames
- Surface rendering → Window or file: renders to
- GPU processing → Encode and mux: supplies frames
- Encode and mux → Window or file: writes or streams
- WebRTC engine → Demux and decode: configures media decoding
- WebRTC engine → Encode and mux: configures media encoding
- WebRTC engine → Remote peer: exchanges media
- Application → AI capabilities: requests capabilities
- AI capabilities → Inference interface: uses inference contract
- Inference interface → OpenVINO engine: implemented by
- GPU processing → XR production: supports fusion workflows
- GPU processing → Game engines: shares textures
