BB.Error.Invalid.Camera.UnsupportedFormat exception (bb_camera v0.2.0)

Copy Markdown View Source

A media format this package will not carry.

bb_camera carries raw frames only; see BB.Camera.Format. The reason says what was wrong:

  • :encoded - the format is a codec (JPEG, H.264, ...) rather than {:raw, pixel_format}. Drivers decode before handing frames to the hub.
  • :unknown_pixel_format - a raw format whose pixel format Membrane.RawVideo doesn't name.
  • :invalid_dimensions - dimensions the pixel format can't take, such as an odd width for chroma-subsampled :I420.
  • :mismatch - the caller asserted a format the camera doesn't produce.

Summary

Types

reason()

@type reason() :: :encoded | :unknown_pixel_format | :invalid_dimensions | :mismatch

t()

@type t() :: %BB.Error.Invalid.Camera.UnsupportedFormat{
  __exception__: term(),
  bread_crumbs: term(),
  class: term(),
  expected: term(),
  format: term(),
  height: pos_integer() | nil,
  path: term(),
  reason: reason(),
  splode: term(),
  stacktrace: term(),
  vars: term(),
  width: pos_integer() | nil
}

Functions

exception(args)

@spec exception(opts :: Keyword.t()) :: %BB.Error.Invalid.Camera.UnsupportedFormat{
  __exception__: term(),
  bread_crumbs: term(),
  class: term(),
  expected: term(),
  format: term(),
  height: term(),
  path: term(),
  reason: term(),
  splode: term(),
  stacktrace: term(),
  vars: term(),
  width: term()
}

Create an Elixir.BB.Error.Invalid.Camera.UnsupportedFormat without raising it.

Keys

  • :format
  • :expected
  • :width
  • :height
  • :reason