Dala.Media.Stream (dala v0.5.0)

Copy Markdown View Source

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.

Summary

Functions

Returns a specification to start this module under a supervisor.

Start a camera stream with compositing.

Start the stream supervisor.

Start a complete video stream with all actors.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_camera_stream(socket, opts \\ [])

@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(opts \\ [])

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

Start the stream supervisor.

start_video_stream(socket, url, opts \\ [])

@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.