Xav.Frame (xav v0.2.1)

Video or audio frame.

Summary

Types

@type t() :: %Xav.Frame{
  data: binary(),
  format: atom(),
  height: non_neg_integer() | nil,
  pts: integer(),
  samples: integer() | nil,
  type: :audio | :video,
  width: non_neg_integer() | nil
}

Functions

Link to this function

new(data, format, samples, pts)

@spec new(binary(), atom(), integer(), integer()) :: t()
Link to this function

new(data, format, width, height, pts)

@spec new(binary(), atom(), non_neg_integer(), non_neg_integer(), integer()) :: t()
@spec to_nx(t()) :: Nx.Tensor.t()

Converts frame to Nx tensor.