# `Dala.Media.Stream`
[🔗](https://github.com/manhvu/dala/blob/main/lib/dala/media/stream.ex#L1)

Stream process supervisor.

Manages the lifecycle of media stream processes:
- VideoStreamActor — hardware-decoded video
- AudioStreamActor — low-latency audio
- RenderActor — GPU compositing
- ClockActor — AV sync clock

Each stream is an isolated BEAM process, matching the actor model.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_camera_stream`

```elixir
@spec start_camera_stream(
  Dala.Socket.t(),
  keyword()
) :: {:ok, %{video: pid(), clock: pid(), scene: pid()}} | {:error, term()}
```

Start a camera stream with compositing.

# `start_link`

```elixir
@spec start_link(keyword()) :: Supervisor.on_start()
```

Start the stream supervisor.

# `start_video_stream`

```elixir
@spec start_video_stream(Dala.Socket.t(), String.t(), keyword()) ::
  {:ok, %{video: pid(), audio: pid() | nil, clock: pid(), scene: pid()}}
  | {:error, term()}
```

Start a complete video stream with all actors.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
