Xav.Decoder (xav v0.2.1)

Audio/video decoder.

Summary

Types

Supported codecs.

t()

Functions

Decodes an audio or video frame.

Creates a new decoder.

Types

@type codec() :: :opus | :vp8

Supported codecs.

@type t() :: reference()

Functions

Link to this function

decode(decoder, data, opts \\ [])

@spec decode(t(), binary(), pts: integer(), dts: integer()) ::
  {:ok, Xav.Frame.t()} | {:error, atom()}

Decodes an audio or video frame.

Video frames are always in the RGB format. Audio samples are always interleaved.

@spec new(codec()) :: t()

Creates a new decoder.