BB.Message.Camera.EndCapture (bb_camera v0.1.1)

Copy Markdown View Source

A camera has stopped capturing.

reason distinguishes the three ways that happens:

  • :no_subscribers - the last consumer went away, so the hub asked the driver to stop. The ordinary case.
  • :driver_stopped - the driver stopped of its own accord.
  • :error - capture failed. error carries the BB.Error the driver reported, and every subscriber is told separately rather than being left waiting on a stream that will not resume.

Summary

Types

t()

@type t() :: %BB.Message.Camera.EndCapture{
  error: struct() | nil,
  frame_count: non_neg_integer(),
  reason: :no_subscribers | :driver_stopped | :error
}

Functions

new(frame_id, attrs)

@spec new(atom(), keyword()) :: {:ok, BB.Message.t()} | {:error, term()}