View Source Xav.Frame (xav v0.6.0)
Audio/video frame.
Summary
Types
@type audio_format() :: :u8 | :s16 | :s32 | :s64 | :f32 | :f64
Possible audio samples formats.
@type format() :: audio_format() | video_format()
@type t() :: %Xav.Frame{ data: binary(), format: format(), height: non_neg_integer() | nil, pts: integer(), samples: integer() | nil, type: :audio | :video, width: non_neg_integer() | nil }
@type video_format() :: :rgb
Possible video frame formats.
Currently, only RGB is supported.
Functions
@spec new(binary(), format(), non_neg_integer(), non_neg_integer(), integer()) :: t()
Creates a new audio/video frame.
@spec to_nx(t()) :: Nx.Tensor.t()
Converts a frame to an Nx tensor.