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

Copy Markdown View Source

A media format this package will not carry.

The reason says why:

  • :interframe - the format's frames depend on earlier frames (H.264 and friends). BB.Camera.Hub keeps only the latest frame and drops the rest, which is lossless for independently decodable frames and silently destructive for these. Rather than hand a consumer a stream that decodes to garbage, it refuses to carry it at all.
  • :not_implemented - a format that could in principle be carried but isn't yet, raw pixel buffers being the obvious one.
  • :mismatch - the caller asserted a format the camera doesn't produce.

Summary

Types

reason()

@type reason() :: :interframe | :not_implemented | :mismatch

t()

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

Functions

exception(args)

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

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

Keys

  • :format
  • :expected
  • :reason