# aladdin20/videona architecture

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

- Interactive diagram: https://gitdiagram.com/aladdin20/videona
- Repository: https://github.com/aladdin20/videona

## Overview

Videona is a compact desktop video player: users open a supported video from the picker, a command-line argument, or drag-and-drop, then control playback and seek in the native window. The application is concentrated in `src/main.rs`; the vendored player supplies the video widget and playback backend. README-documented capabilities include keyboard controls, fullscreen, progress and volume displays, and error toasts. The excerpts do not expose all application-to-widget calls, so those links are documented rather than inferred from imports.

Main entry points: [`src/main.rs`](https://github.com/aladdin20/videona/blob/main/src/main.rs) (Videona app), [`local_deps/egui-sharkplayer/src/backend.rs`](https://github.com/aladdin20/videona/blob/main/local_deps/egui-sharkplayer/src/backend.rs) (Player state), [`local_deps/egui-sharkplayer/src/widget.rs`](https://github.com/aladdin20/videona/blob/main/local_deps/egui-sharkplayer/src/widget.rs) (Player widget)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop application"]
  node_videona["Videona app<br/>[main.rs]"]
end

subgraph group_player["Playback engine"]
  node_player_widget["Player widget<br/>[widget.rs]"]
  node_player_backend["Player state<br/>[backend.rs]"]
end

subgraph group_render["Video rendering"]
  node_gl_backend["OpenGL frame backend<br/>[backend.rs]"]
  node_video_surface["Native video surface<br/>[widget.rs]"]
end

node_user(("Viewer"))
node_picker["System file picker"]
node_mpv["libmpv"]

node_user -->|"opens and controls"| node_videona
node_videona -->|"opens file dialog"| node_picker
node_videona -->|"uses playback UI"| node_player_widget
node_player_widget -->|"controls and reads"| node_player_backend
node_player_backend -->|"loads and controls"| node_mpv
node_player_backend -->|"renders frames"| node_gl_backend
node_gl_backend -->|"provides frame"| node_video_surface

click node_videona "https://github.com/aladdin20/videona/blob/main/src/main.rs"
click node_player_widget "https://github.com/aladdin20/videona/blob/main/local_deps/egui-sharkplayer/src/widget.rs"
click node_player_backend "https://github.com/aladdin20/videona/blob/main/local_deps/egui-sharkplayer/src/backend.rs"
click node_gl_backend "https://github.com/aladdin20/videona/blob/main/local_deps/egui-sharkplayer/src/backend.rs"
click node_video_surface "https://github.com/aladdin20/videona/blob/main/local_deps/egui-sharkplayer/src/widget.rs"

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_videona,node_user toneBlue
class node_player_widget,node_player_backend toneAmber
class node_gl_backend,node_video_surface toneMint
class node_picker,node_mpv toneIndigo
```

## Components

### Desktop application

- [Videona app](https://github.com/aladdin20/videona/blob/main/src/main.rs): `src/main.rs`

### Playback engine

- [Player widget](https://github.com/aladdin20/videona/blob/main/local_deps/egui-sharkplayer/src/widget.rs): `local_deps/egui-sharkplayer/src/widget.rs`
- [Player state](https://github.com/aladdin20/videona/blob/main/local_deps/egui-sharkplayer/src/backend.rs): `local_deps/egui-sharkplayer/src/backend.rs`

### Video rendering

- [OpenGL frame backend](https://github.com/aladdin20/videona/blob/main/local_deps/egui-sharkplayer/src/backend.rs): `local_deps/egui-sharkplayer/src/backend.rs`
- [Native video surface](https://github.com/aladdin20/videona/blob/main/local_deps/egui-sharkplayer/src/widget.rs): `local_deps/egui-sharkplayer/src/widget.rs`

### Other components

- **Viewer**
- **System file picker**
- **libmpv**

## Connections

- Viewer → Videona app: opens and controls (evidence: `README.md`)
- Videona app → System file picker: opens file dialog (evidence: `src/main.rs`)
- Videona app → Player widget: uses playback UI (evidence: `README.md`)
- Player widget → Player state: controls and reads (evidence: `local_deps/egui-sharkplayer/src/widget.rs`)
- Player state → libmpv: loads and controls (evidence: `local_deps/egui-sharkplayer/src/backend.rs`)
- Player state → OpenGL frame backend: renders frames (evidence: `local_deps/egui-sharkplayer/src/backend.rs`)
- OpenGL frame backend → Native video surface: provides frame (evidence: `local_deps/egui-sharkplayer/src/widget.rs`)
